Skip to main content

Crate lib_jsl_ffts_reference

Crate lib_jsl_ffts_reference 

Source
Expand description

Readable reference FFTs, kept for study and as benchmark baselines.

If you just want an FFT, use lib_jsl_ffts::Fft instead. The engines here trade speed for clarity, are limited to power-of-two sizes, and exist to show how the algorithms work:

  1. simple_cooley_tukey: the textbook iterative radix-2 decimation-in-time algorithm, with twiddle factors generated by a recurrence (whose rounding errors accumulate).
  2. optimized_radix2: the same algorithm with precomputed exact twiddle factors and bit-reversal indexing.
  3. optimized_split_radix: the recursive split-radix algorithm, which needs the fewest arithmetic operations of the classical power-of-two FFTs.

They all implement lib_jsl_ffts::fft_engine_trait::FftEngine1D, so they are drop-in interchangeable with the production engines. Run cargo bench -p lib_jsl_ffts_reference to see how much the production engines gain from vectorization, radix-4 passes and cache blocking.

See the book chapter Fast Fourier transforms.

Modulesยง

optimized_radix2
The iterative radix-2 Cooley-Tukey FFT with precomputed twiddle factors, for study.
optimized_split_radix
The split-radix FFT (Yavne, 1968; Duhamel and Hollmann, 1984), written for study.
simple_cooley_tukey
The textbook radix-2 decimation-in-time Cooley-Tukey FFT, for study.