pub fn ilog2<T: PrimInt>(v: T) -> usize