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
static VTKM_EXEC_CONT void SetComponent(VecType &vector, vtkm::IdComponent componentIndex, const ComponentType &value)
Definition: VecVariable.h:133
static VTKM_EXEC_CONT void CopyInto(const VecType &src, vtkm::Vec< ComponentType, destSize > &dest)
Definition: VecVariable.h:149
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:21
Groups connected points that have the same field value.
Definition: Atomic.h:19
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
Represents a component ID (index of component in a vector).
Definition: Types.h:168
static VTKM_EXEC_CONT vtkm::VecVariable< T, MaxSize > ZeroInitialization()
Definition: VecVariable.h:99
vtkm::IdComponent NumComponents
Definition: VecVariable.h:89
typename vtkm::VecTraits< ComponentType >::BaseComponentType BaseComponentType
Base component type in the vector.
Definition: VecTraits.h:80
VTKM_EXEC_CONT void CopyInto(vtkm::Vec< ComponentType, DestSize > &dest) const
Definition: VecVariable.h:56
static const VTKM_EXEC_CONT ComponentType & GetComponent(const VecType &vector, vtkm::IdComponent componentIndex)
Definition: VecVariable.h:122
VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents() const
Definition: VecVariable.h:53
VTKM_EXEC_CONT VecVariable()
Definition: VecVariable.h:36
VTKM_EXEC_CONT void Append(ComponentType value)
Definition: VecVariable.h:80
A short variable-length array with maximum length.
Definition: VecVariable.h:30
VTKM_EXEC_CONT VecVariable(const SrcVecType &src)
Definition: VecVariable.h:42
static VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents(const VecType &vector)
Definition: VecVariable.h:116
const VTKM_EXEC_CONT ComponentType & operator[](vtkm::IdComponent index) const
Definition: VecVariable.h:66
static VTKM_EXEC_CONT ComponentType & GetComponent(VecType &vector, vtkm::IdComponent componentIndex)
Definition: VecVariable.h:127
Tag used to identify types that aren't Real, Integer, Scalar or Vector.
Definition: TypeTraits.h:20
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:51
A short fixed-length array.
Definition: Types.h:767
typename vtkm::VecTraits< ComponentType >::BaseComponentType BaseComponentType
Definition: VecVariable.h:111
The VecTraits class gives several static members that define how to use a given type as a vector.
Definition: VecTraits.h:66
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_EXEC_CONT ComponentType & operator[](vtkm::IdComponent index)
Definition: VecVariable.h:73
vtkm::Vec< T, MaxSize > Data
Definition: VecVariable.h:88