source: Sophya/trunk/SophyaExt/IFFTW/fftwserver.h@ 3477

Last change on this file since 3477 was 3359, checked in by ansari, 18 years ago

Ajout methode version r_4 (float) a FFTWServer (sous condition de flag) - Reza 23/10/2007

File size: 2.7 KB
Line 
1#ifndef FFTWServer_H_SEEN
2#define FFTWServer_H_SEEN
3
4#include "machdefs.h"
5#include "sspvflags.h"
6#include "fftservintf.h"
7
8
9// Classe implementant l'interface FFTServerInterface en
10// utilisant FFTW
11
12namespace SOPHYA {
13
14#ifdef FFTW_V2_EXTSOP
15class FFTWServerPlan;
16#endif
17
18class FFTWServer : public FFTServerInterface {
19 public:
20 FFTWServer(bool preserve_input=true);
21 virtual ~FFTWServer();
22
23
24 virtual FFTServerInterface * Clone();
25
26 // Transforme unidimensionnelle , N-dimensionnel (double precision - r_8)
27 virtual void FFTForward(TArray< complex<r_8> > & in, TArray< complex<r_8> > & out);
28 virtual void FFTBackward(TArray< complex<r_8> > & in, TArray< complex<r_8> > & out);
29 virtual void FFTForward(TArray< r_8 > & in, TArray< complex<r_8> > & out);
30 virtual void FFTBackward(TArray< complex<r_8> > & in, TArray< r_8 > & out,
31 bool usoutsz=false);
32
33// Methodes statiques pour reordonner les donnees en 1-D (double precision - r_8)
34 static void ReShapetoReal(TArray< complex<r_8> > const & in, TArray< r_8 > & out, bool usz);
35 static void ReShapetoCompl(TArray< r_8 > const & in, TArray< complex<r_8> > & out);
36
37#ifdef ALSO_FFTW_FLOAT_EXTSOP
38 /* ---------------------------------------------------------------------------
39 Declare and compile single precision (float) version of FFTWServr methods
40 Needs the libfftw3f.a , in addition to libfftw3.a
41 --------------------------------------------------------------------------- */
42
43 // Transforme unidimensionnelle , N-dimensionnel (single precision - r_4)
44 virtual void FFTForward(TArray< complex<r_4> > & in, TArray< complex<r_4> > & out);
45 virtual void FFTBackward(TArray< complex<r_4> > & in, TArray< complex<r_4> > & out);
46 virtual void FFTForward(TArray< r_4 > & in, TArray< complex<r_4> > & out);
47 virtual void FFTBackward(TArray< complex<r_4> > & in, TArray< r_4 > & out,
48 bool usoutsz=false);
49
50// Methodes statiques pour reordonner les donnees en 1-D (single precision - r_4)
51 static void ReShapetoReal(TArray< complex<r_4> > const & in, TArray< r_4 > & out, bool usz);
52 static void ReShapetoCompl(TArray< r_4 > const & in, TArray< complex<r_4> > & out);
53
54#endif
55
56 protected:
57
58#ifndef FFTW_V2_EXTSOP
59/* For FFTW >= V3 */
60 FFTArrayChecker<r_8> ckR8;
61 FFTArrayChecker<r_4> ckR4;
62 bool _preserve_input; // if true, input arrays not overwritten
63
64#else
65/* For FFTW V2 */
66 FFTWServerPlan * _p1df;
67 FFTWServerPlan * _p1db;
68 FFTWServerPlan * _pndf;
69 FFTWServerPlan * _pndb;
70
71 FFTWServerPlan * _p1drf;
72 FFTWServerPlan * _p1drb;
73 FFTWServerPlan * _pndrf;
74 FFTWServerPlan * _pndrb;
75
76 FFTArrayChecker<r_8> ckR8;
77 bool _preserve_input; // if true, input arrays not overwritten
78
79#endif
80};
81
82} // Fin du namespace
83
84#endif
Note: See TracBrowser for help on using the repository browser.