annotate src/ext/kissfft/tools/kfc.h @ 196:da283326bcd3
tip master
Update plugin versions in RDF
author |
Chris Cannam <cannam@all-day-breakfast.com> |
date |
Fri, 28 Feb 2020 09:43:02 +0000 |
parents |
5ed6e970541b |
children |
|
rev |
line source |
c@174
|
1 #ifndef KFC_H
|
c@174
|
2 #define KFC_H
|
c@174
|
3 #include "kiss_fft.h"
|
c@174
|
4
|
c@174
|
5 #ifdef __cplusplus
|
c@174
|
6 extern "C" {
|
c@174
|
7 #endif
|
c@174
|
8
|
c@174
|
9 /*
|
c@174
|
10 KFC -- Kiss FFT Cache
|
c@174
|
11
|
c@174
|
12 Not needing to deal with kiss_fft_alloc and a config
|
c@174
|
13 object may be handy for a lot of programs.
|
c@174
|
14
|
c@174
|
15 KFC uses the underlying KISS FFT functions, but caches the config object.
|
c@174
|
16 The first time kfc_fft or kfc_ifft for a given FFT size, the cfg
|
c@174
|
17 object is created for it. All subsequent calls use the cached
|
c@174
|
18 configuration object.
|
c@174
|
19
|
c@174
|
20 NOTE:
|
c@174
|
21 You should probably not use this if your program will be using a lot
|
c@174
|
22 of various sizes of FFTs. There is a linear search through the
|
c@174
|
23 cached objects. If you are only using one or two FFT sizes, this
|
c@174
|
24 will be negligible. Otherwise, you may want to use another method
|
c@174
|
25 of managing the cfg objects.
|
c@174
|
26
|
c@174
|
27 There is no automated cleanup of the cached objects. This could lead
|
c@174
|
28 to large memory usage in a program that uses a lot of *DIFFERENT*
|
c@174
|
29 sized FFTs. If you want to force all cached cfg objects to be freed,
|
c@174
|
30 call kfc_cleanup.
|
c@174
|
31
|
c@174
|
32 */
|
c@174
|
33
|
c@174
|
34 /*forward complex FFT */
|
c@174
|
35 void kfc_fft(int nfft, const kiss_fft_cpx * fin,kiss_fft_cpx * fout);
|
c@174
|
36 /*reverse complex FFT */
|
c@174
|
37 void kfc_ifft(int nfft, const kiss_fft_cpx * fin,kiss_fft_cpx * fout);
|
c@174
|
38
|
c@174
|
39 /*free all cached objects*/
|
c@174
|
40 void kfc_cleanup(void);
|
c@174
|
41
|
c@174
|
42 #ifdef __cplusplus
|
c@174
|
43 }
|
c@174
|
44 #endif
|
c@174
|
45
|
c@174
|
46 #endif
|