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

Function rte_combine64ms1b

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

* Combines 64b inputs most significant set bits into the least * significant bits to construct a value with the same MSBs as x * but all 1's under it. * * @param v * The integer whose MSBs need to be combined with its LSBs * @return * The combined value. */

Source from the content-addressed store, hash-verified

460 * The combined value.
461 */
462static inline uint64_t
463rte_combine64ms1b(uint64_t v)
464{
465 v |= v >> 1;
466 v |= v >> 2;
467 v |= v >> 4;
468 v |= v >> 8;
469 v |= v >> 16;
470 v |= v >> 32;
471
472 return v;
473}
474
475/**
476 * Searches the input parameter for the least significant set bit

Callers 2

rte_align64pow2Function · 0.70
rte_align64prevpow2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected