vppinfra: more avx512 inlines (compress, expand, from, is_equal_mask)
[vpp.git] / src / vppinfra / vector.h
index 8b08db2..d5bc955 100644 (file)
@@ -155,6 +155,15 @@ typedef u32 u32x _vector_size (8);
 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
@@ -168,10 +177,7 @@ typedef u64 u64x _vector_size (8);
 #include <vppinfra/vector_avx2.h>
 #endif
 
-#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  */
+#if defined(__AVX512F__)
 #include <vppinfra/vector_avx512.h>
 #endif