Go to the documentation of this file.
10 #ifndef vtk_m_TypeTraits_h
11 #define vtk_m_TypeTraits_h
87 #define VTKM_BASIC_REAL_TYPE(T) \
89 struct TypeTraits<T> \
91 using NumericTag = TypeTraitsRealTag; \
92 using DimensionalityTag = TypeTraitsScalarTag; \
93 VTKM_EXEC_CONT static T ZeroInitialization() { return T(); } \
96 #define VTKM_BASIC_INTEGER_TYPE(T) \
98 struct TypeTraits<T> \
100 using NumericTag = TypeTraitsIntegerTag; \
101 using DimensionalityTag = TypeTraitsScalarTag; \
102 VTKM_EXEC_CONT static T ZeroInitialization() \
104 using ReturnType = T; \
105 return ReturnType(); \
128 #undef VTKM_BASIC_REAL_TYPE
129 #undef VTKM_BASIC_INTEGER_TYPE
133 template <
typename T, vtkm::IdComponent Size>
148 template <
typename T>
160 template <
typename T>
172 template <
typename T,
typename U>
188 #endif //vtk_m_TypeTraits_h
Tag used to identify types that store integer numbers.
Definition: TypeTraits.h:36
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_EXEC_CONT
Definition: ExportMacros.h:52
typename vtkm::TypeTraits< T >::NumericTag NumericTag
Definition: TypeTraits.h:163
#define VTKM_BASIC_INTEGER_TYPE(T)
Definition: TypeTraits.h:96
#define VTKM_BASIC_REAL_TYPE(T)
Definition: TypeTraits.h:87
Tag used to identify types that store real (floating-point) numbers.
Definition: TypeTraits.h:28
typename vtkm::TypeTraits< T >::NumericTag NumericTag
Definition: TypeTraits.h:151
A const version of VecC.
Definition: Types.h:363
static vtkm::Pair< T, U > ZeroInitialization()
Definition: TypeTraits.h:179
typename vtkm::TypeTraits< T >::NumericTag NumericTag
Definition: TypeTraits.h:136
static vtkm::VecC< T > ZeroInitialization()
Definition: TypeTraits.h:167
Tag used to identify types that aren't Real, Integer, Scalar or Vector.
Definition: TypeTraits.h:20
Tag used to identify 0 dimensional types (scalars).
Definition: TypeTraits.h:44
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:51
A short fixed-length array.
Definition: Types.h:357
static vtkm::Vec< T, Size > ZeroInitialization()
Definition: TypeTraits.h:140
static T ZeroInitialization()
A static function that returns 0 (or the closest equivalent to it) for the given type.
Definition: TypeTraits.h:77
A Vec-like representation for short arrays.
Definition: Types.h:360
A vtkm::Pair is essentially the same as an STL pair object except that the methods (constructors and ...
Definition: Pair.h:29
static vtkm::VecCConst< T > ZeroInitialization()
Definition: TypeTraits.h:155