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

Function rte_align64prevpow2

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

* Aligns 64b input parameter to the previous power of 2 * * @param v * The 64b value to align * * @return * Input parameter aligned to the previous power of 2 */

Source from the content-addressed store, hash-verified

671 * Input parameter aligned to the previous power of 2
672 */
673static inline uint64_t
674rte_align64prevpow2(uint64_t v)
675{
676 v = rte_combine64ms1b(v);
677
678 return v - (v >> 1);
679}
680
681/**
682 * Return the rounded-up log2 of a integer.

Callers 2

test_alignFunction · 0.50

Calls 1

rte_combine64ms1bFunction · 0.70

Tested by 1

test_alignFunction · 0.40