Developer Guide and Reference

Contents

_mm_maskload_epi32/64, _mm256_maskload_epi32/64

Conditionally loads dwords/qwords from the specified memory location, depending on the mask bits associated with each data element. The corresponding Intel® AVX2 instruction is
VPMASKMOVD
or
VPMASKMOVQ
.

Syntax

extern __m128i _mm_maskload_epi32(int const * addr, __m128i mask);
extern __m256i _mm256_maskload_epi32(int const * addr, __m256i mask);
extern __m128i _mm_maskload_epi64(__int64 const * addr, __m128i mask);
extern __m256i _mm256_maskload_epi64(__int64 const * addr, __m256i mask);
Arguments
addr
pointer to data to be loaded
mask
integer source vector
Description
Conditionally loads 32/64-bit data elements from the memory referenced by the
addr
and stores it into the corresponding data element of the result vector. If an element of mask is 0, the 32/64-bit zero is written to the corresponding element of the result vector. The mask bit for each data element is the most significant bit of that element in mask.
Returns
Result of the masked load operation.