|
YAKL_INLINE T & | operator() (uint i) |
| Returns a modifiable reference to the data at the requested index. More...
|
|
YAKL_INLINE T | operator() (uint i) const |
| Returns a non-modifiable value to the data at the requested index. More...
|
|
template<class TLOC > |
YAKL_INLINE Pack< T, N > & | operator*= (Pack< TLOC, N > rhs) |
|
template<class TLOC , typename std::enable_if< std::is_arithmetic< TLOC >::value, bool >::type = false> |
YAKL_INLINE Pack< T, N > & | operator*= (TLOC rhs) |
|
template<class TLOC > |
YAKL_INLINE Pack< T, N > & | operator+= (Pack< TLOC, N > rhs) |
|
template<class TLOC , typename std::enable_if< std::is_arithmetic< TLOC >::value, bool >::type = false> |
YAKL_INLINE Pack< T, N > & | operator+= (TLOC rhs) |
|
template<class TLOC > |
YAKL_INLINE Pack< T, N > & | operator-= (Pack< TLOC, N > rhs) |
|
template<class TLOC , typename std::enable_if< std::is_arithmetic< TLOC >::value, bool >::type = false> |
YAKL_INLINE Pack< T, N > & | operator-= (TLOC rhs) |
|
template<class TLOC > |
YAKL_INLINE Pack< T, N > & | operator/= (Pack< TLOC, N > rhs) |
|
template<class TLOC , typename std::enable_if< std::is_arithmetic< TLOC >::value, bool >::type = false> |
YAKL_INLINE Pack< T, N > & | operator/= (TLOC rhs) |
|
template<class TLOC , typename std::enable_if< std::is_arithmetic< TLOC >::value, bool >::type = false> |
YAKL_INLINE Pack< T, N > & | operator= (TLOC rhs) |
|
template<class T, unsigned int N>
class yakl::simd::Pack< T, N >
The Pack class performs encourages vectorization by performing operations Packs of known size.
- Parameters
-
T | Data type of the Pack |
N | Number of elements in the Pack object |
Packs can be used by the user in order to encourage compilers to SIMD vectorize in cases where the compiler is having trouble determining when vector instructions can be generated.
For straighforward mathematical operations, simply apply that operation to the Pack object(s).
Whenever different behavior is needed for different members of the Pack object (e.g., if-statement), the user must iterate explicitly over the pack with yakl::iterate_over_pack.