Functions for loading Vec's from memory.
- See also
- Masked Memory
|
template<size_t SIMD_WIDTH, typename T > |
static Vec< T, SIMD_WIDTH > | simd::load (const T *const p) |
| Loads a Vec from aligned memory.
|
|
template<typename T , size_t SIMD_WIDTH> |
static void | simd::load (const T *const p, Vec< T, SIMD_WIDTH > inVecs[], size_t numInVecs) |
| Loads multiple successive Vec's from aligned memory.
|
|
template<size_t SIMD_WIDTH, typename T > |
static Vec< T, SIMD_WIDTH > | simd::loadu (const T *const p) |
| Loads a Vec from unaligned memory.
|
|
template<typename T , size_t SIMD_WIDTH> |
static void | simd::loadu (const T *const p, Vec< T, SIMD_WIDTH > inVecs[], size_t numInVecs) |
| Loads multiple successive Vec's from unaligned memory.
|
|
◆ load() [1/2]
template<size_t SIMD_WIDTH, typename T >
static Vec< T, SIMD_WIDTH > simd::load |
( |
const T *const | p | ) |
|
|
inlinestatic |
Loads a Vec from aligned memory.
The memory location must be aligned to the SIMD_WIDTH
.
- Note
- The template argument order of
T
and SIMD_WIDTH
is reversed so that T
can be omitted in instantiation.
- Parameters
-
[in] | p | pointer to the aligned memory location to load from |
- Returns
- Vec with the loaded values
◆ load() [2/2]
template<typename T , size_t SIMD_WIDTH>
static void simd::load |
( |
const T *const | p, |
|
|
Vec< T, SIMD_WIDTH > | inVecs[], |
|
|
size_t | numInVecs ) |
|
inlinestatic |
Loads multiple successive Vec's from aligned memory.
The memory location must be aligned to the SIMD_WIDTH.
- Parameters
-
[in] | p | pointer to the aligned memory location to load from |
[out] | inVecs | array of Vec's to store the loaded values in |
| numInVecs | number of Vec's to load |
◆ loadu() [1/2]
template<size_t SIMD_WIDTH, typename T >
static Vec< T, SIMD_WIDTH > simd::loadu |
( |
const T *const | p | ) |
|
|
inlinestatic |
Loads a Vec from unaligned memory.
In contrast to load(const T *const p), the memory location does not need to be aligned to any boundary.
- Note
- The template argument order of
T
and SIMD_WIDTH
is reversed so that T
can be omitted in instantiation.
- Parameters
-
[in] | p | pointer to the memory location to load from |
- Returns
- Vec with the loaded values
◆ loadu() [2/2]
template<typename T , size_t SIMD_WIDTH>
static void simd::loadu |
( |
const T *const | p, |
|
|
Vec< T, SIMD_WIDTH > | inVecs[], |
|
|
size_t | numInVecs ) |
|
inlinestatic |
Loads multiple successive Vec's from unaligned memory.
In contrast to load(const T *const, Vec<T, SIMD_WIDTH>[], size_t), the memory location does not need to be aligned to any boundary.
- Parameters
-
[in] | p | pointer to the memory location to load from |
[out] | inVecs | array of Vec's to store the loaded values in |
| numInVecs | number of Vec's to load |