38 #ifndef included_clib_random_buffer_h 39 #define included_clib_random_buffer_h 86 n_words = n_bytes /
sizeof (
uword);
87 if (n_bytes %
sizeof (
uword))
97 if (n_bytes <
sizeof (
uword))
u8 cached_bytes[sizeof(uword)]
always_inline void * clib_random_buffer_get_data(clib_random_buffer_t *b, uword n_bytes)
sll srl srl sll sra u16x4 i
void clib_random_buffer_init(clib_random_buffer_t *b, uword seed)
always_inline void clib_random_buffer_free(clib_random_buffer_t *b)
#define vec_free(V)
Free vector's memory (no header).
void clib_random_buffer_fill(clib_random_buffer_t *b, uword n_words)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)