| Crates.io | gpu-fft |
| lib.rs | gpu-fft |
| version | 0.0.2 |
| created_at | 2025-03-01 04:49:37.126556+00 |
| updated_at | 2025-03-05 23:10:58.815019+00 |
| description | A Rust library for performing Fast Fourier Transform (FFT) and Inverse FFT using GPU acceleration. |
| homepage | https://github.com/eugenehp/gpu-fft |
| repository | https://github.com/name/gpu-fft.git |
| max_upload_size | |
| id | 1573523 |
| size | 81,335 |
This project demonstrates the use of the gpu-fft library in Rust to perform Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT) on a generated sine wave signal. The application calculates the dominant frequencies in the signal and prints them along with their power.
gpu_fft cratecargo add gpu_fft -F wgpu
To run the application, use the following command:
cargo run --example simple -F wgpu
The program will generate a sine wave with a specified frequency and sample rate, perform FFT, and print the dominant frequencies along with their power.
====================
Input with frequency - 10 Hz
====================
1000000 [0.0, 0.06279052, 0.12533323, 0.18738133, 0.2486899, 0.309017, 0.36812457, 0.4257793, 0.4817537, 0.5358268]..
====================
FFT 3.7933425s
====================
Frequency: 10.00 Hz, Power: 249999.38
Frequency: 958.99 Hz, Power: 122.58
Frequency: 990.00 Hz, Power: 247388.88
====================
IFFT 4.030771s
====================
cargo bench
returns
fft time: [728.14 µs 748.98 µs 769.46 µs]
change: [-6.5555% -3.9636% -1.1877%] (p = 0.01 < 0.05)
Performance has improved.
This project is licensed under the MIT License. See the LICENSE file for details.
©️ 2025, Eugene Hauptmann