C++ main module for emicrom Package  1.0
FFTW_MultiDFTs.h
Go to the documentation of this file.
1 #ifndef FFTW_MultiDFTs_H
2 #define FFTW_MultiDFTs_H
3 
4 #include "FFTW_MultiLevelsDFT.h"
5 
20 class FFTW_MultiDFTs : public FFTW_FFT {
22  // ATTRIBUTES
23 
24 public:
25 
26 
27 
28 
29 private:
30 
31 
32  // ASSOCIATIONS
33 
34 
35 protected:
36  // METHODS
37 
38  // CONSTRUCTORS
39 
42 
43 
44 
45  // DESTRUCTORS
46 
47 
50  virtual ~FFTW_MultiDFTs(void);
51 
52 
53 public:
54  //accessor operators
55  //==================
56 
61  inline const tFFTWComplex& operator()(const tUSInt& k,const tUIndex& i) const {
62  return (*this)[i+getPointsNumber()*k];
63  }
68  inline tFFTWComplex& operator()(const tUSInt& k,const tUIndex& i) {
69  return (*this)[i+getPointsNumber()*k];
70  }
71 
72 
73  //New constructors
76  inline static SP::FFTW_MultiDFTs New() {
77  SP::FFTW_MultiDFTs p(new FFTW_MultiDFTs(),
79  p->setThis(p);
80  return p;
81  }
85  inline static SP::FFTW_MultiDFTs New(const tUSInt& dim) {
86  SP::FFTW_MultiDFTs p=New();
87  p->setDimension(dim);
88  return p;
89  }
90 
91 
95  virtual SP::FFTW_FFT NewInstance() const {
97  }
98 
99 public:
100 
101 
102 
103  //copy operator
104  //============
105 
109  virtual void copy(const FFTW_FFT& cdft);
110 
111 
112  // SET methods
113  //============
114 
117  virtual void clear();
118 
123  virtual void setSize(const CORE_UIndexArray& levels,
124  const tUSInt& dim) {
125  setDimension(dim);
126  tUIndex N=1;
127  for (tUIndex i=0;i<levels.getSize();i++) {
128  N*=levels[i];
129  }
130  setPointsNumber(N);
131  }
135  virtual void setFFTsNumber(const tUInt& n) {
136  //set the number of plans by dimension
138  }
139 
146  virtual void setFFT(const tUInt& f,
147  const tSInt& dir,
148  const tBoolean& isInverse,
149  const tBoolean& optimize);
155  virtual void setFFT(const tUInt& f,const tSInt& dir,const tBoolean& isInverse) {
156  FFTW_FFT::setFFT(f,dir,isInverse);
157  }
158 
163  virtual void setFFT(const tUInt& f,const tBoolean& isInverse) {
164  FFTW_FFT::setFFT(f,isInverse);
165  }
166 
167  //GET methods
168  //==========
173  virtual tUIndex getSize(CORE_UIndexArray& levels) const {
174  levels.setSize(1);
175  levels[0]=getPointsNumber();
176  return getPointsNumber();
177  }
178 
182  virtual tUInt getFFTsNumber() const {
184  }
185 
189  virtual void runFFT(const tUIndex& f);
190 
191  //PLAN Managment methods
192  //======================
193 protected:
198  virtual void setPlan(const tUIndex& i,FFTW_Plan& p) {
199  //i=f*mDimension+k
202  CORE_Object::getThread().getThreadsNumber());
203  }
204 };
205 
206 #endif
FFTW_MultiDFTs()
create a FFT object
Definition: FFTW_MultiDFTs.cpp:5
virtual void setPlan(const tUIndex &i, FFTW_Plan &p)
create the values for the plan at index i
Definition: FFTW_MultiDFTs.h:198
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
This class describes an FFT Plan.
Definition: FFTW_Plan.h:15
virtual SP::FFTW_FFT NewInstance() const
retun a new instance of this
Definition: FFTW_MultiDFTs.h:95
const tUSInt & getDimension() const
get the dimension of the FFT
Definition: FFTW_FFT.h:259
virtual void setDimension(const tUSInt &n)
set the dimension of a point
Definition: FFTW_FFT.h:159
virtual void runFFT(const tUIndex &f)
run the FFT
Definition: FFTW_MultiDFTs.cpp:89
virtual void setFFT(const tUInt &f, const tBoolean &isInverse)
set the FFT at index f
Definition: FFTW_MultiDFTs.h:163
This class manages the execution of Fast Fourier Transform. several fast Fourier Transforms may be ap...
Definition: FFTW_FFT.h:28
virtual void copy(const FFTW_FFT &cdft)
copy the DFT
Definition: FFTW_MultiDFTs.cpp:18
virtual void setFFTsNumber(const tUInt &n)
set the number of FFTs
Definition: FFTW_MultiDFTs.h:135
#define tUSInt
Definition: types.h:28
void create(const tUIndex &n, tFFTWComplex *vs, const tUInteger &nThreads)
create the plan assoicated to the values
Definition: FFTW_Plan.cpp:36
DEFINE_SPTR(FFTW_MultiDFTs)
#define tBoolean
Definition: types.h:139
#define tFFTWComplex
Definition: fftw_types.h:65
void setSize(const tUIndex &n)
set the size
Definition: CORE_Array.h:292
virtual void setFFT(const tUInt &f, const tSInt &dir, const tBoolean &isInverse)
set the FFT at index f
Definition: FFTW_MultiDFTs.h:155
const tFFTWComplex & operator()(const tUSInt &k, const tUIndex &i) const
get the complex value at index i for coordinate k
Definition: FFTW_MultiDFTs.h:61
static SP::FFTW_MultiDFTs New(const tUSInt &dim)
create an array of Discrete fast Fourier Transform of size dim
Definition: FFTW_MultiDFTs.h:85
virtual tUInt getFFTsNumber() const
get the number of FFTs
Definition: FFTW_MultiDFTs.h:182
SP_OBJECT(FFTW_MultiDFTs)
#define tSInt
Definition: types.h:30
void setPointsNumber(const tUIndex &n)
set the number of values
Definition: FFTW_FFT.h:151
static SP::FFTW_MultiDFTs New()
create an array of Discrete fast Fourier Transform of size dim
Definition: FFTW_MultiDFTs.h:76
#define tUInt
Definition: types.h:33
void setPlansNumber(const tUIndex &n)
set the number of plans
Definition: FFTW_FFT.h:298
const tFFTWComplex * getValues() const
get the values of the FFT
Definition: FFTW_FFT.h:240
tFFTWComplex & operator()(const tUSInt &k, const tUIndex &i)
get the complex value at level index i for coordinate k
Definition: FFTW_MultiDFTs.h:68
#define tUIndex
Definition: types.h:126
virtual tUIndex getSize(CORE_UIndexArray &levels) const
get the size of the FFT in multi-levels form
Definition: FFTW_MultiDFTs.h:173
virtual ~FFTW_MultiDFTs(void)
destroy an FFT Object.
Definition: FFTW_MultiDFTs.cpp:9
This class computes FFT transformations for a vector of dimension D and size N:
Definition: FFTW_MultiDFTs.h:20
virtual void setFFT(const tUInt &f, const tSInt &dir, const tBoolean &isInverse, const tBoolean &optimize)
set the FFT at index f
Definition: FFTW_MultiDFTs.cpp:26
const tUIndex & getPointsNumber() const
get the number of points
Definition: FFTW_FFT.h:265
virtual void setSize(const CORE_UIndexArray &levels, const tUSInt &dim)
set the size of the FFT in multi-levels form
Definition: FFTW_MultiDFTs.h:123
tUIndex getPlansNumber() const
get the number of plans
Definition: FFTW_FFT.h:305
static CORE_Thread & getThread()
get the profilier
Definition: CORE_Object.h:211
virtual void clear()
clear the FFT
Definition: FFTW_MultiDFTs.cpp:14
virtual void setFFT(const tUInt &f, const tSInt &dir, const tBoolean &isInverse, const tBoolean &optimize)=0
set the FFT
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141