_mm256_mask_cmp_epu16_mask
Classification
AVX-512, Compare, CPUID Test: AVX512BW
Header File
Instruction
VPCMPUW k {k}, ymm, ymm, imm8
Synopsis
_mm256_mask_cmp_epu16_mask(__mmask16 k1, __m256i a, __m256i b, const int imm8);
Description
Compare packed unsigned 16-bit integers in "a" and "b" based on the comparison operand specified by "imm8", and store the results in mask vector "k" using zeromask "k1" (elements are zeroed out when the corresponding mask bit is not set).
Operation
CASE (imm8[2:0]) OF
0: OP := _MM_CMPINT_EQ
1: OP := _MM_CMPINT_LT
2: OP := _MM_CMPINT_LE
3: OP := _MM_CMPINT_FALSE
4: OP := _MM_CMPINT_NE
5: OP := _MM_CMPINT_NLT
6: OP := _MM_CMPINT_NLE
7: OP := _MM_CMPINT_TRUE
ESAC
FOR j := 0 to 15
i := j*16
IF k1[j]
k[j] := ( a[i+15:i] OP b[i+15:i] ) ? 1 : 0
ELSE
k[j] := 0
FI
ENDFOR
k[MAX:16] := 0