summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-09-22 15:28:29 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-09-23 18:15:27 +0000
commit4dc098f961064d0de1db9ba7245540e3b94a9912 (patch)
tree0ce4436873a45589c3f3ed4e2bb73f13a6c18068 /src/vppinfra
parent192c55f2e7bcc3de31368dfa853f1d21534ce47c (diff)
classify: use AVX-512 to calculate hash on x86
Type:improvement Change-Id: I9f9f16eabf64203db11cd4338948d76ca5e0ef12 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/vector_avx2.h3
-rw-r--r--src/vppinfra/vector_avx512.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/vppinfra/vector_avx2.h b/src/vppinfra/vector_avx2.h
index f38a3bdae73..7226c230e68 100644
--- a/src/vppinfra/vector_avx2.h
+++ b/src/vppinfra/vector_avx2.h
@@ -192,6 +192,9 @@ u8x32_shuffle (u8x32 v, u8x32 m)
#define u8x32_align_right(a, b, imm) \
(u8x32) _mm256_alignr_epi8 ((__m256i) a, (__m256i) b, imm)
+#define u64x4_align_right(a, b, imm) \
+ (u64x4) _mm256_alignr_epi64 ((__m256i) a, (__m256i) b, imm)
+
static_always_inline u32
u32x8_sum_elts (u32x8 sum8)
{
diff --git a/src/vppinfra/vector_avx512.h b/src/vppinfra/vector_avx512.h
index 5da490162d0..a82231ac025 100644
--- a/src/vppinfra/vector_avx512.h
+++ b/src/vppinfra/vector_avx512.h
@@ -205,6 +205,9 @@ u8x64_shuffle (u8x64 v, u8x64 m)
#define u8x64_align_right(a, b, imm) \
(u8x64) _mm512_alignr_epi8 ((__m512i) a, (__m512i) b, imm)
+#define u64x8_align_right(a, b, imm) \
+ (u64x8) _mm512_alignr_epi64 ((__m512i) a, (__m512i) b, imm)
+
static_always_inline u32
u32x16_sum_elts (u32x16 sum16)
{