Developer Guide and Reference

Contents

_mm256_permute4x64_epi64

Permutes quadword integer values of the source vector into the destination vector. The corresponding Intel® AVX2 instruction is
VPERMQ
.

Syntax

extern __m256i _mm256_permute4x64_epi64(__m256i val, const int control);
Arguments
val
the vector of 64-bit quadword integer elements to be permuted
control
an integer specified as an 8-bit immediate
Description
Use two-bit index values in the immediate byte to select a qword integer element from the source vector
val
. The result element is copied to the corresponding element of destination vector. The intrinsic allows to copy the same element of the source vector to more than one element of the destination vector.
Below is the pseudo-code for the intrinsic:
RESULT[63:0] <- (VAL[255:0] >> (CONTROL[1:0] * 64))[63:0]; RESULT[127:64] <- (VAL[255:0] >> (CONTROL[3:2] * 64))[63:0]; RESULT[191:128] <- (VAL[255:0] >> (CONTROL[5:4] * 64))[63:0]; RESULT[255:192] <- (VAL[255:0] >> (CONTROL[7:6] * 64))[63:0];
Returns
Result of the permute operation.