FastLED 3.9.15
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 136 of file wave8.cpp.hpp.

140 {
141 // Expand both positions independently — compiler can interleave the two
142 // loops freely because they share no data.
143 Wave8Byte laneWaveformsA[16];
144 Wave8Byte laneWaveformsB[16];
145 for (int lane = 0; lane < 16; lane++) {
146 detail::wave8_expand_byte(lanes_a[lane], lut, &laneWaveformsA[lane]);
147 }
148 for (int lane = 0; lane < 16; lane++) {
149 detail::wave8_expand_byte(lanes_b[lane], lut, &laneWaveformsB[lane]);
150 }
151 // Symbol-major loop with both transposes inlined back-to-back: the two
152 // OR-trees share no dependencies, so the compiler can interleave them and
153 // fill the in-order pipeline bubbles. See #2548.
154 detail::wave8_transpose_16x2_pipe2(laneWaveformsA, laneWaveformsB,
155 output_a, output_b);
156}
FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void wave8_expand_byte(u8 byte_value, const Wave8ByteExpansionLut &lut, Wave8Byte *output)
Byte-indexed expansion (#2526): one indexed 8-byte copy.
Definition wave8.hpp:69
FASTLED_FORCE_INLINE 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)])
Pipe2: transpose 16-lane × 2-byte-positions in one fused call.
Definition wave8.hpp:249

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

+ Here is the call graph for this function: