|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
5 #ifndef included_vector_compress_h
6 #define included_vector_compress_h
13 #if defined(CLIB_HAVE_VEC512_COMPRESS)
14 u64x8u *sv = (u64x8u *)
src;
15 for (
int i = 0;
i < 8;
i++)
17 u64x8_compress_store (sv[
i],
mask,
dst);
21 #elif defined(CLIB_HAVE_VEC256_COMPRESS)
22 u64x4u *sv = (u64x4u *)
src;
23 for (
int i = 0;
i < 16;
i++)
25 u64x4_compress_store (sv[
i],
mask,
dst);
78 #if defined(CLIB_HAVE_VEC512_COMPRESS)
79 u32x16u *sv = (u32x16u *)
src;
80 for (
int i = 0;
i < 4;
i++)
82 u32x16_compress_store (sv[
i],
mask,
dst);
87 #elif defined(CLIB_HAVE_VEC256_COMPRESS)
88 u32x8u *sv = (u32x8u *)
src;
89 for (
int i = 0;
i < 8;
i++)
91 u32x8_compress_store (sv[
i],
mask,
dst);
122 if (
mask[0] == ~0ULL)
144 #if defined(CLIB_HAVE_VEC512_COMPRESS_U8_U16)
145 u16x32u *sv = (u16x32u *)
src;
146 for (
int i = 0;
i < 2;
i++)
148 u16x32_compress_store (sv[
i],
mask,
dst);
179 if (
mask[0] == ~0ULL)
201 #if defined(CLIB_HAVE_VEC512_COMPRESS_U8_U16)
202 u8x64u *sv = (u8x64u *)
src;
203 u8x64_compress_store (sv[0],
mask,
dst);
232 if (
mask[0] == ~0ULL)
static_always_inline u32 clib_compress_u8(u8 *dst, u8 *src, u64 *mask, u32 n_elts)
Compress array of 8-bit elemments into destination array based on mask.
#define count_trailing_zeros(x)
static_always_inline u64 * clib_compress_u64_x64(u64 *dst, u64 *src, u64 mask)
static_always_inline u32 clib_compress_u16(u16 *dst, u16 *src, u64 *mask, u32 n_elts)
Compress array of 16-bit elemments into destination array based on mask.
static uword pow2_mask(uword x)
static_always_inline void clib_memcpy_u32(u32 *dst, u32 *src, u32 n_left)
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
static_always_inline u32 * clib_compress_u32_x64(u32 *dst, u32 *src, u64 mask)
#define static_always_inline
static_always_inline u32 clib_compress_u32(u32 *dst, u32 *src, u64 *mask, u32 n_elts)
Compress array of 32-bit elemments into destination array based on mask.
static_always_inline u32 clib_compress_u64(u64 *dst, u64 *src, u64 *mask, u32 n_elts)
Compress array of 64-bit elemments into destination array based on mask.
static_always_inline u8 * clib_compress_u8_x64(u8 *dst, u8 *src, u64 mask)
static_always_inline u16 * clib_compress_u16_x64(u16 *dst, u16 *src, u64 mask)
static uword clear_lowest_set_bit(uword x)