Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Default huge page size to the regular page size
[vpp.git]
/
src
/
vppinfra
/
vector_avx512.h
diff --git
a/src/vppinfra/vector_avx512.h
b/src/vppinfra/vector_avx512.h
index
4aee8d1
..
f69c67e
100644
(file)
--- a/
src/vppinfra/vector_avx512.h
+++ b/
src/vppinfra/vector_avx512.h
@@
-28,7
+28,7
@@
_(f,32,8,ps) _(f,64,4,pd)
/* splat, load_unaligned, store_unaligned, is_all_zero, is_equal,
_(f,32,8,ps) _(f,64,4,pd)
/* splat, load_unaligned, store_unaligned, is_all_zero, is_equal,
- is_all_equal */
+ is_all_equal
, is_zero_mask
*/
#define _(t, s, c, i) \
static_always_inline t##s##x##c \
t##s##x##c##_splat (t##s x) \
#define _(t, s, c, i) \
static_always_inline t##s##x##c \
t##s##x##c##_splat (t##s x) \
@@
-53,6
+53,11
@@
t##s##x##c##_is_equal (t##s##x##c a, t##s##x##c b) \
static_always_inline int \
t##s##x##c##_is_all_equal (t##s##x##c v, t##s x) \
{ return t##s##x##c##_is_equal (v, t##s##x##c##_splat (x)); } \
static_always_inline int \
t##s##x##c##_is_all_equal (t##s##x##c v, t##s x) \
{ return t##s##x##c##_is_equal (v, t##s##x##c##_splat (x)); } \
+\
+static_always_inline u##c \
+t##s##x##c##_is_zero_mask (t##s##x##c v) \
+{ return _mm512_test_##i##_mask ((__m512i) v, (__m512i) v); } \
+
foreach_avx512_vec512i foreach_avx512_vec512u
#undef _
foreach_avx512_vec512i foreach_avx512_vec512u
#undef _