MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_align32pow2

Function rte_align32pow2

dpdk/lib/eal/include/rte_bitops.h:620–627  ·  view source on GitHub ↗

* Aligns input parameter to the next power of 2 * * @param x * The integer value to align * * @return * Input parameter aligned to the next power of 2 */

Source from the content-addressed store, hash-verified

618 * Input parameter aligned to the next power of 2
619 */
620static inline uint32_t
621rte_align32pow2(uint32_t x)
622{
623 x--;
624 x = rte_combine32ms1b(x);
625
626 return x + 1;
627}
628
629/**
630 * Aligns input parameter to the previous power of 2

Callers 15

rte_log2_u32Function · 0.70
rte_ring_initFunction · 0.50
rte_ring_create_elemFunction · 0.50
rte_member_create_sketchFunction · 0.50
rte_member_minheap_initFunction · 0.50
rte_member_create_htFunction · 0.50
rte_member_createFunction · 0.50
rte_member_create_vbfFunction · 0.50
replay_num_bucketFunction · 0.50
table_params_getFunction · 0.50

Calls 1

rte_combine32ms1bFunction · 0.70

Tested by 8

optimal_mempool_sizeFunction · 0.40
get_prim_bucket_indexFunction · 0.40
get_alt_bucket_indexFunction · 0.40
generate_keysFunction · 0.40
test_alignFunction · 0.40
mt1_initFunction · 0.40
test_refcnt_mbufFunction · 0.40