C++ main module for emicrom Package  1.0
FFTW_Plan.h
Go to the documentation of this file.
1 #ifndef FFTW_Plan_H
2 #define FFTW_Plan_H
3 
4 #include "FFTW_Object.h"
5 
15 class FFTW_Plan : public virtual FFTW_Object {
17  // ATTRIBUTES
18 
19 
20 
21 private:
22 
23  // ASSOCIATIONS
25 
30 
31 
32 protected:
33  // METHODS
34 
35  // CONSTRUCTORS
36 
38  FFTW_Plan(void);
39 
40 
41 
42  // DESTRUCTORS
43 
44 
47  virtual ~FFTW_Plan(void);
48 
49 
50 public:
51 
54  inline static SP::FFTW_Plan New() {
55  SP::FFTW_Plan p(new FFTW_Plan(),FFTW_Plan::Delete());
56  p->setThis(p);
57  return p;
58  }
59 
60 
61 public:
62  //operator
63 
64 
65 
66 
67  // SET methods
71  void copy(const FFTW_Plan& c);
72 
85  inline void optimize(const tBoolean& v) {
86  if (v) mOptimization=FFTW_MEASURE;
87  else mOptimization=FFTW_ESTIMATE;
88  }
89 
94  inline void setDirection(const tSInt& dir,const tBoolean& isInverse) {
95  mDirection=dir;
96  mIsInverse=isInverse;
97  }
98 
102  inline void setDimension(const tUSInt& dim) {
103  mDimension=dim;
104  }
105 
106 
107  //GET Methods
111  inline const tUSInt& getDimension() const {
112  return mDimension;
113  }
117  inline const tSInt& getDirection() const {
118  return mDirection;
119  }
123  inline tSInt getExponent() const {
124  if (mIsInverse) return -mDirection;
125  return mDirection;
126  }
127 
131  inline const tBoolean& isInverse() const {
132  return mIsInverse;
133  }
137  inline tBoolean isOptimized() const {
138  return (mOptimization==FFTW_MEASURE);
139  }
140 
141 
142  // OTHERS methods
143 
144 
150  void create(const tUIndex& n,tFFTWComplex* vs,const tUInteger& nThreads);
151 
152 
156  tBoolean run();
157 private:
160  void destroy();
161 
162 
163 
164 
165 };
166 
167 #endif
tSInt getExponent() const
return the sign of the exponent of the N-th unity root
Definition: FFTW_Plan.h:123
This class describes an FFT Plan.
Definition: FFTW_Plan.h:15
#define FFTW_PLAN
Definition: fftw_types.h:74
const tSInt & getDirection() const
return the direction
Definition: FFTW_Plan.h:117
#define DEFINE_SVPTR(X)
Definition: CORE_ArrayPointers.h:24
tBoolean isOptimized() const
return true if the plan is optimized
Definition: FFTW_Plan.h:137
DEFINE_SPTR(FFTW_Plan)
#define tUInteger
Definition: types.h:91
const tBoolean & isInverse() const
return true if the inverse is computing
Definition: FFTW_Plan.h:131
tBoolean mIsInverse
Definition: FFTW_Plan.h:26
#define tUSInt
Definition: types.h:28
#define tBoolean
Definition: types.h:139
#define tFFTWComplex
Definition: fftw_types.h:65
void setDirection(const tSInt &dir, const tBoolean &isInverse)
set the direction of plan
Definition: FFTW_Plan.h:94
tBoolean run(int argc, char *argv[])
Definition: EMMH_Main.cpp:4
static SP::FFTW_Plan New()
create a new Plan
Definition: FFTW_Plan.h:54
void setDimension(const tUSInt &dim)
set the dimension
Definition: FFTW_Plan.h:102
tUSInt mOptimization
Definition: FFTW_Plan.h:28
#define SP_OBJECT(X)
Definition: CORE_Pointers.h:203
#define tSInt
Definition: types.h:30
This class is the base class of FFTW objects.
Definition: FFTW_Object.h:19
#define tUIndex
Definition: types.h:126
FFTW_PLAN mPlan
Definition: FFTW_Plan.h:24
tUSInt mDimension
Definition: FFTW_Plan.h:29
tSInt mDirection
Definition: FFTW_Plan.h:27
const tUSInt & getDimension() const
return the dimension of the plan
Definition: FFTW_Plan.h:111
void optimize(const tBoolean &v)
optimize the plan or not
Definition: FFTW_Plan.h:85
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141