summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vector_avx512.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/vector_avx512.h')
-rw-r--r--src/vppinfra/vector_avx512.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vppinfra/vector_avx512.h b/src/vppinfra/vector_avx512.h
index 3505961dca5..e71a8a70aa9 100644
--- a/src/vppinfra/vector_avx512.h
+++ b/src/vppinfra/vector_avx512.h
@@ -322,9 +322,16 @@ u8x64_mask_blend (u8x64 a, u8x64 b, u64 mask)
}
static_always_inline u8x64
-u8x64_permute (u8x64 v, u8x64 idx)
+u8x64_permute (u8x64 idx, u8x64 a)
{
- return (u8x64) _mm512_permutexvar_epi8 ((__m512i) v, (__m512i) idx);
+ return (u8x64) _mm512_permutexvar_epi8 ((__m512i) idx, (__m512i) a);
+}
+
+static_always_inline u8x64
+u8x64_permute2 (u8x64 idx, u8x64 a, u8x64 b)
+{
+ return (u8x64) _mm512_permutex2var_epi8 ((__m512i) a, (__m512i) idx,
+ (__m512i) b);
}
#define _(t, m, e, p, it) \
@@ -436,6 +443,14 @@ u16x8_compress (u16x8 v, u8 mask)
}
#endif
+static_always_inline u64
+u64x8_hxor (u64x8 v)
+{
+ v ^= u64x8_align_right (v, v, 4);
+ v ^= u64x8_align_right (v, v, 2);
+ return v[0] ^ v[1];
+}
+
static_always_inline void
u32x16_transpose (u32x16 m[16])
{