T-SIMD v31.1.0
A C++ template SIMD library
|
Zip, unzip and unpack functions.
Functions | |
template<size_t PART, size_t NUM_ELEMS, typename T , size_t SIMD_WIDTH> | |
static Vec< T, SIMD_WIDTH > | simd::unpack (const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b) |
Interleaves blocks of elements from the high or low half of two Vec's. | |
template<size_t PART, size_t NUM_ELEMS, typename T , size_t SIMD_WIDTH> | |
static Vec< T, SIMD_WIDTH > | simd::unpack16 (const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b) |
Interleaves blocks of elements from the high or low half of each 16-byte lane of two Vec's. | |
template<size_t NUM_ELEMS, typename T , size_t SIMD_WIDTH> | |
static void | simd::unzip (const Vec< T, SIMD_WIDTH > a, const Vec< T, SIMD_WIDTH > b, Vec< T, SIMD_WIDTH > &l, Vec< T, SIMD_WIDTH > &h) |
Deinterleaves blocks of elements two Vec's. | |
template<size_t NUM_ELEMS, typename T , size_t SIMD_WIDTH> | |
static void | simd::zip (const Vec< T, SIMD_WIDTH > a, const Vec< T, SIMD_WIDTH > b, Vec< T, SIMD_WIDTH > &l, Vec< T, SIMD_WIDTH > &h) |
Interleaves blocks of elements of two Vec's. | |
template<size_t NUM_ELEMS, typename T , size_t SIMD_WIDTH> | |
static void | simd::zip16 (const Vec< T, SIMD_WIDTH > a, const Vec< T, SIMD_WIDTH > b, Vec< T, SIMD_WIDTH > &l, Vec< T, SIMD_WIDTH > &h) |
Interleaves blocks of elements of each 16-byte lane of two Vec's. | |
|
inlinestatic |
Interleaves blocks of elements from the high or low half of two Vec's.
This function interleaves blocks of elements from the high or low half of two Vec's, starting with the lowest block of the selected half of the first input Vec.
To get both halves of the input Vec's interleaved, use zip().
Example: TODO?
PART | selects which half of the input Vec's to use. A value of 0 selects the low half, a value of 1 selects the high half |
NUM_ELEMS | number of elements in a block, this must be a power of two (including 1) and be at most half of one Vec |
|
inlinestatic |
Interleaves blocks of elements from the high or low half of each 16-byte lane of two Vec's.
This function interleaves blocks of elements from the high or low half of each 16-byte lane of two Vec's, starting with the lowest block of the selected half of the first input Vec.
This function is the lane-oriented equivalent of unpack().
If the blocks of elements to be interleaved are larger than half of a 16-byte lane the behavior of this function is undefined.
To get both halves of the input Vec's interleaved, use zip16().
Example: TODO?
PART | selects which half of the lanes of the input Vec's to use. A value of 0 selects the low half, a value of 1 selects the high half |
NUM_ELEMS | number of elements in a block, must be a power of two (including 1) and be at most half of one 16-byte lane of one Vec (i.e. at most 8 bytes) |
|
inlinestatic |
|
inlinestatic |
Interleaves blocks of elements of two Vec's.
This function interleaves blocks of elements from two Vec's, starting with the lowest block of the first input Vec. The interleaved blocks are returned in two output Vec's.
This function is semantically equivalent to calling unpack() twice for both parts, but may be more efficient on some platforms (such as arm NEON).
Example: TODO?
NUM_ELEMS | number of elements in a block, must be a power of two (including 1) and be at most half of one Vec |
|
inlinestatic |
Interleaves blocks of elements of each 16-byte lane of two Vec's.
This function interleaves blocks of elements from the high or low half of each 16-byte lane of two Vec's, starting with the lowest block of the selected half of the first input Vec. The interleaved blocks are returned in two output Vec's.
This function is the lane-oriented equivalent of zip().
This function is semantically equivalent to calling unpack16() twice for both parts, but may be more efficient on some platforms (such as arm NEON).
Example: TODO?
NUM_ELEMS | number of elements in a block, must be a power of two (including 1) and be at most half of one Vec |