Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
crypto-native: fix issues detected by coiverity
[vpp.git]
/
src
/
vppinfra
/
vector.h
diff --git
a/src/vppinfra/vector.h
b/src/vppinfra/vector.h
index
906d8d8
..
33e2b6a
100644
(file)
--- a/
src/vppinfra/vector.h
+++ b/
src/vppinfra/vector.h
@@
-66,7
+66,7
@@
#endif
#endif
#endif
#endif
-#if defined (__AVX512
F
__)
+#if defined (__AVX512
BITALG
__)
#define CLIB_HAVE_VEC512
#endif
#define CLIB_HAVE_VEC512
#endif
@@
-155,6
+155,15
@@
typedef u32 u32x _vector_size (8);
typedef u64 u64x _vector_size (8);
#endif
typedef u64 u64x _vector_size (8);
#endif
+/* universal inlines */
+#define _(t, s, c) \
+static_always_inline t##s##x##c \
+t##s##x##c##_zero () \
+{ return (t##s##x##c) {}; } \
+
+foreach_vec
+#undef _
+
#undef _vector_size
#define VECTOR_WORD_TYPE(t) t##x
#undef _vector_size
#define VECTOR_WORD_TYPE(t) t##x
@@
-168,7
+177,10
@@
typedef u64 u64x _vector_size (8);
#include <vppinfra/vector_avx2.h>
#endif
#include <vppinfra/vector_avx2.h>
#endif
-#if defined (__AVX512F__)
+#if defined (__AVX512BITALG__)
+/* Due to power level transition issues, we don't preffer AVX-512 on
+ Skylake X and CascadeLake CPUs, AVX512BITALG is introduced on
+ icelake CPUs */
#include <vppinfra/vector_avx512.h>
#endif
#include <vppinfra/vector_avx512.h>
#endif