c@174: #ifndef KFC_H c@174: #define KFC_H c@174: #include "kiss_fft.h" c@174: c@174: #ifdef __cplusplus c@174: extern "C" { c@174: #endif c@174: c@174: /* c@174: KFC -- Kiss FFT Cache c@174: c@174: Not needing to deal with kiss_fft_alloc and a config c@174: object may be handy for a lot of programs. c@174: c@174: KFC uses the underlying KISS FFT functions, but caches the config object. c@174: The first time kfc_fft or kfc_ifft for a given FFT size, the cfg c@174: object is created for it. All subsequent calls use the cached c@174: configuration object. c@174: c@174: NOTE: c@174: You should probably not use this if your program will be using a lot c@174: of various sizes of FFTs. There is a linear search through the c@174: cached objects. If you are only using one or two FFT sizes, this c@174: will be negligible. Otherwise, you may want to use another method c@174: of managing the cfg objects. c@174: c@174: There is no automated cleanup of the cached objects. This could lead c@174: to large memory usage in a program that uses a lot of *DIFFERENT* c@174: sized FFTs. If you want to force all cached cfg objects to be freed, c@174: call kfc_cleanup. c@174: c@174: */ c@174: c@174: /*forward complex FFT */ c@174: void kfc_fft(int nfft, const kiss_fft_cpx * fin,kiss_fft_cpx * fout); c@174: /*reverse complex FFT */ c@174: void kfc_ifft(int nfft, const kiss_fft_cpx * fin,kiss_fft_cpx * fout); c@174: c@174: /*free all cached objects*/ c@174: void kfc_cleanup(void); c@174: c@174: #ifdef __cplusplus c@174: } c@174: #endif c@174: c@174: #endif