Functions for initializing Vec's.
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::int2bits (const uint64_t a) |
| Sets all bits of each element of a Vec to the corresponding bit of an integer.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::int2msb (const uint64_t a) |
| Sets the most significant bit of each element of a Vec to the corresponding bit of an integer.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::iota () |
| Creates a Vec with sequentially increasing numbers, starting with 0.
|
|
template<typename T , size_t SIMD_WIDTH> |
static uint64_t | simd::msb2int (const Vec< T, SIMD_WIDTH > &a) |
| Collects the most significant bit of each element of a Vec into an integer.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::set1 (const dont_deduce< T > a) |
| Returns a Vec with all elements set to the same value.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::setmax () |
| Sets all elements of a Vec to the maximum value of the element type.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::setmin () |
| Sets all elements of a Vec to the minimum value of the element type.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::setnegunity () |
| Sets all elements of a Vec to the value -1.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::setones () |
| Sets all bits of a Vec to 1.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::setunity () |
| Sets all elements of a Vec to the value 1.
|
|
template<typename T , size_t SIMD_WIDTH> |
static Vec< T, SIMD_WIDTH > | simd::setzero () |
| Returns a Vec with all elements set to zero.
|
|
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::int2msb |
( |
const uint64_t | a | ) |
|
|
inlinestatic |
Sets the most significant bit of each element of a Vec to the corresponding bit of an integer.
The bottom n bits of the input integer are used, where n is the number of elements in the Vec. All other bits of the input are ignored.
All other bits of the output elements are set to zero.
- Parameters
-
- Returns
- Vec with the most significant bit of each element set to the corresponding bit of the input integer
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::iota |
( |
| ) |
|
|
inlinestatic |
Creates a Vec with sequentially increasing numbers, starting with 0.
The sequence starts from the lowest element of the Vec, i.e. the lowest element of the Vec is set to 0, the next element to 1, and so on.
- Returns
- Vec containing sequentially increasing numbers