Viskores  1.0
ArrayPortal.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_ArrayPortal_h
19 #define viskores_cont_ArrayPortal_h
20 
21 #include <viskores/Types.h>
22 
23 namespace viskores
24 {
25 namespace cont
26 {
27 
28 #ifdef VISKORES_DOXYGEN_ONLY
29 
69 template <typename T>
71 {
72 public:
75  using ValueType = T;
76 
82 
86  ValueType Get(viskores::Id index) const;
87 
92  void Set(viskores::Id index, const ValueType& value) const;
93 };
94 
95 #endif // VISKORES_DOXYGEN_ONLY
96 }
97 } // namespace viskores::cont
98 
99 #endif //viskores_cont_ArrayPortal_h
viskores::cont::ArrayPortal::Get
ValueType Get(viskores::Id index) const
Gets a value from the array.
Types.h
viskores::cont::ArrayPortal::GetNumberOfValues
viskores::Id GetNumberOfValues() const
The total number of values in the array.
viskores::cont::ArrayPortal::ValueType
T ValueType
The type of each value in the array.
Definition: ArrayPortal.h:75
viskores::cont::ArrayPortal
A class that points to and access and array of data.
Definition: ArrayPortal.h:70
VISKORES_EXEC_CONT
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores::cont::ArrayPortal::Set
void Set(viskores::Id index, const ValueType &value) const
Sets a value in the array.
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27