[1371] | 1 | // FFT (Fast Fourier Transform) Server based on FFTPack
|
---|
| 2 | // R. Ansari 1999-2000
|
---|
| 3 | // DAPNIA/SPP (Saclay) / CEA LAL - IN2P3/CNRS (Orsay)
|
---|
| 4 |
|
---|
[710] | 5 | #ifndef FFTPServer_H_SEEN
|
---|
| 6 | #define FFTPServer_H_SEEN
|
---|
| 7 |
|
---|
| 8 | #include "fftservintf.h"
|
---|
| 9 |
|
---|
| 10 | // implementation de FFTServerInterface en utilisant FFTPack
|
---|
| 11 |
|
---|
| 12 | namespace SOPHYA {
|
---|
| 13 |
|
---|
[896] | 14 | //! An FFT server based on fftpack.
|
---|
[710] | 15 | class FFTPackServer : public FFTServerInterface {
|
---|
| 16 | public:
|
---|
| 17 | FFTPackServer();
|
---|
| 18 | virtual ~FFTPackServer();
|
---|
| 19 |
|
---|
| 20 | // Implementation de l'interface FFTServerInterface
|
---|
| 21 |
|
---|
| 22 | virtual FFTServerInterface * Clone();
|
---|
| 23 |
|
---|
[717] | 24 | // Transforme unidimensionnel sur des double
|
---|
[710] | 25 | virtual void FFTForward(TVector< complex<r_8> > const & in, TVector< complex<r_8> > & out);
|
---|
| 26 | virtual void FFTBackward(TVector< complex<r_8> > const & in, TVector< complex<r_8> > & out);
|
---|
| 27 | virtual void FFTForward(TVector< r_8 > const & in, TVector< complex<r_8> > & out);
|
---|
| 28 | virtual void FFTBackward(TVector< complex<r_8> > const & in, TVector< r_8 > & out);
|
---|
| 29 |
|
---|
[717] | 30 | // Transforme unidimensionnel sur des float
|
---|
[710] | 31 | virtual void FFTForward(TVector< complex<r_4> > const & in, TVector< complex<r_4> > & out);
|
---|
| 32 | virtual void FFTBackward(TVector< complex<r_4> > const & in, TVector< complex<r_4> > & out);
|
---|
| 33 | virtual void FFTForward(TVector< r_4 > const & in, TVector< complex<r_4> > & out);
|
---|
| 34 | virtual void FFTBackward(TVector< complex<r_4> > const & in, TVector< r_4 > & out);
|
---|
| 35 |
|
---|
| 36 | // Methodes propres a cette classe
|
---|
[791] | 37 | virtual void fftf(int_4 l, float* inout);
|
---|
| 38 | virtual void fftb(int_4 l, float* inout);
|
---|
| 39 | virtual void fftf(int_4 l, double* inout);
|
---|
| 40 | virtual void fftb(int_4 l, double* inout);
|
---|
| 41 | virtual void fftf(int_4 l, complex<float>* inout);
|
---|
| 42 | virtual void fftb(int_4 l, complex<float>* inout);
|
---|
| 43 | virtual void fftf(int_4 l, complex<double>* inout);
|
---|
| 44 | virtual void fftb(int_4 l, complex<double>* inout);
|
---|
[710] | 45 |
|
---|
[717] | 46 | // Methodes statiques pour reordonner les donnees
|
---|
| 47 | virtual void ReShapetoReal( TVector< complex<r_8> > const & in, TVector< r_8 > & out);
|
---|
| 48 | virtual void ReShapetoReal( TVector< complex<r_4> > const & in, TVector< r_4 > & out);
|
---|
| 49 |
|
---|
| 50 | virtual void ReShapetoCompl(TVector< r_8 > const & in, TVector< complex<r_8> > & out);
|
---|
| 51 | virtual void ReShapetoCompl(TVector< r_4 > const & in, TVector< complex<r_4> > & out);
|
---|
| 52 |
|
---|
[710] | 53 | protected:
|
---|
[791] | 54 | virtual void checkint_rfft(int_4 l);
|
---|
| 55 | virtual void checkint_dfft(int_4 l);
|
---|
| 56 | virtual void checkint_cfft(int_4 l);
|
---|
| 57 | virtual void checkint_cdfft(int_4 l);
|
---|
[710] | 58 |
|
---|
| 59 | int sz_rfft;
|
---|
[791] | 60 | r_4* ws_rfft;
|
---|
[710] | 61 |
|
---|
| 62 | int sz_cfft;
|
---|
[791] | 63 | r_4* ws_cfft;
|
---|
[710] | 64 |
|
---|
| 65 | int sz_dfft;
|
---|
[791] | 66 | r_8* ws_dfft;
|
---|
[710] | 67 |
|
---|
| 68 | int sz_cdfft;
|
---|
[791] | 69 | r_8* ws_cdfft;
|
---|
[710] | 70 | };
|
---|
| 71 |
|
---|
| 72 | } // Fin du namespace
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | #endif
|
---|