summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2020-03-28 08:40:25 +0000
committerDamjan Marion <dmarion@me.com>2020-03-30 12:57:32 +0000
commit0c7aa7ab54dd6c9074079d589d0c32873a1085bb (patch)
treefa3ac74c9e0c8f2ed3bcc6bce05ede887c19b88a /src
parent0937fdfa86ce61c54f37d142aabae45463a959e5 (diff)
vppinfra: add support for avx512 alignment version of load and store
Type: improvement Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Change-Id: Idfec9cb9370a8cf4966d3fdfa440496f21e17005
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/vector_avx512.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vppinfra/vector_avx512.h b/src/vppinfra/vector_avx512.h
index 0665a23fe77..8a82650e1e8 100644
--- a/src/vppinfra/vector_avx512.h
+++ b/src/vppinfra/vector_avx512.h
@@ -35,6 +35,14 @@ t##s##x##c##_splat (t##s x) \
{ return (t##s##x##c) _mm512_set1_##i (x); } \
\
static_always_inline t##s##x##c \
+t##s##x##c##_load_aligned (void *p) \
+{ return (t##s##x##c) _mm512_load_si512 (p); } \
+\
+static_always_inline void \
+t##s##x##c##_store_aligned (t##s##x##c v, void *p) \
+{ _mm512_store_si512 ((__m512i *) p, (__m512i) v); } \
+\
+static_always_inline t##s##x##c \
t##s##x##c##_load_unaligned (void *p) \
{ return (t##s##x##c) _mm512_loadu_si512 (p); } \
\