Go to the documentation of this file.
18 #ifndef viskores_TypeTraits_h
19 #define viskores_TypeTraits_h
95 #define VISKORES_BASIC_REAL_TYPE(T) \
97 struct TypeTraits<T> \
99 using NumericTag = TypeTraitsRealTag; \
100 using DimensionalityTag = TypeTraitsScalarTag; \
101 VISKORES_EXEC_CONT static T ZeroInitialization() \
107 #define VISKORES_BASIC_INTEGER_TYPE(T) \
109 struct TypeTraits<T> \
111 using NumericTag = TypeTraitsIntegerTag; \
112 using DimensionalityTag = TypeTraitsScalarTag; \
113 VISKORES_EXEC_CONT static T ZeroInitialization() \
115 using ReturnType = T; \
116 return ReturnType(); \
139 #undef VISKORES_BASIC_REAL_TYPE
140 #undef VISKORES_BASIC_INTEGER_TYPE
144 template <
typename T, viskores::IdComponent Size>
159 template <
typename T>
171 template <
typename T>
183 template <
typename T,
typename U>
199 #endif //viskores_TypeTraits_h
static viskores::VecCConst< T > ZeroInitialization()
Definition: TypeTraits.h:166
static viskores::VecC< T > ZeroInitialization()
Definition: TypeTraits.h:178
typename viskores::TypeTraits< T >::NumericTag NumericTag
Definition: TypeTraits.h:162
A const version of VecC.
Definition: Types.h:371
typename viskores::TypeTraits< T >::NumericTag NumericTag
Definition: TypeTraits.h:147
static T ZeroInitialization()
A static function that returns 0 (or the closest equivalent to it) for the given type.
Definition: TypeTraits.h:85
A Vec-like representation for short arrays.
Definition: Types.h:368
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
Tag used to identify 0 dimensional types (scalars).
Definition: TypeTraits.h:52
The TypeTraits class provides helpful compile-time information about the basic types used in Viskores...
Definition: TypeTraits.h:69
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
Tag used to identify types that store real (floating-point) numbers.
Definition: TypeTraits.h:36
#define VISKORES_BASIC_REAL_TYPE(T)
Definition: TypeTraits.h:95
#define VISKORES_BASIC_INTEGER_TYPE(T)
Definition: TypeTraits.h:107
A viskores::Pair is essentially the same as an STL pair object except that the methods (constructors ...
Definition: Pair.h:37
static viskores::Vec< T, Size > ZeroInitialization()
Definition: TypeTraits.h:151
typename viskores::TypeTraits< T >::NumericTag NumericTag
Definition: TypeTraits.h:174
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:59
A short fixed-length array.
Definition: Types.h:365
Tag used to identify types that store integer numbers.
Definition: TypeTraits.h:44
static viskores::Pair< T, U > ZeroInitialization()
Definition: TypeTraits.h:190