From 755473e3986d5e77d4ccefce3035465a7ce7a5a3 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 7 Sep 2018 11:08:30 +0200 Subject: [PATCH] Add data_type to SubItemValuePerItem and SubItemValuePerItem::SubView This allows to use ArrayUtils method on their instances --- src/mesh/SubItemValuePerItem.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesh/SubItemValuePerItem.hpp b/src/mesh/SubItemValuePerItem.hpp index a5b96b565..b578fc5fa 100644 --- a/src/mesh/SubItemValuePerItem.hpp +++ b/src/mesh/SubItemValuePerItem.hpp @@ -27,6 +27,9 @@ class SubItemValuePerItem<DataType, public: static const ItemType item_t{item_type}; static const ItemType sub_item_t{sub_item_type}; + + using data_type = DataType; + private: bool m_is_built{false}; @@ -41,9 +44,13 @@ class SubItemValuePerItem<DataType, public: class SubView { + public: + using data_type = DataType; + private: KOKKOS_RESTRICT DataType* const m_sub_values; const size_t m_size; + public: KOKKOS_INLINE_FUNCTION const DataType& operator[](const size_t& i) const -- GitLab