diff --git a/README.md b/README.md index bfab241..dc55985 100644 --- a/README.md +++ b/README.md @@ -11,22 +11,25 @@ Transform (FFT) library written in pure Rust. ## Features -- Simple implementation using a single, general-purpose FFT algorithm +- Simple implementation using the Cooley-Tukey FFT algorithm - Performance on par with other Rust FFT implementations - Zero `unsafe` code -- Takes advantage of latest CPU features up to and including AVX-512, but performs well even without them +- Takes advantage of latest CPU features up to and including `AVX-512`, but performs well even without them - Optional parallelization of some steps to 2 threads (with even more planned) - 2x lower memory usage than [RustFFT](https://crates.io/crates/rustfft/) - Python bindings (via [PyO3](https://github.com/PyO3/pyo3)) ## Limitations +- Only supports input with a length of `2^n` (i.e., a power of 2) -- input should be padded with zeros to the next power + of 2 - No runtime CPU feature detection (yet). Right now achieving the highest performance requires compiling - with `-C target-cpu=native` or [`cargo multivers`](https://github.com/ronnychevalier/cargo-multivers). + with `-C target-cpu=native` or [`cargo multivers`](https://github.com/ronnychevalier/cargo-multivers) - Requires nightly Rust compiler due to use of portable SIMD ## Planned features +- Bluestein's algorithm (to handle arbitrary sized FFTs) - Runtime CPU feature detection - More multi-threading - More work on cache-optimal FFT @@ -39,7 +42,7 @@ years or so). The two major bottlenecks in FFT are the **CPU cycles** and **memory accesses**. We picked an efficient, general-purpose FFT algorithm. Our implementation can make use of latest CPU features such as -AVX-512, but performs well even without them. +`AVX-512`, but performs well even without them. Our key insight for speeding up memory accesses is that FFT is equivalent to applying gates to all qubits in `[0, n)`. This creates the opportunity to leverage the same memory access patterns as @@ -130,7 +133,7 @@ submit a pull request. Follow the contribution guidelines outlined in the CONTRI PhastFT is licensed under MIT or Apache 2.0 license, at your option. -## PhastFT vs RustFFT +## PhastFT vs. RustFFT [RustFFT](https://crates.io/crates/rustfft/) is another excellent FFT implementation in pure Rust. RustFFT and PhastFT make different trade-offs. diff --git a/pyphastft/32_bins_demo.mov b/pyphastft/32_bins_demo.mov deleted file mode 100644 index d2fda1e..0000000 Binary files a/pyphastft/32_bins_demo.mov and /dev/null differ diff --git a/src/lib.rs b/src/lib.rs index 7c7e4b4..4447ac0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,8 @@ macro_rules! impl_fft_with_opts_and_plan_for { /// /// # Panics /// - /// Panics if `reals.len() != imags.len()`, or if the input length is *not* a power of 2. + /// Panics if `reals.len() != imags.len()` or if `reals.len()` and `imags.len()` are not a power of + /// 2 pub fn $func_name( reals: &mut [$precision], imags: &mut [$precision], @@ -148,8 +149,8 @@ mod tests { use std::ops::Range; use utilities::assert_float_closeness; - use utilities::rustfft::num_complex::Complex; use utilities::rustfft::FftPlanner; + use utilities::rustfft::num_complex::Complex; use super::*;