vppinfra: add u64x2_scatter/u32x4_scatter
Add u64x2_scatter/u32x4_scatter in vector_neon.h. u64x2_scatter/u32x4_scatter scatters data from SIMD register to scattered memory locations. Type: feature Change-Id: I298d5478c7ba6935ab7402a6d467c7ee00f17e9f Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Sirshak Das <Sirshak.Das@arm.com> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
This commit is contained in:
Lijian.Zhang
committed by
Neale Ranns
parent
c47b97ddac
commit
0f9845120a
@ -160,6 +160,22 @@ u32x4_gather (void *p0, void *p1, void *p2, void *p3)
|
||||
return r;
|
||||
}
|
||||
|
||||
static_always_inline void
|
||||
u64x2_scatter (u64x2 r, void *p0, void *p1)
|
||||
{
|
||||
*(u64 *) p0 = vgetq_lane_u64 (r, 0);
|
||||
*(u64 *) p1 = vgetq_lane_u64 (r, 1);
|
||||
}
|
||||
|
||||
static_always_inline void
|
||||
u32x4_scatter (u32x4 r, void *p0, void *p1, void *p2, void *p3)
|
||||
{
|
||||
*(u32 *) p0 = vgetq_lane_u32 (r, 0);
|
||||
*(u32 *) p1 = vgetq_lane_u32 (r, 1);
|
||||
*(u32 *) p2 = vgetq_lane_u32 (r, 2);
|
||||
*(u32 *) p3 = vgetq_lane_u32 (r, 3);
|
||||
}
|
||||
|
||||
#define CLIB_HAVE_VEC128_MSB_MASK
|
||||
|
||||
#define CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE
|
||||
|
Reference in New Issue
Block a user