MCPcopy Create free account
hub / github.com/FastLED/FastLED / _highest_bit_step

Function _highest_bit_step

src/fl/math/fixed_point/u16x16.h:208–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206 }
207
208 static constexpr int _highest_bit_step(u32 v, int r) FL_NOEXCEPT {
209 return (v & 0xFFFF0000u) ? _highest_bit_step(v >> 16, r + 16)
210 : (v & 0x0000FF00u) ? _highest_bit_step(v >> 8, r + 8)
211 : (v & 0x000000F0u) ? _highest_bit_step(v >> 4, r + 4)
212 : (v & 0x0000000Cu) ? _highest_bit_step(v >> 2, r + 2)
213 : (v & 0x00000002u) ? r + 1
214 : r;
215 }
216
217 // Fixed-point log base 2 for positive values.
218 // Uses 2-term polynomial for log2(1+t), t in [0,1) (simplified for unsigned).

Callers 15

u8x24Class · 0.70
_highest_bit_stepMethod · 0.70
s12x4Class · 0.70
_highest_bit_stepMethod · 0.70
s24x8Class · 0.70
_highest_bit_stepMethod · 0.70
s8x8Class · 0.70
_highest_bit_stepMethod · 0.70
u8x8Class · 0.70
_highest_bit_stepMethod · 0.70
lerpFunction · 0.70
s4x12Class · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected