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