MCPcopy Create free account
hub / github.com/ElementsProject/lightning / bitops_hs64

Function bitops_hs64

ccan/ccan/bitops/bitops.h:149–153  ·  view source on GitHub ↗

* bitops_hs64: find highest set bit in a uint64_t (must not be zero) * * Returns 0 for least significant bit, 63 for most significant bit. */

Source from the content-addressed store, hash-verified

147 * Returns 0 for least significant bit, 63 for most significant bit.
148 */
149static inline int bitops_hs64(uint64_t u)
150{
151 BITOPS_ASSERT_NONZERO(u);
152 return 63 - bitops_clz64(u);
153}
154
155/**
156 * bitops_lc32: find lowest clear bit in a uint32_t (must not be 0xFFFFFFFF)

Callers 3

split_nodeFunction · 0.85
mainFunction · 0.85
u64_to_fp16Function · 0.85

Calls 1

bitops_clz64Function · 0.70

Tested by 1

mainFunction · 0.68