Skip to content
Snippets Groups Projects

Feature/itemvalue

1 file
+ 19
0
Compare changes
  • Side-by-side
  • Inline
+ 19
0
@@ -42,11 +42,19 @@ class ItemToItemMatrix
;
}
KOKKOS_INLINE_FUNCTION
SubItemList& operator=(const SubItemList&) = default;
KOKKOS_INLINE_FUNCTION
SubItemList& operator=(SubItemList&&) = default;
KOKKOS_INLINE_FUNCTION
SubItemList(const SubItemList&) = default;
KOKKOS_INLINE_FUNCTION
SubItemList(SubItemList&&) = default;
KOKKOS_INLINE_FUNCTION
~SubItemList() = default;
};
@@ -54,6 +62,7 @@ class ItemToItemMatrix
const ConnectivityMatrix& m_connectivity_matrix;
public:
KOKKOS_INLINE_FUNCTION
const auto operator[](const SourceItemId& source_id) const
{
using RowType = decltype(m_connectivity_matrix.rowConst(source_id));
@@ -61,6 +70,7 @@ class ItemToItemMatrix
}
template <typename IndexType>
KOKKOS_INLINE_FUNCTION
const auto operator[](const IndexType& source_id) const
{
static_assert(std::is_same<IndexType, SourceItemId>(),
@@ -69,17 +79,26 @@ class ItemToItemMatrix
return SubItemList<RowType>(m_connectivity_matrix.rowConst(source_id));
}
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix(const ConnectivityMatrix& connectivity_matrix)
: m_connectivity_matrix{connectivity_matrix}
{
;
}
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix& operator=(const ItemToItemMatrix&) = default;
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix& operator=(ItemToItemMatrix&&) = default;
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix(ItemToItemMatrix&&) = default;
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix(const ItemToItemMatrix&) = default;
KOKKOS_INLINE_FUNCTION
~ItemToItemMatrix() = default;
};
Loading