aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vector_neon.h
diff options
context:
space:
mode:
authorLijian.Zhang <Lijian.Zhang@arm.com>2019-04-04 15:26:26 +0800
committerDamjan Marion <dmarion@me.com>2019-05-01 07:44:55 +0000
commit37c83785b692145b95fe4678f7d599527157217c (patch)
tree4a544b46e8931846672f99ec9a5a744554760966 /src/vppinfra/vector_neon.h
parent1cff643c6549c6af026213267bed4a8eb25af55f (diff)
Enable NEON instructions in memcpy_le
Neon version of memcpy_le gives better performance compared with memmove on aarch64 Change-Id: I44b487bb0795a6e70dd1e55bdde4a077773ec859 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Sirshak Das <sirdas@arm.com>
Diffstat (limited to 'src/vppinfra/vector_neon.h')
-rw-r--r--src/vppinfra/vector_neon.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h
index 90451602d2d..37bd1bb0b01 100644
--- a/src/vppinfra/vector_neon.h
+++ b/src/vppinfra/vector_neon.h
@@ -83,6 +83,14 @@ static_always_inline u32 \
t##s##x##c##_zero_byte_mask (t##s##x##c x) \
{ uint8x16_t v = vreinterpretq_u8_u##s (vceqq_##i (vdupq_n_##i(0), x)); \
return u8x16_compare_byte_mask (v); } \
+\
+static_always_inline u##s##x##c \
+t##s##x##c##_is_greater (t##s##x##c a, t##s##x##c b) \
+{ return (u##s##x##c) vcgtq_##i (a, b); } \
+\
+static_always_inline t##s##x##c \
+t##s##x##c##_blend (t##s##x##c dst, t##s##x##c src, u##s##x##c mask) \
+{ return (t##s##x##c) vbslq_##i (mask, src, dst); }
foreach_neon_vec128i foreach_neon_vec128u