FastLED 3.10.8
Loading...
Searching...
No Matches

◆ wave8Transpose_16x2_pipe2()

FL_OPTIMIZE_FUNCTION FL_IRAM void fl::wave8Transpose_16x2_pipe2 ( const u8(&) lanes_a[16],
const u8(&) lanes_b[16],
const Wave8ByteExpansionLut & lut,
u8(&) output_a[16 *sizeof(Wave8Byte)],
u8(&) output_b[16 *sizeof(Wave8Byte)] )

Pipe2: transpose 16-lane × 2-byte-positions (#2548).

Bit-identical to two sequential wave8Transpose_16 calls. Internally interleaves the two independent OR-trees inside the symbol loop so the in-order RV32 P4 can fill load-use stalls from position A with ALU ops from position B. Measured 9655 → 7625 µs/frame (+26%) on P4 v1.3 (16-lane × 256-LED, byte-LUT path) — first variant to beat the 7680 µs WS2812B 16-lane TX target.

Definition at line 138 of file wave8.cpp.hpp.

142 {
143 // Expand both positions independently — compiler can interleave the two
144 // loops freely because they share no data.
145 Wave8Byte laneWaveformsA[16];
146 Wave8Byte laneWaveformsB[16];
147 for (int lane = 0; lane < 16; lane++) {
148 detail::wave8_expand_byte(lanes_a[lane], lut, &laneWaveformsA[lane]);
149 }
150 for (int lane = 0; lane < 16; lane++) {
151 detail::wave8_expand_byte(lanes_b[lane], lut, &laneWaveformsB[lane]);
152 }
153 // Symbol-major loop with both transposes inlined back-to-back: the two
154 // OR-trees share no dependencies, so the compiler can interleave them and
155 // fill the in-order pipeline bubbles. See #2548.
156 detail::wave8_transpose_16x2_pipe2(laneWaveformsA, laneWaveformsB,
157 output_a, output_b);
158}
FL_IRAM FL_OPTIMIZE_FUNCTION void wave8_transpose_16x2_pipe2(const Wave8Byte lane_waves_a[16], const Wave8Byte lane_waves_b[16], u8 output_a[16 *sizeof(Wave8Byte)], u8 output_b[16 *sizeof(Wave8Byte)]) FL_NO_EXCEPT
FL_IRAM FL_OPTIMIZE_FUNCTION void wave8_expand_byte(u8 byte_value, const Wave8ByteExpansionLut &lut, Wave8Byte *output) FL_NO_EXCEPT
Definition wave8.cpp.hpp:39

References FL_NO_EXCEPT, FL_RESTRICT_PARAM, fl::detail::wave8_expand_byte(), and fl::detail::wave8_transpose_16x2_pipe2().

+ Here is the call graph for this function: