Intel® C++ Compiler 16.0 User and Reference Guide

_mm512_test_epi32_mask/ _mm512_mask_test_epi32_mask

Performs bitwise AND operation between int32 vectors. Corresponding instruction is VPTESTMD. This intrinsic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).

Syntax

Without Mask

extern __mmask16 __cdecl _mm512_test_epi32_mask(_m512i v2, _m512i v3);

With Mask

extern __mmask16 __cdecl _mm512_mask_test_epi32_mask(__mmask16 k1, _m512i v2, _m512i v3);

Parameters

v2

int32 vector used for the bitwise operation

v3

int32 vector also used for bitwise operation

k1

Writemask; only those elements of the source vectors with corresponding bit set to '1' in the k1 mask are computed and stored in the result

Description

Performs a bitwise AND operation between int32 vectors v2 and v3. The intrinsic uses the result to construct a 16-bit vector mask with a 0-bit for each element for which the result of the AND was zero, and a 1-bit where the result of the AND was not zero.

The masked variant has one additional argument: k1. Only those elements in the source registers with the corresponding bit set in vector mask k1 are used for computing.

Note

The writemask vector k1 does not perform the normal writemasking function for this intrinsic. While it does enable/disable comparisons, it does not block updating of the destination; instead, if a writemask bit is zero, the corresponding destination bit is set to zero.

Returns

Returns the vector mask result of the bitwise AND operation.