FastLED 3.10.10
Loading...
Searching...
No Matches

◆ polyTopBit128()

int fl::gfx::detail::polyTopBit128 ( fl::u32 m3,
fl::u32 m2,
fl::u32 m1,
fl::u32 m0 )
inline

Index (0..127) of the highest set bit of a 128-bit value held in four 32-bit lanes (m3 most significant), or -1 when the value is zero.

Definition at line 414 of file primitives.h.

415 {
416 if (m3) return 127 - polyClz32(m3);
417 if (m2) return 95 - polyClz32(m2);
418 if (m1) return 63 - polyClz32(m1);
419 if (m0) return 31 - polyClz32(m0);
420 return -1;
421}
int polyClz32(fl::u32 v) FL_NO_EXCEPT
Count leading zeros of a non-zero 32-bit value (branch form: portable to MSVC where __builtin_clz is ...
Definition primitives.h:402

References fl::FL_NO_EXCEPT, polyClz32(), and polyTopBit128().

Referenced by polyDivRoundT28(), and polyTopBit128().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: