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