yum/vfft
A (very) fast fourier transform.
git clone https://git.yummers.dev/yum/vfft
abf4a25
master
vfft
vfft is a very fast fourier transform implementation. It currently optimizes for small, power-of-two inputs sizes.
vfft is under heavy development. If you are in need of a high-quality CPU-based FFT, use rustfft. If you need a GPU-based one, use VkFFT.
The goal of this project is to define simple, state-of-the-art fft implementations for small input sizes (under ~8k). My current north star is to meet or exceed VkFft's peformance for workloads where the FFT input and output remains resident on the GPU. This is useful for realtime audio-reactive graphics and ocean wave simulations, and probably more. Eventually, I would also like to implement a world-class CPU implementation, but this is a secondary concern.
Portability
MacOS and Linux are confirmed to work. Windows not tested.
API
use num :: Complex ; use vfft :: cpu :: { ExecutionPlan , fft } ; ... let mut data : Vec < Complex < f32 >> = ... ; let mut plan = ExecutionPlan :: new ( data ) ? ; fft ( & mut result_fft , & mut plan ) ;
Testing
# Accuracy $ cargo test -- --no-capture# Performance $ cargo bench
AI Disclosure
This source code was written by a human and checked for errors with an LLM.
License.
MIT License.
1# vfft 2 3vfft is a very fast fourier transform implementation. It currently optimizes 4for small, power-of-two inputs sizes. 5 6**vfft is under heavy development. If you are in need of a high-quality CPU-based 7FFT, use rustfft. If you need a GPU-based one, use VkFFT.** 8 9The goal of this project is to define simple, state-of-the-art fft 10implementations for small input sizes (under ~8k). My current north star is to 11meet or exceed VkFft's peformance for workloads where the FFT input and output 12remains resident on the GPU. This is useful for realtime audio-reactive 13graphics and ocean wave simulations, and probably more. Eventually, I would 14also like to implement a world-class CPU implementation, but this is a 15secondary concern. 16 17## Portability 18 19MacOS and Linux are confirmed to work. Windows not tested. 20 21## API 22 23``` rust 24use num :: Complex ; 25use vfft :: cpu :: { ExecutionPlan , fft } ; 26... 27let mut data : Vec < Complex < f32 >> = ... ; 28let mut plan = ExecutionPlan :: new ( data ) ? ; 29fft ( & mut result_fft , & mut plan ) ; 30``` 31 32## Testing 33 34``` bash 35# Accuracy 36$ cargo test -- --no-capture 37# Performance 38$ cargo bench 39``` 40 41## AI Disclosure 42 43This source code was written by a human and checked for errors with an 44LLM. 45 46## License. 47 48MIT License. 49