lib_jsl_ffts_reference/mod.rs
1//! Readable reference FFTs, kept for study and as benchmark baselines.
2//!
3//! **If you just want an FFT, use [`lib_jsl_ffts::Fft`] instead.** The engines here trade speed
4//! for clarity, are limited to power-of-two sizes, and exist to show how the algorithms work:
5//!
6//! 1. [`simple_cooley_tukey`]: the textbook iterative radix-2 decimation-in-time algorithm, with
7//! twiddle factors generated by a recurrence (whose rounding errors accumulate).
8//! 2. [`optimized_radix2`]: the same algorithm with precomputed exact twiddle factors and
9//! bit-reversal indexing.
10//! 3. [`optimized_split_radix`]: the recursive split-radix algorithm, which needs the fewest
11//! arithmetic operations of the classical power-of-two FFTs.
12//!
13//! They all implement [`lib_jsl_ffts::fft_engine_trait::FftEngine1D`], so they are drop-in
14//! interchangeable with the production engines. Run `cargo bench -p lib_jsl_ffts_reference` to
15//! see how much the production engines gain from vectorization, radix-4 passes and cache blocking.
16//!
17//! See the book chapter [Fast Fourier transforms](https://jwkunz.github.io/lib_jsl/book/fft/index.html).
18
19pub mod optimized_radix2;
20pub mod optimized_split_radix;
21pub mod simple_cooley_tukey;
22#[cfg(test)]
23mod test_bench_data;