• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2003-2004, Mark Borgerding. All rights reserved.
3  *  This file is part of KISS FFT - https://github.com/mborgerding/kissfft
4  *
5  *  SPDX-License-Identifier: BSD-3-Clause
6  *  See COPYING file for more information.
7  */
8 
9 #ifndef KISS_FTR_H
10 #define KISS_FTR_H
11 
12 #include "kiss_fft_f32.h"
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
18 /*
19 
20  Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
21 
22 
23 
24  */
25 
26 typedef struct kiss_fftr_f32_state *kiss_fftr_f32_cfg;
27 
28 
29 kiss_fftr_f32_cfg kiss_fftr_f32_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
30 /*
31  nfft must be even
32 
33  If you don't care to allocate space, use mem = lenmem = NULL
34 */
35 
36 
37 void kiss_fftr_f32(kiss_fftr_f32_cfg cfg,const kiss_fft_f32_scalar *timedata,kiss_fft_f32_cpx *freqdata);
38 /*
39  input timedata has nfft scalar points
40  output freqdata has nfft/2+1 complex points
41 */
42 
43 void kiss_fftri_f32(kiss_fftr_f32_cfg cfg,const kiss_fft_f32_cpx *freqdata,kiss_fft_f32_scalar *timedata);
44 /*
45  input freqdata has  nfft/2+1 complex points
46  output timedata has nfft scalar points
47 */
48 
49 #define kiss_fftr_f32_free KISS_FFT_F32_FREE
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 #endif
55