truce-simd
Portable SIMD primitives + canonical block-rate audio ops for truce plugins.
Overview
Two backends, feature-gated behind a stable public API:
wide-backend(default) — stable Rust, uses thewidecrate. Mapsf32x4/f32x8/f64x2/f64x4onto SSE2 / AVX2 on x86, NEON on AArch64, scalar fallback elsewhere.portable-simd-backend(planned) — nightly-only, swaps incore::simdwhen it stabilizes. Same public type aliases, so consumers don't have to rewrite.
use ;
// In `process()`:
scale_block; // out = src * gain
mac_block; // out += src * gain
mix_block; // dry/wet workhorse
tanh_block; // vectorized tanh
db_to_linear_block; // vectorized dB → lin
All ops are pure math — no atomics, no parameter reads, no
audio-thread allocation. They're the inner-loop complement to a
truce_params::FloatParam::read_block::<N>() /
truce_core::AudioBuffer::chunks_mut::<N>() driver. See the
block-gain example
for the canonical fast-path / slow-path shape.