| 1 |
#ifndef _CFFTw3_h_ |
| 2 |
#define _CFFTw3_h_ |
| 3 |
|
| 4 |
#include <complex> |
| 5 |
#include <vector> |
| 6 |
#include <deque> |
| 7 |
#include <fftw3.h> |
| 8 |
|
| 9 |
class CFFTW3 |
| 10 |
{ |
| 11 |
int m_size; |
| 12 |
|
| 13 |
fftw_plan m_plan; |
| 14 |
fftw_complex *m_in, *m_out; |
| 15 |
bool m_forward; |
| 16 |
|
| 17 |
public: |
| 18 |
CFFTW3(bool forward=true); |
| 19 |
CFFTW3(int n); |
| 20 |
void resize(int n); |
| 21 |
|
| 22 |
int size(){return m_size;} |
| 23 |
|
| 24 |
std::vector<double> in; |
| 25 |
std::vector<std::complex<double> > out; |
| 26 |
|
| 27 |
void execute(const std::vector<double>& in, std::vector<std::complex<double> >& out); |
| 28 |
void execute(); |
| 29 |
|
| 30 |
~CFFTW3(); |
| 31 |
}; |
| 32 |
|
| 33 |
#endif |