_mm512_mask_permute_pd
Classification
AVX-512, Swizzle, CPUID Test: AVX512F
Header File
Instruction
VPERMILPD zmm {k}, zmm, imm8
Synopsis
_mm512_mask_permute_pd(__m512d src, __mmask8 k, __m512d a, const int imm8);
Description
Shuffle double-precision (64-bit) floating-point elements in "a" within 128-bit lanes using the control in "imm8", and store the results in "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
IF (imm8[0] == 0) tmp_dst[63:0] := a[63:0]; FI
IF (imm8[0] == 1) tmp_dst[63:0] := a[127:64]; FI
IF (imm8[1] == 0) tmp_dst[127:64] := a[63:0]; FI
IF (imm8[1] == 1) tmp_dst[127:64] := a[127:64]; FI
IF (imm8[2] == 0) tmp_dst[191:128] := a[191:128]; FI
IF (imm8[2] == 1) tmp_dst[191:128] := a[255:192]; FI
IF (imm8[3] == 0) tmp_dst[255:192] := a[191:128]; FI
IF (imm8[3] == 1) tmp_dst[255:192] := a[255:192]; FI
IF (imm8[4] == 0) tmp_dst[319:256] := a[319:256]; FI
IF (imm8[4] == 1) tmp_dst[319:256] := a[383:320]; FI
IF (imm8[5] == 0) tmp_dst[383:320] := a[319:256]; FI
IF (imm8[5] == 1) tmp_dst[383:320] := a[383:320]; FI
IF (imm8[6] == 0) tmp_dst[447:384] := a[447:384]; FI
IF (imm8[6] == 1) tmp_dst[447:384] := a[511:448]; FI
IF (imm8[7] == 0) tmp_dst[511:448] := a[447:384]; FI
IF (imm8[7] == 1) tmp_dst[511:448] := a[511:448]; FI
FOR j := 0 to 7
i := j*64
IF k[j]
dst[i+63:i] := tmp_dst[i+63:i]
ELSE
dst[i+63:i] := src[i+63:i]
FI
ENDFOR
dst[MAX:512] := 0