OpenWareLaboratory
FastFourierTransform.h
Go to the documentation of this file.
1 #ifndef __FastFourierTransform_h__
2 #define __FastFourierTransform_h__
3 
4 #include "FloatArray.h"
5 #include "ComplexFloatArray.h"
6 
7 #ifndef ARM_CORTEX
8 #include "kiss_fft.h"
9 #endif /* ARM_CORTEX */
10 
15 private:
16 #ifdef ARM_CORTEX
17  arm_rfft_fast_instance_f32 instance;
18 #else /* ARM_CORTEX */
19  kiss_fft_cfg cfgfft;
20  kiss_fft_cfg cfgifft;
21  ComplexFloatArray temp;
22 #endif /* ARM_CORTEX */
23 
24 public:
31 
38  FastFourierTransform(size_t aSize);
39 
41 
47  void init(size_t aSize);
48 
56  void fft(FloatArray input, ComplexFloatArray output);
57 
67  void ifft(ComplexFloatArray input, FloatArray output);
68 
73  size_t getSize();
74 
75  static FastFourierTransform* create(size_t blocksize);
76  static void destroy(FastFourierTransform* obj);
77 };
78 
79 #endif // __FastFourierTransform_h__
This class performs direct and inverse Fast Fourier Transform.
size_t getSize()
Get the size of the FFT.
void init(size_t aSize)
Initialize the instance.
void ifft(ComplexFloatArray input, FloatArray output)
Perform the inverse FFT.
static FastFourierTransform * create(size_t blocksize)
static void destroy(FastFourierTransform *obj)
FastFourierTransform()
Default constructor.
void fft(FloatArray input, ComplexFloatArray output)
Perform the direct FFT.
This class contains useful methods for manipulating arrays of floats.
Definition: FloatArray.h:12