_mm512_mask_extracti32x4_epi32
Classification
AVX-512, Swizzle, CPUID Test: AVX512F
Header File
immintrin.h
Instruction
VEXTRACTI32X4 xmm {k}, zmm, imm8
Synopsis
 _mm512_mask_extracti32x4_epi32(__m128i src, __mmask8 k, __m512i a, int imm8);
Description
Extract 128 bits (composed of 4 packed 32-bit integers) from "a", selected with "imm8", and store the results in "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
CASE imm8[1:0] OF
0: tmp[127:0] := a[127:0]
1: tmp[127:0] := a[255:128]
2: tmp[127:0] := a[383:256]
3: tmp[127:0] := a[511:384]
ESAC
FOR j := 0 to 3
	i := j*32
	IF k[j]
		dst[i+31:i] := tmp[i+31:i]
	ELSE
		dst[i+31:i] := src[i+31:i]
	FI
ENDFOR
dst[MAX:128] := 0