Skip to content

A mixed-radix FFT library written in pure Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

nacaclanga/RustFFT

 
 

Repository files navigation

RustFFT

CI minimum rustc nightly

RustFFT is a high-performance FFT library written in pure Rust. See the documentation for more details.

This is an experimental release of RustFFT that enables AVX acceleration. It currently requires a nightly compiler, mainly for the min_specialization feature. The eventual plan is to release this experimental version as version 5.0 of RustFFT, but that will not happen until it compiles on stable Rust.

No special code is needed to activate AVX: Simply plan a FFT using the FftPlanner on a machine that supports the avx and fma features.

Usage

// Perform a forward FFT of size 1234
use rustfft::{FftPlanner, num_complex::Complex};

let mut planner = FftPlanner::new(false);
let fft = planner.plan_fft(1234);

let mut buffer = vec![Complex{ re: 0.0f32, im: 0.0f32 }; 1234];
fft.process_inplace(&mut buffer);

If you're looking for the experimental AVX-accelerated release, check out the SIMD branch.

Usage

// Perform a forward FFT of size 1234
use rustfft::{FFTplanner, num_complex::Complex};

let mut planner = FFTplanner::new(false);
let fft = planner.plan_fft(1234);

let mut input:  Vec<Complex<f32>> = vec![Complex{ re: 0.0, im: 0.0 }; 4096];
let mut output: Vec<Complex<f32>> = vec![Complex{ re: 0.0, im: 0.0 }; 4096];

fft.process(&mut input, &mut output);

Compatibility

This experimental version of rustfft crate requires nightly Rust.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Before submitting a PR, please make sure to run cargo fmt.

About

A mixed-radix FFT library written in pure Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.0%
  • Python 1.0%