Template Function wt::m::permute2f

Function Documentation

template<int imm, Quantity Q, std::size_t N>
inline auto wt::m::permute2f(const wide_vector<8, N, Q> &a, const wide_vector<8, N, Q> &b) noexcept

This implements an op similar to AVX’s permute2f128 (for 256bit single-precision input). Shuffles lower and upper halfs of the wide vector using control mask imm. The value of lower/upper 4-bits of imm select the source for the lower/upper half of the return value:

  • imm==0 : lower half of a

  • imm==1 : upper half of a

  • imm==2 : lower half of b

  • imm==3 : upper half of b

  • imm==8 : 0 Only supported for 8-wide wide vectors.