numLeadingZeroBits#

Fully qualified name: carb::math::numLeadingZeroBits

Defined in carb/math/Util.h

template<class T>
int carb::math::numLeadingZeroBits(const T &val)#

Returns the number of leading zero bits for an integer value.

Parameters:

val[in] The integer value

Returns:

The number of most-significant zero bits. For a zero value, returns the number of bits for the type T.