_mm256_mask_compress_epi16
Classification
AVX-512, Swizzle, CPUID Test: AVX512_VBMI2
Header File
Instruction
VPCOMPRESSW ymm {k}, ymm
Synopsis
_mm256_mask_compress_epi16(__m256i src, __mmask16 k, __m256i a);
Description
Contiguously store the active 16-bit integers in "a" (those with their respective bit set in writemask "k") to "dst", and pass through the remaining elements from "src".
Operation
size := 16
m := 0
FOR j := 0 to 15
i := j*16
IF k[j]
dst[m+size-1:m] := a[i+15:i]
m := m + size
FI
ENDFOR
dst[255:m] := src[255:m]
dst[MAX:256] := 0