_mm_maskz_packus_epi32
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512BW
Header File
Instruction
VPACKUSDW xmm {z}, xmm, xmm
Synopsis
_mm_maskz_packus_epi32(__mmask8 k, __m128i a, __m128i b);
Description
Convert packed signed 32-bit integers from "a" and "b" to packed 16-bit integers using unsigned saturation, and store the results in "dst" using zeromask "k" (elements are zeroed out when the corresponding mask bit is not set).
Operation
tmp_dst[15:0] := SaturateU16(a[31:0])
tmp_dst[31:16] := SaturateU16(a[63:32])
tmp_dst[47:32] := SaturateU16(a[95:64])
tmp_dst[63:48] := SaturateU16(a[127:96])
tmp_dst[79:64] := SaturateU16(b[31:0])
tmp_dst[95:80] := SaturateU16(b[63:32])
tmp_dst[111:96] := SaturateU16(b[95:64])
tmp_dst[127:112] := SaturateU16(b[127:96])
FOR j := 0 to 7
i := j*16
IF k[j]
dst[i+15:i] := tmp_dst[i+15:i]
ELSE
dst[i+15:i] := 0
FI
ENDFOR
dst[MAX:128] := 0