summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vector.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-04-16 00:18:34 +0200
committerDave Barach <openvpp@barachs.net>2018-04-25 15:36:04 +0000
commitc576622667199db906efa3110ad25e552b3a0890 (patch)
treed6ffda4bf9b096f9ee1759d57e79d36dc51f27d0 /src/vppinfra/vector.h
parent4a6d02337b9058182172f19df894ad2e18e6ac68 (diff)
dpdk: complete rework of the dpdk-input node
Change-Id: If174d189de40e6f9ffae99997bba93a2519d9fda Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/vector.h')
-rw-r--r--src/vppinfra/vector.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/vppinfra/vector.h b/src/vppinfra/vector.h
index 094cc85e22b..fcff5e79d95 100644
--- a/src/vppinfra/vector.h
+++ b/src/vppinfra/vector.h
@@ -58,8 +58,11 @@
#define CLIB_HAVE_VEC128
#endif
-#if defined (__AVX__)
+#if defined (__AVX2__)
#define CLIB_HAVE_VEC256
+#if defined (__clang__) && __clang_major__ < 4
+#undef CLIB_HAVE_VEC256
+#endif
#endif
#if defined (__AVX512F__)
@@ -179,7 +182,7 @@ t##s##x##c##_sub (t##s##x##c v1, t##s##x##c v2) \
foreach_vec
#undef _
-/* this macro generate _splat inline funcitons for each scalar vector type */
+/* this macro generate _splat inline functions for each scalar vector type */
#define _(t, s, c) \
static_always_inline t##s##x##c \
t##s##x##c##_splat (t##s x) \
@@ -192,13 +195,21 @@ t##s##x##c##_splat (t##s x) \
\
return r; \
}
- foreach_int_vec foreach_uint_vec
+ foreach_vec128i foreach_vec128u
#undef _
#if defined (__SSE4_2__) && __GNUC__ >= 4
#include <vppinfra/vector_sse42.h>
#endif
+#if defined (__AVX2__)
+#include <vppinfra/vector_avx2.h>
+#endif
+
+#if defined (__AVX512F__)
+#include <vppinfra/vector_avx512.h>
+#endif
+
#if defined (__ALTIVEC__)
#include <vppinfra/vector_altivec.h>
#endif