Mercurial > hg > peckfft
comparison peck_fftr.h @ 0:723f588b82ac
import
author | Peter Meerwald <p.meerwald@bct-electronic.com> |
---|---|
date | Fri, 16 Sep 2011 12:53:08 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:723f588b82ac |
---|---|
1 #ifndef PECK_FFTR_H | |
2 #define PECK_FFTR_H | |
3 | |
4 #include "peck_fft.h" | |
5 | |
6 #ifdef __cplusplus | |
7 extern "C" { | |
8 #endif | |
9 | |
10 /* | |
11 * Real optimized version can save about 45% cpu time vs. complex fft of a real seq. | |
12 */ | |
13 typedef struct peck_fftr_state *peck_fftr_cfg; | |
14 | |
15 /* | |
16 * peck_fftr_alloc() | |
17 * nfft must be even | |
18 * | |
19 * If you don't care to allocate space, use mem = lenmem = NULL. | |
20 */ | |
21 peck_fftr_cfg peck_fftr_alloc(int nfft, int inverse_fft, void * mem, size_t * lenmem); | |
22 | |
23 /* | |
24 * peck_fftr() | |
25 * input timedata has nfft scalar points | |
26 * output freqdata has nfft/2+1 complex points | |
27 */ | |
28 void peck_fftr(peck_fftr_cfg cfg,const peck_fft_scalar *timedata, peck_fft_cpx *freqdata); | |
29 | |
30 /* | |
31 * peck_fftri() | |
32 * input freqdata has nfft/2+1 complex points | |
33 * output timedata has nfft scalar points | |
34 */ | |
35 void peck_fftri(peck_fftr_cfg cfg,const peck_fft_cpx *freqdata, peck_fft_scalar *timedata); | |
36 | |
37 #define peck_fftr_free free | |
38 | |
39 #ifdef __cplusplus | |
40 } | |
41 #endif | |
42 | |
43 #endif /* PECK_FFTR_H */ |