Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

CplxFFT.h

Go to the documentation of this file.
00001 
00034 #ifndef H_CPLXFFT
00035 #define H_CPLXFFT
00036 
00037 #ifndef NO_DEPENDENCY_INCLUDES
00038 
00039 // the FFTW system-dependent #include polka
00040 #ifdef __APPLE__
00041 #include "dfftw_threads.h"
00042 #include "drfftw_threads.h"
00043 #elif defined(__CYGWIN32__)
00044 #include "fftw.h"
00045 #include "rfftw.h"
00046 #define fftw_threads_init() 
00047 #define fftw_threads_one(a,b,c,d) fftw_one(b,c,d)
00048 #define rfftw_threads_one(a,b,c,d) rfftw_one(b,c,d)
00049 #else
00050 #include "fftw_threads.h"
00051 #include "rfftw_threads.h"
00052 #endif
00053 
00054 // GIPS includes
00055 #include "Physics.h"
00056 #include "Instrument.h"
00057 #include "ProtocolRole.h"
00058 #include "Operator.h"
00059 
00060 #endif
00061 
00062 namespace CplxFFT 
00063 {    
00065     struct Config_t {
00066         size_t npts; 
00067         explicit Config_t( size_t n ): npts( n ) { };
00068     }; // struct Config_t
00069     
00070     typedef  Connector::InputPort< Instrument::BlitzCplxDoubleVector > &JackIn;
00071     typedef  Connector::OutputPort< Instrument::BlitzCplxDoubleVector > &JackOut;
00072     typedef  Connector::InputPort< Config_t > &JackConfig;
00073     
00075     struct Ports {
00076         JackIn shiftedInterferogram; 
00077         JackOut prefoldedSpectrum; 
00078         JackConfig config; 
00079         
00080         Ports( JackIn i, JackOut o, JackConfig c ): 
00081             shiftedInterferogram(i), prefoldedSpectrum(o), config(c) 
00082         {}; 
00083         ~Ports() {}; 
00084     };
00085  
00089     class CplxFFTOperator: Operator::AbstractOperator
00090     {
00091 private:
00092         fftw_plan plan; // cached machine-dependent plan
00093         Ports &ports;
00094 public:
00095         explicit CplxFFTOperator( Ports & ); 
00096         virtual ~CplxFFTOperator(); 
00097         virtual Operator::Result operator() ( ); 
00098     }; // class Operator
00099     
00100     
00101 } // namespace
00102 #endif

Generated on Fri Oct 8 15:37:38 2004 for Calibrate.InterferogramToSpectrum by doxygen 1.3.4