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

Function rte_combine32ms1b

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

* Combines 32b 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 x * The integer whose MSBs need to be combined with its LSBs * @return * The combined value. */

Source from the content-addressed store, hash-verified

438 * The combined value.
439 */
440static inline uint32_t
441rte_combine32ms1b(uint32_t x)
442{
443 x |= x >> 1;
444 x |= x >> 2;
445 x |= x >> 4;
446 x |= x >> 8;
447 x |= x >> 16;
448
449 return x;
450}
451
452/**
453 * Combines 64b inputs most significant set bits into the least

Callers 2

rte_align32pow2Function · 0.70
rte_align32prevpow2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected