10#include <kernel/util/memory_arbiter.hpp>
11#include <kernel/lafem/forward.hpp>
23 template <SparseLayoutId LT_>
29 template<
typename DT_,
typename IT_>
30 using MatrixType = SparseMatrixCSR<DT_, IT_>;
36 template<
typename DT_,
typename IT_>
37 using MatrixType = SparseMatrixCSCR<DT_, IT_>;
43 template<
typename DT_,
typename IT_>
44 using MatrixType = SparseMatrixBanded<DT_, IT_>;
63 template <
typename IT_, SparseLayoutId Layout_>
67 std::vector<Memory::Arbiter> _indices;
68 std::vector<Index> _indices_size;
69 std::vector<Index> _scalar_index;
71 template<
typename DT_>
72 using MatrixType =
typename Intern::LayoutId<Layout_>::template MatrixType<DT_, IT_>;
81 explicit SparseLayout(
const std::vector<Memory::Arbiter> & indices,
const std::vector<Index> & indices_size,
const std::vector<Index> & scalar_index) :
83 _indices_size(indices_size),
84 _scalar_index(scalar_index)
86 for(
const auto& idx : indices)
87 this->_indices.push_back(idx.attach());
92 _indices(std::move(other._indices)),
93 _indices_size(std::move(other._indices_size)),
94 _scalar_index(std::move(other._scalar_index))
106 _indices = std::move(other._indices);
107 _indices_size = std::move(other._indices_size);
108 _scalar_index = std::move(other._scalar_index);
130 return _indices_size;
140 return _scalar_index;
Layout scheme for sparse matrix containers.
virtual ~SparseLayout()
virtual destructor
SparseLayout & operator=(SparseLayout &&other)
move operator=
SparseLayout(SparseLayout &&other)
move constructor
const std::vector< Index > & get_indices_size() const
Returns a list of all Index array sizes.
const std::vector< Index > & get_scalar_index() const
Returns a list of all scalar values with datatype index.
const std::vector< Memory::Arbiter > & get_indices() const
Returns a list of all Index arrays.
LAFEM common type definitions.