_mm512_2intersect_epi32
Classification
AVX-512, Mask, CPUID Test: AVX512_VP2INTERSECT
Header File
Instruction
VP2INTERSECTD k, zmm, zmm
Synopsis
_mm512_2intersect_epi32(__m512i a, __m512i b, __mmask16* k1, __mmask16* k2);
Description
Compute intersection of packed 32-bit integer vectors "a" and "b", and store indication of match in the corresponding bit of two mask registers specified by "k1" and "k2". A match in corresponding elements of "a" and "b" is indicated by a set bit in the corresponding bit of the mask registers.
Operation
MEM[k1+15:k1] := 0
MEM[k2+15:k2] := 0
FOR i := 0 TO 15
FOR j := 0 TO 15
match := (a.dword[i] == b.dword[j] ? 1 : 0)
MEM[k1+15:k1].bit[i] |= match
MEM[k2+15:k2].bit[j] |= match
ENDFOR
ENDFOR