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

Function bitops_ls64

ccan/ccan/bitops/bitops.h:127–131  ·  view source on GitHub ↗

* bitops_ls64: find lowest 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

125 * Returns 0 for least significant bit, 63 for most significant bit.
126 */
127static inline int bitops_ls64(uint64_t u)
128{
129 BITOPS_ASSERT_NONZERO(u);
130 return bitops_ffs64(u) - 1;
131}
132
133/**
134 * bitops_hs32: find highest set bit in a uint32_t (must not be zero)

Callers 2

critbitFunction · 0.85
mainFunction · 0.85

Calls 1

bitops_ffs64Function · 0.70

Tested by 1

mainFunction · 0.68