17 #ifndef vtkmlib_PortalTraits_h 18 #define vtkmlib_PortalTraits_h 20 #include "vtkmConfig.h" 22 #include <vtkm/Types.h> 23 #include <vtkm/internal/Assume.h> 25 #include <type_traits> 47 template<
typename T,
int N>
51 using Type = vtkm::Vec<T,N>;
57 VTKM_ASSUME((i >= 0 && i < N));
64 VTKM_ASSUME((i >= 0 && i < N));
69 template<
typename T,
int N>
73 using Type = vtkm::Vec<T,N>;
79 VTKM_ASSUME((i >= 0 && i < N));
86 VTKM_ASSUME((i >= 0 && i < N));
91 template<
typename T,
int N,
int M>
95 using Type = vtkm::Vec< vtkm::Vec<T,N>, M>;
101 VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS));
103 const vtkm::IdComponent j = i%N;
110 VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS));
112 const vtkm::IdComponent j = i%N;
117 template<
typename T,
int N,
int M>
121 using Type = vtkm::Vec< vtkm::Vec<T,N>, M>;
127 VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS));
129 const vtkm::IdComponent j = i%N;
136 VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS));
138 const vtkm::IdComponent j = i%N;
145 #endif // vtkmlib_PortalsTraits_h
typename std::remove_const< T >::type ComponentType
static void SetComponent(Type &t, vtkm::IdComponent i, const ComponentType &v)
typename std::remove_const< T >::type ComponentType
static ComponentType GetComponent(const Type &t, vtkm::IdComponent)
vtkm::Vec< vtkm::Vec< T, N >, M > Type
static ComponentType GetComponent(const Type &t, vtkm::IdComponent i)
static ComponentType GetComponent(const Type &t, vtkm::IdComponent i)
static constexpr vtkm::IdComponent NUM_COMPONENTS
static ComponentType GetComponent(const Type &t, vtkm::IdComponent i)
vtkm::Vec< vtkm::Vec< T, N >, M > Type
static void SetComponent(Type &t, vtkm::IdComponent i, const ComponentType &v)
static void SetComponent(Type &t, vtkm::IdComponent i, const ComponentType &v)
static ComponentType GetComponent(const Type &t, vtkm::IdComponent i)
typename std::remove_const< T >::type ComponentType
typename std::remove_const< T >::type ComponentType
static void SetComponent(Type &t, vtkm::IdComponent i, const ComponentType &v)
static void SetComponent(Type &t, vtkm::IdComponent, const ComponentType &v)
typename std::remove_const< T >::type ComponentType