FastLED 3.10.6
Loading...
Searching...
No Matches

◆ fixedPointLeadingZeros()

FL_FIXED_POINT_DIVIDE_INLINE int fl::detail::fixedPointLeadingZeros ( u32 value)

Leading zeros of a non-zero 32-bit value; 32 for zero.

Definition at line 86 of file wide_divide.h.

86 {
87#if defined(__GNUC__) || defined(__clang__)
88 // One CLZ instruction on every core this file's fast path is enabled for.
89 return value == 0 ? 32 : __builtin_clz(value);
90#else
91 int count = 0;
92 while (count < 32 && (value & 0x80000000u) == 0u) {
93 value <<= 1;
94 ++count;
95 }
96 return count;
97#endif
98}
constexpr int type_rank< T >::value

References FL_FIXED_POINT_DIVIDE_INLINE, fl::FL_NO_EXCEPT, and fl::type_rank< T >::value.

Referenced by fl::divide64By32().

+ Here is the caller graph for this function: