diff options
author | Damjan Marion <damarion@cisco.com> | 2021-11-08 11:18:30 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-11-10 23:22:58 +0000 |
commit | aa63bc6cf4b9031c3fc6ae22aecd846cc712bc52 (patch) | |
tree | c007868ca129f5594ac9c5aa460edea4aa63951e /src/vppinfra/vector_neon.h | |
parent | 29355644c5eca85b83b183ff887633dbcf86cf35 (diff) |
vppinfra: new vectorized ip checksum functions incl. csum_and_copy
Type: improvement
Change-Id: Id5810b7f4a6d6e4ce16b73c235b50db5d475ebf7
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/vector_neon.h')
-rw-r--r-- | src/vppinfra/vector_neon.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h index 70b05c60884..80d7bda9f3c 100644 --- a/src/vppinfra/vector_neon.h +++ b/src/vppinfra/vector_neon.h @@ -211,6 +211,18 @@ u32x4_min_scalar (u32x4 v) #define u8x16_word_shift_left(x,n) vextq_u8(u8x16_splat (0), x, 16 - n) #define u8x16_word_shift_right(x,n) vextq_u8(x, u8x16_splat (0), n) +always_inline u32x4 +u32x4_interleave_hi (u32x4 a, u32x4 b) +{ + return (u32x4) vzip2q_u32 (a, b); +} + +always_inline u32x4 +u32x4_interleave_lo (u32x4 a, u32x4 b) +{ + return (u32x4) vzip1q_u32 (a, b); +} + static_always_inline u8x16 u8x16_reflect (u8x16 v) { |