_mm256_maskz_lzcnt_epi32
Classification
AVX-512, Bit Manipulation, CPUID Test: AVX512CD
Header File
Instruction
VPLZCNTD ymm {z}, ymm
Synopsis
_mm256_maskz_lzcnt_epi32(__mmask8 k, __m256i a);
Description
Counts the number of leading zero bits in each packed 32-bit integer in "a", and store the results in "dst" using zeromask "k" (elements are zeroed out when the corresponding mask bit is not set).
Operation
FOR j := 0 to 7
i := j*32
IF k[j]
tmp := 31
dst[i+31:i] := 0
DO WHILE (tmp >= 0 AND a[i+tmp] == 0)
tmp := tmp - 1
dst[i+31:i] := dst[i+31:i] + 1
OD
ELSE
dst[i+31:i] := 0
FI
ENDFOR
dst[MAX:256] := 0