Developer Guide and Reference

Contents

_mm_permutevar_ps, _mm256_permutevar_ps

Permutes float32 values into a 256-bit or 128-bit destination vector. The corresponding Intel® AVX instruction is
VPERMILPS
.

Syntax

extern __m256 _mm256_permutevar_ps(__m256 m1, __m256i control);
extern __m128 _mm_permutevar_ps(__m128 m1, __m128i control);
Arguments
m1
a 256-bit or 128-bit float32 vector
control
a vector with 2-bit control fields, one for each corresponding element of the source vector
  • for the 256-bit
    m1
    source vector this
    control
    vector contains eight 2-bit control fields
  • for the 128-bit
    m1
    source vector this
    control
    vector contains four 2-bit control fields
Description
Permutes single-precision floating-point values in the source vector,
m1
, according to the the 2-bit control fields in the low bytes of corresponding elements of a shuffle control. The result is stored in a destination vector.
Returns
A 256-bit or 128-bit float32 vector with permuted values.