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

Function rte_clz32

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

* Get the count of leading 0-bits in v. * * @param v * The value. * @return * The count of leading zero bits. */

Source from the content-addressed store, hash-verified

248 * The count of leading zero bits.
249 */
250static inline unsigned int
251rte_clz32(uint32_t v)
252{
253 unsigned long rv;
254
255 (void)_BitScanReverse(&rv, v);
256
257 return (unsigned int)(sizeof(v) * CHAR_BIT - 1 - rv);
258}
259
260/**
261 * Get the count of leading 0-bits in v.

Callers 15

vhost_queue_stats_updateFunction · 0.85
rte_fls_u32Function · 0.85
update_flow_maskFunction · 0.85
rte_rib6_insertFunction · 0.85
rte_rib_insertFunction · 0.85
mrvl_reserve_bitFunction · 0.85
mlx5_flow_meter_createFunction · 0.85
flow_meter_split_prepFunction · 0.85
cxgbe_flsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_clz32Function · 0.68