diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vppinfra/vector_neon.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h index 6a3e64e946d..6ca9c0b90a0 100644 --- a/src/vppinfra/vector_neon.h +++ b/src/vppinfra/vector_neon.h @@ -21,6 +21,30 @@ #define u16x8_sub_saturate(a,b) vsubq_u16(a,b) #define i16x8_sub_saturate(a,b) vsubq_s16(a,b) +always_inline int +u8x16_is_all_zero (u8x16 x) +{ + return !(vaddvq_u8 (x)); +} + +always_inline int +u16x8_is_all_zero (u16x8 x) +{ + return !(vaddvq_u16 (x)); +} + +always_inline int +u32x4_is_all_zero (u32x4 x) +{ + return !(vaddvq_u32 (x)); +} + +always_inline int +u64x2_is_all_zero (u64x2 x) +{ + return !(vaddvq_u64 (x)); +} + /* Converts all ones/zeros compare mask to bitmap. */ always_inline u32 u8x16_compare_byte_mask (u8x16 x) |