with the definition of 'simd_traits', we can proceed to implement 'vector_traits': struct vector_traits is a traits class fixing the types used for vectorized code in vspline. These types go beyond mere vectors of fundamentals: most of the time, the data vspline has to process are not fundamentals, but what I call 'xel' data: pixels, voxels, stereo sound samples, etc. - so, small aggregates of a fundamental type. vector_traits defines how fundamentals and 'xel' data are to be vectorized. with the types defined by vector_traits, a system of type names is introduced which uses a set of patterns:
More...
#include <vector.h>
template<typename T, size_t _vsize = 0, typename Enable = void>
struct vspline::vector_traits< T, _vsize, Enable >
with the definition of 'simd_traits', we can proceed to implement 'vector_traits': struct vector_traits is a traits class fixing the types used for vectorized code in vspline. These types go beyond mere vectors of fundamentals: most of the time, the data vspline has to process are not fundamentals, but what I call 'xel' data: pixels, voxels, stereo sound samples, etc. - so, small aggregates of a fundamental type. vector_traits defines how fundamentals and 'xel' data are to be vectorized. with the types defined by vector_traits, a system of type names is introduced which uses a set of patterns:
- 'ele' stands for 'elementary', the type of an aggregate's component
- 'nd' stands for 'n-dimensional', a type of an aggregate of one or more components of a given elementary type.
- 'v' suffix indicates a 'simdized' type, vspline uses Vc::SimdArrays and vigra::TinyVectors of Vc::SimdArrays if Vc is used and the type can be used with Vc::SimdArray, and the equivalent types using vspline::simd_type instead of Vc::SimdArray otherwise. the unspecialized definition of class vector_traits will vectorize by concatenating instances of T into the type simd_traits produces, taking, per default, as many T as the default_size given there. This will work with any type T, even though it makes most sense with fundamentals.
Definition at line 343 of file vector.h.
◆ ele_type
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ ele_v
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ nd_ele_type
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ nd_ele_v
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ type
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ vector
template<typename T , size_t _vsize = 0, typename Enable = void>
template<typename U , size_t sz>
◆ anonymous enum
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ anonymous enum
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ anonymous enum
template<typename T , size_t _vsize = 0, typename Enable = void>
◆ anonymous enum
template<typename T , size_t _vsize = 0, typename Enable = void>
The documentation for this struct was generated from the following file: