Skip to content
Snippets Groups Projects
Commit a16b179c authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add set of inline directives

parent eb758ca9
No related branches found
No related tags found
1 merge request!7Feature/itemvalue
...@@ -42,11 +42,19 @@ class ItemToItemMatrix ...@@ -42,11 +42,19 @@ class ItemToItemMatrix
; ;
} }
KOKKOS_INLINE_FUNCTION
SubItemList& operator=(const SubItemList&) = default; SubItemList& operator=(const SubItemList&) = default;
KOKKOS_INLINE_FUNCTION
SubItemList& operator=(SubItemList&&) = default; SubItemList& operator=(SubItemList&&) = default;
KOKKOS_INLINE_FUNCTION
SubItemList(const SubItemList&) = default; SubItemList(const SubItemList&) = default;
KOKKOS_INLINE_FUNCTION
SubItemList(SubItemList&&) = default; SubItemList(SubItemList&&) = default;
KOKKOS_INLINE_FUNCTION
~SubItemList() = default; ~SubItemList() = default;
}; };
...@@ -54,6 +62,7 @@ class ItemToItemMatrix ...@@ -54,6 +62,7 @@ class ItemToItemMatrix
const ConnectivityMatrix& m_connectivity_matrix; const ConnectivityMatrix& m_connectivity_matrix;
public: public:
KOKKOS_INLINE_FUNCTION
const auto operator[](const SourceItemId& source_id) const const auto operator[](const SourceItemId& source_id) const
{ {
using RowType = decltype(m_connectivity_matrix.rowConst(source_id)); using RowType = decltype(m_connectivity_matrix.rowConst(source_id));
...@@ -61,6 +70,7 @@ class ItemToItemMatrix ...@@ -61,6 +70,7 @@ class ItemToItemMatrix
} }
template <typename IndexType> template <typename IndexType>
KOKKOS_INLINE_FUNCTION
const auto operator[](const IndexType& source_id) const const auto operator[](const IndexType& source_id) const
{ {
static_assert(std::is_same<IndexType, SourceItemId>(), static_assert(std::is_same<IndexType, SourceItemId>(),
...@@ -69,17 +79,26 @@ class ItemToItemMatrix ...@@ -69,17 +79,26 @@ class ItemToItemMatrix
return SubItemList<RowType>(m_connectivity_matrix.rowConst(source_id)); return SubItemList<RowType>(m_connectivity_matrix.rowConst(source_id));
} }
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix(const ConnectivityMatrix& connectivity_matrix) ItemToItemMatrix(const ConnectivityMatrix& connectivity_matrix)
: m_connectivity_matrix{connectivity_matrix} : m_connectivity_matrix{connectivity_matrix}
{ {
; ;
} }
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix& operator=(const ItemToItemMatrix&) = default; ItemToItemMatrix& operator=(const ItemToItemMatrix&) = default;
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix& operator=(ItemToItemMatrix&&) = default; ItemToItemMatrix& operator=(ItemToItemMatrix&&) = default;
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix(ItemToItemMatrix&&) = default; ItemToItemMatrix(ItemToItemMatrix&&) = default;
KOKKOS_INLINE_FUNCTION
ItemToItemMatrix(const ItemToItemMatrix&) = default; ItemToItemMatrix(const ItemToItemMatrix&) = default;
KOKKOS_INLINE_FUNCTION
~ItemToItemMatrix() = default; ~ItemToItemMatrix() = default;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment