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

Add data_type to SubItemValuePerItem and SubItemValuePerItem::SubView

This allows to use ArrayUtils method on their instances
parent a821bb71
No related branches found
No related tags found
1 merge request!7Feature/itemvalue
...@@ -27,6 +27,9 @@ class SubItemValuePerItem<DataType, ...@@ -27,6 +27,9 @@ class SubItemValuePerItem<DataType,
public: public:
static const ItemType item_t{item_type}; static const ItemType item_t{item_type};
static const ItemType sub_item_t{sub_item_type}; static const ItemType sub_item_t{sub_item_type};
using data_type = DataType;
private: private:
bool m_is_built{false}; bool m_is_built{false};
...@@ -41,9 +44,13 @@ class SubItemValuePerItem<DataType, ...@@ -41,9 +44,13 @@ class SubItemValuePerItem<DataType,
public: public:
class SubView class SubView
{ {
public:
using data_type = DataType;
private: private:
KOKKOS_RESTRICT DataType* const m_sub_values; KOKKOS_RESTRICT DataType* const m_sub_values;
const size_t m_size; const size_t m_size;
public: public:
KOKKOS_INLINE_FUNCTION KOKKOS_INLINE_FUNCTION
const DataType& operator[](const size_t& i) const const DataType& operator[](const size_t& i) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment