Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 7/13/2023
Public
Document Table of Contents

_mm_maskstore_epi32/64, _mm256_maskstore_epi32/64

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

Syntax

extern void _mm_maskstore_epi32(int * addr, __m128i vmask, __m128i val);

extern void _mm256_maskstore_epi32(int * addr, __m256i vmask, __m256i val);

extern void _mm_maskstore_epi64(__int64 * addr, __m128i vmask, __m128i val);

extern void _mm256_maskstore_epi64(__int64 * addr, __m256i vmask, __m256i val);

Arguments

addr

pointer to data to be loaded

vmask

vector mask. If element of vmask is 0, then the value in the memory is unchanged

val

location from where the elements are written to vector located in memory and referenced by "addr"

Description

Conditionally stores 32/64-bit data elements from the source vector into the corresponding elements of the vector in memory referenced by addr. If an element of mask is 0, corresponding element of the result vector in memory stays unchanged. Only the most significant bit of each element in the vector mask is used.

Returns

Result of the masked store operation.