From 61f325d195976cafac2cae2619b259c1f0013596 Mon Sep 17 00:00:00 2001 From: Sirshak Das Date: Fri, 3 Aug 2018 11:24:51 -0500 Subject: Add horizontal add (hadd) vector intrinsic via NEON. Having the NEON equivalent of u32x4_hadd for CLIB_HAVE_VEC128 Change-Id: I210f96f7ecb9b80b4753311a68e5e09ccda7e95b Signed-off-by: Sirshak Das Reviewed-by: Steve Capper Reviewed-by: Brian Brooks Reviewed-by: Yi He Verified-by: Lijian Zhang --- src/vppinfra/vector_neon.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h index 451c531d52d..adea39a14ec 100644 --- a/src/vppinfra/vector_neon.h +++ b/src/vppinfra/vector_neon.h @@ -134,6 +134,12 @@ u8x16_shuffle (u8x16 v, u8x16 m) return (u8x16) vqtbl1q_u8 (v, m); } +static_always_inline u32x4 +u32x4_hadd (u32x4 v1, u32x4 v2) +{ + return (u32x4) vpaddq_u32 (v1, v2); +} + #define CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE #define CLIB_VEC128_SPLAT_DEFINED #endif /* included_vector_neon_h */ -- cgit 1.2.3-korg