Skip to content

feat(wave): Teensy 4 DSP-intrinsic SIMD backend for 2D wave PDE update kernel (split from #3097) #3108

Open

Description

@zackees

Split from the now-closed §7 umbrella (#3097). Sub-task of meta #3098.

Target

Teensy 4 (Cortex-M7) — ARM DSP-extension intrinsics. __SADD16 / __SSAT16 / __SMLAD process 2× i16 per instruction.

Approach

  • New TU: src/fl/math/wave/wave_simulation_real_simd_armdsp.cpp.hpp, gated on Cortex-M7 detection.
  • Reuse the dispatcher landed in the host-SIMD sub-issue (filed parallel to this one).

Acceptance

  • DSP-intrinsic output bit-equal to scalar output.
  • Microbench on Teensy 4 shows roughly 2× speedup (the smaller win matches the 2-wide ARM DSP halfword ops).

Dependencies

  • Host SIMD sub-issue (filed parallel) should land first — establishes the dispatcher API.

Parent meta: #3098
History: split from #3097

Activity

  1. zackees commented on Jun 15, 2026

    @zackees
    MemberAuthor

    Hold this work until #3111 lands.

    #3111 is researching whether super-sample (the primary motivator for SIMD throughput on this kernel) should be replaced wholesale by an algorithmic alternative (screen-space anti-aliasing + higher-order stencils, spectral methods, LBM, procedural waves, etc.). If the research lands on a 10×+ algorithmic win, we'd be writing SIMD for the wrong kernel.

    Resume here once #3111 has produced its recommendation document and the FastLED-3098-family scalar kernel is confirmed as the long-term path.

  2. zackees commented on Jun 15, 2026

    @zackees
    MemberAuthor

    Now tracked under parent meta #3113 (Wave2D perf pipeline). The hold for this SIMD sub-issue stays in place — the meta gates SIMD on first landing the perf benchmark (#3113 Task 1) and the algorithmic candidates from the #3112 research doc.

  3. zackees commented on Aug 20, 2026

    @zackees
    MemberAuthor

    Burn-down disposition: DEFER ? platform backend is still intentionally gated and its prerequisite is not implemented.

    Evidence:

    Restart criteria:

    1. Resolve feat(wave): host SIMD backend for 2D wave PDE update kernel — SSE2/AVX2/NEON (split from #3097) #3106's dispatcher/parity contract or define a platform-independent replacement.
    2. Complete [meta] Wave2D perf pipeline — autoresearch benchmark + sanity calibration + PSRAM storage + algorithmic follow-ups #3113's algorithm choice and retain the scalar PDE as a long-term hot path.
    3. Attach a Teensy 4.0/4.1, capture trusted scalar --perf-wave2d baselines, and add saturation/boundary/stencil parity vectors.
    4. Implement through the maintained ARM DSP abstraction with scalar fallback.
    5. Prove bit equality and a reproducible material speedup on hardware; close as not worthwhile if the two-lane gain is consumed by packing/halo overhead.
  4. added
    deferred
    on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferred

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions