pub fn log2_pow2(v: usize) -> u32
Log2 of a power-of-two value. Panics in debug mode if v is not a power of two.
v