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

Function CeilLog2

util/generic/bitops.h:327–329  ·  view source on GitHub ↗

* Return rounded up binary logarithm of `x`. */

Source from the content-addressed store, hash-verified

325 * Return rounded up binary logarithm of `x`.
326 */
327Y_FORCE_INLINE ui8 CeilLog2(ui64 x) {
328 return static_cast<ui8>(MostSignificantBit(x - 1)) + 1;
329}
330
331Y_FORCE_INLINE ui8 ReverseBytes(ui8 t) {
332 return t;

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 1

MostSignificantBitFunction · 0.70

Tested by

no test coverage detected