Go to the documentation of this file.
18 #ifndef viskores_VecVariable_h
19 #define viskores_VecVariable_h
37 template <
typename T, viskores::IdComponent MaxSize>
49 template <
typename SrcVecType>
56 this->
Data[index] = src[index];
63 template <viskores::IdComponent DestSize>
69 dest[index] = this->
Data[index];
77 return this->
Data[index];
84 return this->
Data[index];
100 template <
typename T, viskores::IdComponent MaxSize>
113 template <
typename T, viskores::IdComponent MaxSize>
133 return vector[componentIndex];
138 return vector[componentIndex];
146 vector[componentIndex] = value;
149 template <
typename NewComponentType>
152 template <
typename NewComponentType>
158 template <viskores::IdComponent destSize>
168 #endif //viskores_VecVariable_h
static viskores::VecVariable< T, MaxSize > ZeroInitialization()
Definition: VecVariable.h:107
typename viskores::TypeTraits< T >::NumericTag NumericTag
Definition: VecVariable.h:103
A short variable-length array with maximum length.
Definition: VecVariable.h:38
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:31
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
typename VecType::ComponentType ComponentType
Definition: VecVariable.h:118
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
void Append(ComponentType value)
Definition: VecVariable.h:88
static viskores::IdComponent GetNumberOfComponents(const VecType &vector)
Definition: VecVariable.h:124
viskores::IdComponent GetNumberOfComponents() const
Definition: VecVariable.h:61
static void CopyInto(const VecType &src, viskores::Vec< ComponentType, destSize > &dest)
Definition: VecVariable.h:159
The TypeTraits class provides helpful compile-time information about the basic types used in Viskores...
Definition: TypeTraits.h:69
const ComponentType & operator[](viskores::IdComponent index) const
Definition: VecVariable.h:74
Groups connected points that have the same field value.
Definition: Atomic.h:27
Tag used to identify types that aren't Real, Integer, Scalar or Vector.
Definition: TypeTraits.h:28
viskores::IdComponent NumComponents
Definition: VecVariable.h:97
Traits that can be queried to treat any type as a Vec.
Definition: VecTraits.h:69
viskores::Vec< T, MaxSize > Data
Definition: VecVariable.h:96
static void SetComponent(VecType &vector, viskores::IdComponent componentIndex, const ComponentType &value)
Definition: VecVariable.h:142
void CopyInto(viskores::Vec< ComponentType, DestSize > &dest) const
Definition: VecVariable.h:64
#define VISKORES_ASSERT(condition)
Definition: Assert.h:51
T ComponentType
Definition: VecVariable.h:41
VecVariable(const SrcVecType &src)
Definition: VecVariable.h:50
VecVariable()
Definition: VecVariable.h:44
static ComponentType & GetComponent(VecType &vector, viskores::IdComponent componentIndex)
Definition: VecVariable.h:136
T BaseComponentType
Base component type in the vector.
Definition: VecTraits.h:86
typename viskores::VecTraits< ComponentType >::BaseComponentType BaseComponentType
Definition: VecVariable.h:119
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:59
A short fixed-length array.
Definition: Types.h:365
static const ComponentType & GetComponent(const VecType &vector, viskores::IdComponent componentIndex)
Definition: VecVariable.h:130
ComponentType & operator[](viskores::IdComponent index)
Definition: VecVariable.h:81
Represent a plane with a base point (origin) and normal vector.
Definition: Geometry.h:33