MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / ctlz

Method ctlz

external/include/fast_float/fast_float.h:2144–2156  ·  view source on GitHub ↗

get the number of leading zeros in the bigint.

Source from the content-addressed store, hash-verified

2142
2143 // get the number of leading zeros in the bigint.
2144 int ctlz() const noexcept {
2145 if (vec.is_empty()) {
2146 return 0;
2147 } else {
2148#ifdef FASTFLOAT_64BIT_LIMB
2149 return leading_zeroes(vec.rindex(0));
2150#else
2151 // no use defining a specialized leading_zeroes for a 32-bit type.
2152 uint64_t r0 = vec.rindex(0);
2153 return leading_zeroes(r0 << 32);
2154#endif
2155 }
2156 }
2157
2158 // get the number of bits in the bigint.
2159 int bit_length() const noexcept {

Callers

nothing calls this directly

Calls 2

leading_zeroesFunction · 0.85
is_emptyMethod · 0.80

Tested by

no test coverage detected