elang/base/bits.h
inline int CountTrailingZeros32(uint32_t value) {
#if COMPILER_MSVC
  unsigned long result;  // NOLINT(runtime/int)
  if (!_BitScanForward(&result, value))
    return 32;
  return static_cast<int>(result);
#else
  return 32 - CountPopulation32(value | ~value);
#endif
}
// Returns the number of zero bits preceding the least significant 1 bit in
// |value| if |value| is non-zero, otherwise it returns 32.
Returns the number of zero bits preceding the least significant 1 bit in
|value| if |value| is non-zero, otherwise it returns 32.
Returns the number of zero bits preceding the least significant 1 bit in |value| if |value| is non - zero otherwise it returns 32 .
inline int CountTrailingZeros32(uint32_t value) {
#if COMPILER_MSVC
  unsigned long result;  
  if (!_BitScanForward(&result, value))
    return 32;
  return static_cast<int>(result);
#else
  return 32 - CountPopulation32(value | ~value);
#endif
}
inline int CountTrailingZeros32 ( uint32_t value ) { #if COMPILER_MSVC unsigned long result ; if ( ! _BitScanForward ( & result , value ) ) return 32 ; return static_cast < int > ( result ) ; #else return 32 - CountPopulation32 ( value | ~ value ) ; #endif }
Returns the number of zero bits preceding the least significant 1 bit in
|value| if |value| is non-zero, otherwise it returns 32.
Returns the number of zero bits preceding the least significant 1 bit in |value| if |value| is non - zero otherwise it returns 32 .
// NOLINT(runtime/int)