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