MCPcopy Create free account
hub / github.com/fmtlib/fmt / countl_zero_fallback

Function countl_zero_fallback

include/fmt/format.h:438–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436
437template <typename UInt>
438FMT_CONSTEXPR20 inline auto countl_zero_fallback(UInt n) -> int {
439 int lz = 0;
440 constexpr UInt msb_mask = static_cast<UInt>(1) << (num_bits<UInt>() - 1);
441 for (; (n & msb_mask) == 0; n <<= 1) lz++;
442 return lz;
443}
444
445FMT_CONSTEXPR20 inline auto countl_zero(uint32_t n) -> int {
446#ifdef FMT_BUILTIN_CLZ

Callers 1

countl_zeroFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected