added more shuffle operations for AVX2

This commit is contained in:
Ahmet Inan 2024-02-14 10:48:45 +01:00
commit 41b8abaf83
2 changed files with 30 additions and 0 deletions

View file

@ -1178,6 +1178,14 @@ inline SIMD<int8_t, 32> vshuf(SIMD<int8_t, 32> a, SIMD<uint8_t, 32> b)
return tmp;
}
template <>
inline SIMD<uint32_t, 8> vshuf(SIMD<uint32_t, 8> a, SIMD<uint32_t, 8> b)
{
SIMD<uint32_t, 8> tmp;
tmp.m = _mm256_permutevar8x32_epi32(a.m, b.m);
return tmp;
}
template <>
inline SIMD<float, 8> vshuf(SIMD<float, 8> a, SIMD<uint32_t, 8> b)
{