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

Description

Functions for masked loading and storing Vec's from and to memory.

See also
Memory

Functions

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::mask_load (const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const T *const p)
 Masked versions of load(const T *const).
 
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::mask_loadu (const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const T *const p)
 Masked version of loadu(const T *const).
 
template<typename T , size_t SIMD_WIDTH>
static void simd::mask_store (T *const p, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
 Masked version of store(T *const, const Vec<T, SIMD_WIDTH> &).
 
template<typename T , size_t SIMD_WIDTH>
static void simd::mask_storeu (T *const p, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
 Masked version of storeu(T *const, const Vec<T, SIMD_WIDTH> &).
 
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::maskz_load (const Mask< T, SIMD_WIDTH > &k, const T *const p)
 Zero-masked version of load(const T *const).
 
template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::maskz_loadu (const Mask< T, SIMD_WIDTH > &k, const T *const p)
 Zero-masked version of loadu(const T *const).
 

Function Documentation

◆ mask_load()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::mask_load ( const Vec< T, SIMD_WIDTH > & src,
const Mask< T, SIMD_WIDTH > & k,
const T *const p )
inlinestatic

Masked versions of load(const T *const).

Does not touch memory if the corresponding mask element is false, so may be used to prevent page faults where a non-masked load would cause a fault.

◆ mask_loadu()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::mask_loadu ( const Vec< T, SIMD_WIDTH > & src,
const Mask< T, SIMD_WIDTH > & k,
const T *const p )
inlinestatic

Masked version of loadu(const T *const).

Does not touch memory if the corresponding mask element is false, so may be used to prevent page faults where a non-masked load would cause a fault.

◆ mask_store()

template<typename T , size_t SIMD_WIDTH>
static void simd::mask_store ( T *const p,
const Mask< T, SIMD_WIDTH > & k,
const Vec< T, SIMD_WIDTH > & a )
inlinestatic

Masked version of store(T *const, const Vec<T, SIMD_WIDTH> &).

Only stores the elements for which the corresponding mask element is true.

◆ mask_storeu()

template<typename T , size_t SIMD_WIDTH>
static void simd::mask_storeu ( T *const p,
const Mask< T, SIMD_WIDTH > & k,
const Vec< T, SIMD_WIDTH > & a )
inlinestatic

Masked version of storeu(T *const, const Vec<T, SIMD_WIDTH> &).

Only stores the elements for which the corresponding mask element is true.

◆ maskz_load()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::maskz_load ( const Mask< T, SIMD_WIDTH > & k,
const T *const p )
inlinestatic

Zero-masked version of load(const T *const).

Does not touch memory if the corresponding mask element is false, so may be used to prevent page faults where a non-masked load would cause a fault.

◆ maskz_loadu()

template<typename T , size_t SIMD_WIDTH>
static Vec< T, SIMD_WIDTH > simd::maskz_loadu ( const Mask< T, SIMD_WIDTH > & k,
const T *const p )
inlinestatic

Zero-masked version of loadu(const T *const).

Does not touch memory if the corresponding mask element is false, so may be used to prevent page faults where a non-masked load would cause a fault.