Function log2_ceil_usize

Source
pub const fn log2_ceil_usize(n: usize) -> usize
Expand description

Computes the binary logarithm of $n$ rounded up to the nearest integer.

When $n$ is 0, this function returns 0. Otherwise, it returns $\lceil \log_2 n \rceil$.