MCPcopy Create free account
hub / github.com/catboost/catboost / GetValueBitCountImpl

Function GetValueBitCountImpl

util/generic/bitops.h:61–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60#if defined(__GNUC__)
61 inline unsigned GetValueBitCountImpl(unsigned int value) noexcept {
62 Y_ASSERT(value); // because __builtin_clz* have undefined result for zero.
63 return std::numeric_limits<unsigned int>::digits - __builtin_clz(value);
64 }
65
66 inline unsigned GetValueBitCountImpl(unsigned long value) noexcept {
67 Y_ASSERT(value); // because __builtin_clz* have undefined result for zero.

Callers 1

GetValueBitCountFunction · 0.85

Calls 2

__builtin_clzFunction · 0.85
__builtin_clzllFunction · 0.85

Tested by

no test coverage detected