T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
Load

Description

Functions for loading Vec's from memory.

See also
Masked Memory

Functions

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.
 

Function Documentation

◆ 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]ppointer 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]ppointer to the aligned memory location to load from
[out]inVecsarray of Vec's to store the loaded values in
numInVecsnumber 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]ppointer 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]ppointer to the memory location to load from
[out]inVecsarray of Vec's to store the loaded values in
numInVecsnumber of Vec's to load