Go to the documentation of this file.
18 #ifndef viskores_VecFromPortalPermute_h
19 #define viskores_VecFromPortalPermute_h
35 template <
typename IndexVecType,
typename PortalType>
39 using ComponentType =
typename std::remove_const<typename PortalType::ValueType>::type;
57 return this->
Indices->GetNumberOfComponents();
61 template <viskores::IdComponent DestSize>
67 dest[index] = (*this)[index];
83 template <
typename IndexVecType,
typename PortalType>
87 using ComponentType =
typename std::remove_const<typename PortalType::ValueType>::type;
105 return this->Indices->GetNumberOfComponents();
109 template <viskores::IdComponent DestSize>
115 dest[index] = (*this)[index];
123 return this->Portal->Get((*this->Indices)[index]);
131 template <
typename IndexVecType,
typename PortalType>
147 template <
typename IndexVecType,
typename PortalType>
168 return vector[componentIndex];
172 template <viskores::IdComponent destSize>
180 template <
typename IndexVecType,
typename PortalType>
182 const IndexVecType* index,
183 const PortalType& portal)
188 template <
typename IndexVecType,
typename PortalType>
189 inline VISKORES_EXEC VecFromPortalPermute<IndexVecType, const PortalType*>
197 #endif //viskores_VecFromPortalPermute_h
ComponentType operator[](viskores::IdComponent index) const
Definition: VecFromPortalPermute.h:73
const IndexVecType *const Indices
Definition: VecFromPortalPermute.h:127
viskores::IdComponent GetNumberOfComponents() const
Definition: VecFromPortalPermute.h:55
Definition: VecFromPortalPermute.h:84
typename viskores::VecTraits< ComponentType >::BaseComponentType BaseComponentType
Definition: VecFromPortalPermute.h:153
static viskores::IdComponent GetNumberOfComponents(const VecType &vector)
Definition: VecFromPortalPermute.h:159
const PortalType *const Portal
Definition: VecFromPortalPermute.h:128
VecFromPortalPermute()
Definition: VecFromPortalPermute.h:91
#define VISKORES_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:61
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:31
VecFromPortalPermute()
Definition: VecFromPortalPermute.h:43
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
const IndexVecType *const Indices
Definition: VecFromPortalPermute.h:79
static void CopyInto(const VecType &src, viskores::Vec< ComponentType, destSize > &dest)
Definition: VecFromPortalPermute.h:173
The TypeTraits class provides helpful compile-time information about the basic types used in Viskores...
Definition: TypeTraits.h:69
typename PortalType::ValueType ComponentType
Definition: VecFromPortalPermute.h:136
VecFromPortalPermute< IndexVecType, PortalType > make_VecFromPortalPermute(const IndexVecType *index, const PortalType &portal)
Definition: VecFromPortalPermute.h:181
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
typename std::remove_const< typename PortalType::ValueType >::type ComponentType
Definition: VecFromPortalPermute.h:87
typename VecType::ComponentType ComponentType
Definition: VecFromPortalPermute.h:152
viskores::IdComponent GetNumberOfComponents() const
Definition: VecFromPortalPermute.h:103
Traits that can be queried to treat any type as a Vec.
Definition: VecTraits.h:69
A short vector from an ArrayPortal and a vector of indices.
Definition: VecFromPortalPermute.h:36
void CopyInto(viskores::Vec< ComponentType, DestSize > &dest) const
Definition: VecFromPortalPermute.h:62
static ComponentType GetComponent(const VecType &vector, viskores::IdComponent componentIndex)
Definition: VecFromPortalPermute.h:166
ComponentType operator[](viskores::IdComponent index) const
Definition: VecFromPortalPermute.h:121
static VecType ZeroInitialization()
Definition: VecFromPortalPermute.h:144
PortalType Portal
Definition: VecFromPortalPermute.h:80
VecFromPortalPermute(const IndexVecType *indices, const PortalType &portal)
Definition: VecFromPortalPermute.h:47
T BaseComponentType
Base component type in the vector.
Definition: VecTraits.h:86
void CopyInto(viskores::Vec< ComponentType, DestSize > &dest) const
Definition: VecFromPortalPermute.h:110
typename viskores::TypeTraits< ComponentType >::NumericTag NumericTag
Definition: VecFromPortalPermute.h:139
VecFromPortalPermute(const IndexVecType *indices, const PortalType *const portal)
Definition: VecFromPortalPermute.h:95
typename std::remove_const< typename PortalType::ValueType >::type ComponentType
Definition: VecFromPortalPermute.h:39
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:59
A short fixed-length array.
Definition: Types.h:365
#define VISKORES_EXEC
Definition: ExportMacros.h:59