Go to the documentation of this file.
10 #ifndef vtk_m_VecVariable_h
11 #define vtk_m_VecVariable_h
29 template <
typename T, vtkm::IdComponent MaxSize>
41 template <
typename SrcVecType>
48 this->
Data[index] = src[index];
55 template <vtkm::IdComponent DestSize>
61 dest[index] = this->
Data[index];
69 return this->
Data[index];
76 return this->
Data[index];
92 template <
typename T, vtkm::IdComponent MaxSize>
105 template <
typename T, vtkm::IdComponent MaxSize>
124 return vector[componentIndex];
129 return vector[componentIndex];
137 vector[componentIndex] = value;
140 template <
typename NewComponentType>
143 template <
typename NewComponentType>
148 template <vtkm::IdComponent destSize>
157 #endif //vtk_m_VecVariable_h
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:23
Groups connected points that have the same field value.
Definition: Atomic.h:19
VecVariable()
Definition: VecVariable.h:36
static vtkm::VecVariable< T, MaxSize > ZeroInitialization()
Definition: VecVariable.h:99
The TypeTraits class provides helpful compile-time information about the basic types used in VTKm (an...
Definition: TypeTraits.h:61
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
ComponentType & operator[](vtkm::IdComponent index)
Definition: VecVariable.h:73
static ComponentType & GetComponent(VecType &vector, vtkm::IdComponent componentIndex)
Definition: VecVariable.h:127
vtkm::IdComponent NumComponents
Definition: VecVariable.h:89
VecVariable(const SrcVecType &src)
Definition: VecVariable.h:42
void Append(ComponentType value)
Definition: VecVariable.h:80
vtkm::IdComponent GetNumberOfComponents() const
Definition: VecVariable.h:53
T BaseComponentType
Base component type in the vector.
Definition: VecTraits.h:78
static void SetComponent(VecType &vector, vtkm::IdComponent componentIndex, const ComponentType &value)
Definition: VecVariable.h:133
A short variable-length array with maximum length.
Definition: VecVariable.h:30
static vtkm::IdComponent GetNumberOfComponents(const VecType &vector)
Definition: VecVariable.h:116
void CopyInto(vtkm::Vec< ComponentType, DestSize > &dest) const
Definition: VecVariable.h:56
Tag used to identify types that aren't Real, Integer, Scalar or Vector.
Definition: TypeTraits.h:20
static void CopyInto(const VecType &src, vtkm::Vec< ComponentType, destSize > &dest)
Definition: VecVariable.h:149
const ComponentType & operator[](vtkm::IdComponent index) const
Definition: VecVariable.h:66
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:51
A short fixed-length array.
Definition: Types.h:357
typename vtkm::VecTraits< ComponentType >::BaseComponentType BaseComponentType
Definition: VecVariable.h:111
Traits that can be queried to treat any type as a Vec.
Definition: VecTraits.h:61
static const ComponentType & GetComponent(const VecType &vector, vtkm::IdComponent componentIndex)
Definition: VecVariable.h:122
Represent a plane with a base point (origin) and normal vector.
Definition: Geometry.h:25
typename vtkm::TypeTraits< T >::NumericTag NumericTag
Definition: VecVariable.h:95
T ComponentType
Definition: VecVariable.h:33
typename VecType::ComponentType ComponentType
Definition: VecVariable.h:110
vtkm::Vec< T, MaxSize > Data
Definition: VecVariable.h:88