10 #ifndef vtk_m_internal_ArrayPortalBasic_h
11 #define vtk_m_internal_ArrayPortalBasic_h
32 VTKM_EXEC_CONT static inline T ArrayPortalBasicReadGet(
const T*
const data)
38 VTKM_EXEC_CONT static inline T ArrayPortalBasicWriteGet(
const T*
const data)
44 VTKM_EXEC_CONT static inline void ArrayPortalBasicWriteSet(T* data,
const T& value)
52 class ArrayPortalBasicRead
54 const T* Array =
nullptr;
67 return detail::ArrayPortalBasicReadGet(this->Array + index);
70 VTKM_EXEC_CONT const ValueType* GetIteratorBegin()
const {
return this->Array; }
73 return this->Array + this->NumberOfValues;
76 VTKM_EXEC_CONT const ValueType* GetArray()
const {
return this->Array; }
78 ArrayPortalBasicRead() =
default;
79 ArrayPortalBasicRead(ArrayPortalBasicRead&&) =
default;
80 ArrayPortalBasicRead(
const ArrayPortalBasicRead&) =
default;
81 ArrayPortalBasicRead& operator=(ArrayPortalBasicRead&&) =
default;
82 ArrayPortalBasicRead& operator=(
const ArrayPortalBasicRead&) =
default;
86 , NumberOfValues(numberOfValues)
92 class ArrayPortalBasicWrite
107 return detail::ArrayPortalBasicWriteGet(this->Array + index);
115 detail::ArrayPortalBasicWriteSet(this->Array + index, value);
118 VTKM_EXEC_CONT ValueType* GetIteratorBegin()
const {
return this->Array; }
119 VTKM_EXEC_CONT ValueType* GetIteratorEnd()
const {
return this->Array + this->NumberOfValues; }
121 VTKM_EXEC_CONT ValueType* GetArray()
const {
return this->Array; }
123 ArrayPortalBasicWrite() =
default;
124 ArrayPortalBasicWrite(ArrayPortalBasicWrite&&) =
default;
125 ArrayPortalBasicWrite(
const ArrayPortalBasicWrite&) =
default;
126 ArrayPortalBasicWrite& operator=(ArrayPortalBasicWrite&&) =
default;
127 ArrayPortalBasicWrite& operator=(
const ArrayPortalBasicWrite&) =
default;
131 , NumberOfValues(numberOfValues)
138 #endif //vtk_m_internal_ArrayPortalBasic_h