Expand description
Bit manipulation utilities
Functionsยง
- align_
down - Aligns a value down to the given alignment
- align_
up - Aligns a value up to the given alignment
- count_
ones - Returns the number of set bits in a u64
- is_
aligned - Checks if a value is aligned to the given alignment
- leading_
zeros - Returns the number of leading zeros in a u64
- log2_
ceil - Returns the log2 of x, rounded up
- log2_
floor - Returns the log2 of x, rounded down
- next_
power_ of_ two - Returns the next power of two greater than or equal to x
- trailing_
zeros - Returns the number of trailing zeros in a u64