Skip to content

Commit

Permalink
Add template instantiations for type Tuple and Triple.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-rapp committed Oct 12, 2023
1 parent 7ecc598 commit 48c57ef
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cpp/subprojects/common/src/mlrl/common/data/vector_dense.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "mlrl/common/data/vector_dense.hpp"

#include "mlrl/common/data/indexed_value.hpp"
#include "mlrl/common/data/triple.hpp"
#include "mlrl/common/data/tuple.hpp"

#include <cstdlib>
Expand Down Expand Up @@ -43,8 +44,23 @@ template class DenseVector<IndexedValue<uint32>>;
template class DenseVector<IndexedValue<int64>>;
template class DenseVector<IndexedValue<float32>>;
template class DenseVector<IndexedValue<float64>>;
template class DenseVector<Tuple<uint8>>;
template class DenseVector<Tuple<uint32>>;
template class DenseVector<Tuple<int64>>;
template class DenseVector<Tuple<float32>>;
template class DenseVector<Tuple<float64>>;
template class DenseVector<IndexedValue<Tuple<uint8>>>;
template class DenseVector<IndexedValue<Tuple<uint32>>>;
template class DenseVector<IndexedValue<Tuple<int64>>>;
template class DenseVector<IndexedValue<Tuple<float32>>>;
template class DenseVector<IndexedValue<Tuple<float64>>>;
template class DenseVector<Triple<uint8>>;
template class DenseVector<Triple<uint32>>;
template class DenseVector<Triple<int64>>;
template class DenseVector<Triple<float32>>;
template class DenseVector<Triple<float64>>;
template class DenseVector<IndexedValue<Triple<uint8>>>;
template class DenseVector<IndexedValue<Triple<uint32>>>;
template class DenseVector<IndexedValue<Triple<int64>>>;
template class DenseVector<IndexedValue<Triple<float32>>>;
template class DenseVector<IndexedValue<Triple<float64>>>;
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "mlrl/common/data/vector_sparse_array.hpp"

#include "mlrl/common/data/triple.hpp"
#include "mlrl/common/data/tuple.hpp"

template<typename T>
Expand Down Expand Up @@ -279,3 +280,8 @@ template class SparseArrayVector<Tuple<uint32>>;
template class SparseArrayVector<Tuple<int64>>;
template class SparseArrayVector<Tuple<float32>>;
template class SparseArrayVector<Tuple<float64>>;
template class SparseArrayVector<Triple<uint8>>;
template class SparseArrayVector<Triple<uint32>>;
template class SparseArrayVector<Triple<int64>>;
template class SparseArrayVector<Triple<float32>>;
template class SparseArrayVector<Triple<float64>>;
31 changes: 31 additions & 0 deletions cpp/subprojects/common/src/mlrl/common/data/view_vector.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "mlrl/common/data/view_vector.hpp"

#include "mlrl/common/data/indexed_value.hpp"
#include "mlrl/common/data/triple.hpp"
#include "mlrl/common/data/tuple.hpp"

template<typename T>
Expand Down Expand Up @@ -41,11 +42,26 @@ template class VectorConstView<IndexedValue<uint32>>;
template class VectorConstView<IndexedValue<int64>>;
template class VectorConstView<IndexedValue<float32>>;
template class VectorConstView<IndexedValue<float64>>;
template class VectorConstView<Tuple<uint8>>;
template class VectorConstView<Tuple<uint32>>;
template class VectorConstView<Tuple<int64>>;
template class VectorConstView<Tuple<float32>>;
template class VectorConstView<Tuple<float64>>;
template class VectorConstView<IndexedValue<Tuple<uint8>>>;
template class VectorConstView<IndexedValue<Tuple<uint32>>>;
template class VectorConstView<IndexedValue<Tuple<int64>>>;
template class VectorConstView<IndexedValue<Tuple<float32>>>;
template class VectorConstView<IndexedValue<Tuple<float64>>>;
template class VectorConstView<Triple<uint8>>;
template class VectorConstView<Triple<uint32>>;
template class VectorConstView<Triple<int64>>;
template class VectorConstView<Triple<float32>>;
template class VectorConstView<Triple<float64>>;
template class VectorConstView<IndexedValue<Triple<uint8>>>;
template class VectorConstView<IndexedValue<Triple<uint32>>>;
template class VectorConstView<IndexedValue<Triple<int64>>>;
template class VectorConstView<IndexedValue<Triple<float32>>>;
template class VectorConstView<IndexedValue<Triple<float64>>>;

template<typename T>
VectorView<T>::VectorView(uint32 numElements, T* array) : VectorConstView<T>(numElements, array) {}
Expand Down Expand Up @@ -80,8 +96,23 @@ template class VectorView<IndexedValue<uint32>>;
template class VectorView<IndexedValue<int64>>;
template class VectorView<IndexedValue<float32>>;
template class VectorView<IndexedValue<float64>>;
template class VectorView<Tuple<uint8>>;
template class VectorView<Tuple<uint32>>;
template class VectorView<Tuple<int64>>;
template class VectorView<Tuple<float32>>;
template class VectorView<Tuple<float64>>;
template class VectorView<IndexedValue<Tuple<uint8>>>;
template class VectorView<IndexedValue<Tuple<uint32>>>;
template class VectorView<IndexedValue<Tuple<int64>>>;
template class VectorView<IndexedValue<Tuple<float32>>>;
template class VectorView<IndexedValue<Tuple<float64>>>;
template class VectorView<Triple<uint8>>;
template class VectorView<Triple<uint32>>;
template class VectorView<Triple<int64>>;
template class VectorView<Triple<float32>>;
template class VectorView<Triple<float64>>;
template class VectorView<IndexedValue<Triple<uint8>>>;
template class VectorView<IndexedValue<Triple<uint32>>>;
template class VectorView<IndexedValue<Triple<int64>>>;
template class VectorView<IndexedValue<Triple<float32>>>;
template class VectorView<IndexedValue<Triple<float64>>>;

0 comments on commit 48c57ef

Please sign in to comment.