diff options
author | Sirshak Das <sirshak.das@arm.com> | 2018-08-03 11:24:51 -0500 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-09-11 08:38:52 +0000 |
commit | 61f325d195976cafac2cae2619b259c1f0013596 (patch) | |
tree | 4d1463a4c85c76575935c71e78b84069991a4dc5 /src/vppinfra | |
parent | 34a962b728158f3596efaec6b45d89d8ea9ab218 (diff) |
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 <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r-- | src/vppinfra/vector_neon.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |