Return the log base 2 of integer value x, rounding up to the nearest integer.
pub fn log2_int_ceil(comptime T: type, x: T) Log2IntCeil(T)
pub fn log2_int_ceil(comptime T: type, x: T) Log2IntCeil(T) {
if (@typeInfo(T) != .int or @typeInfo(T).int.signedness != .unsigned)
@compileError("log2_int_ceil requires an unsigned integer, found " ++ @typeName(T));
assert(x != 0);
if (x == 1) return 0;
const log2_val: Log2IntCeil(T) = log2_int(T, x - 1);
return log2_val + 1;
}