Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- stable
- beta
- nightly
- 1.77
- 1.86
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- stable
- beta
- nightly
- 1.77
- 1.86
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -99,7 +99,7 @@ jobs:
- stable
- beta
- nightly
- 1.77
- 1.86
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
- stable
- beta
- nightly
- 1.77
- 1.86
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/target
/Cargo.lock
Cargo.lock
Tools/gen_simd_butterflies/target
*.swp
.vscode/
60 changes: 56 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "rustfft"
version = "6.4.1"
authors = ["Allen Welkie <allen.welkie at gmail>", "Elliott Mahler <join.together at gmail>"]
edition = "2021"
rust-version = "1.77"
rust-version = "1.86"

description = "High-performance FFT library written in pure Rust."
documentation = "https://docs.rs/rustfft/"
Expand Down Expand Up @@ -46,14 +46,66 @@ transpose = "0.2"
primal-check = "0.3.3"

[dev-dependencies]
rand = "0.8"
pastey = "0.2"
getrandom = {version = "^0.2", features = ["js"]}
rand = { version = "0.9", default-features = false, features = ["std", "std_rng"] }
wasm-bindgen-test = "^0.3.36"

criterion = { version = "0.8", default-features = false }

[target.'cfg(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2"))'.dev-dependencies]
getrandom = "=0.3.1"

[[bench]]
name = "bench_check_neon"
harness = false

[[bench]]
name = "bench_check_scalar"
harness = false

[[bench]]
name = "bench_check_sse"
harness = false

[[bench]]
name = "bench_compare_scalar_neon"
harness = false

[[bench]]
name = "bench_compare_scalar_sse_avx"
harness = false

[[bench]]
name = "bench_compare_scalar_wasm_simd"
harness = false

[[bench]]
name = "bench_rustfft"
harness = false

[[bench]]
name = "bench_rustfft_neon"
harness = false

[[bench]]
name = "bench_rustfft_scalar"
harness = false

[[bench]]
name = "bench_rustfft_sse"
harness = false

[[bench]]
name = "bench_rustfft_wasm_simd"
harness = false

[[bench]]
name = "compare_3n2m_strategies"
harness = false

# Compares the Neon and FCMA backends against each other. Needs the nightly-only "fcma" feature,
# and a CPU implementing ARMv8.3-A:
# cargo +nightly bench --features fcma --bench bench_compare_neon_fcma
[[bench]]
name = "bench_compare_neon_fcma"
required-features = ["fcma"]
harness = false
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![](https://img.shields.io/crates/v/rustfft.svg)](https://crates.io/crates/rustfft)
[![](https://img.shields.io/crates/l/rustfft.svg)](https://crates.io/crates/rustfft)
[![](https://docs.rs/rustfft/badge.svg)](https://docs.rs/rustfft/)
![minimum rustc 1.61](https://img.shields.io/badge/rustc-1.61+-red.svg)
![minimum rustc 1.86](https://img.shields.io/badge/rustc-1.86+-red.svg)

RustFFT is a high-performance, SIMD-accelerated FFT library written in pure Rust. It can compute FFTs of any size, including prime-number sizes, in O(nlogn) time.

Expand Down Expand Up @@ -75,7 +75,7 @@ This policy has one exception: We currently re-export pre-1.0 versions of the [n

### Supported Rust Version

RustFFT requires rustc 1.61 or newer. Minor releases of RustFFT may upgrade the MSRV(minimum supported Rust version) to a newer version of rustc.
RustFFT requires rustc 1.86 or newer. Minor releases of RustFFT may upgrade the MSRV(minimum supported Rust version) to a newer version of rustc.
However, if we need to increase the MSRV, the new Rust version must have been released at least six months ago.

## License
Expand Down
49 changes: 49 additions & 0 deletions benches/bench_check_neon.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
use rustfft::num_complex::Complex;
use rustfft::num_traits::Zero;
use rustfft::Fft;
use std::sync::Arc;
mod config;

use criterion::{criterion_group, criterion_main, Bencher, Criterion};

// Make fft using planner
fn bench_planned_32(b: &mut Bencher, len: usize) {
let mut planner = rustfft::FftPlannerNeon::new().unwrap();
let fft: Arc<dyn Fft<f32>> = planner.plan_fft_forward(len);

let mut buffer: Vec<Complex<f32>> = vec![Complex::zero(); len];
let mut scratch: Vec<Complex<f32>> = vec![Complex::zero(); fft.get_inplace_scratch_len()];
b.iter(|| {
fft.process_with_scratch(&mut buffer, &mut scratch);
});
}

// Make fft using planner
fn bench_planned_64(b: &mut Bencher, len: usize) {
let mut planner = rustfft::FftPlannerNeon::new().unwrap();
let fft: Arc<dyn Fft<f64>> = planner.plan_fft_forward(len);

let mut buffer: Vec<Complex<f64>> = vec![Complex::zero(); len];
let mut scratch: Vec<Complex<f64>> = vec![Complex::zero(); fft.get_inplace_scratch_len()];
b.iter(|| {
fft.process_with_scratch(&mut buffer, &mut scratch);
});
}

fn criterion_benchmark(c: &mut Criterion) {
for len in 2..200 {
c.bench_function(&format!("bench_from2to1024_f32_{len}"), |b| {
bench_planned_32(b, len)
});
c.bench_function(&format!("bench_from2to1024_f64_{len}"), |b| {
bench_planned_64(b, len)
});
}
}

criterion_group! {
name = benches;
config = config::fast();
targets = criterion_benchmark
}
criterion_main!(benches);
168 changes: 0 additions & 168 deletions benches/bench_check_neon_2to1024.rs

This file was deleted.

Loading
Loading