@clz
@clz
@clz(operand: anytype) anytype
@TypeOf(operand) must be an integer type or an integer vector type.
operand may be an integer or vector.
Counts the number of most-significant (leading in a big-endian sense) zeroes in an integer - “count leading zeroes”.
If operand is a comptime-known integer, the return type is comptime_int. Otherwise, the return type is an unsigned integer or vector of unsigned integers with the minimum number of bits that can represent the bit count of the integer type.
If operand is zero, @clz returns the bit width of integer type T.
See also:
- @ctz
- @popCount
