ΒΆtemplate <typename T>
unsigned int countLeadingOnes(
T Value,
llvm::ZeroBehavior ZB = ZB_Width)
template <typename T>
unsigned int countLeadingOnes(
T Value,
llvm::ZeroBehavior ZB = ZB_Width)
Description
Count the number of ones from the most significant bit to the first zero bit. Ex. countLeadingOnes(0xFF0FFF00) == 8. Only unsigned integral types are allowed.
Declared at: llvm/include/llvm/Support/MathExtras.h:498
Templates
- T
Parameters
- T Value
- llvm::ZeroBehavior ZB = ZB_Width
- the behavior on an input of all ones. Only ZB_Width and ZB_Undefined are valid arguments.