COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
carma_fft.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // This file is part of COMPASS <https://anr-compass.github.io/compass/>
3 //
4 // Copyright (C) 2011-2019 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 // Distributed under GNU - LGPL
7 //
8 // COMPASS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
9 // General Public License as published by the Free Software Foundation, either version 3 of the License,
10 // or any later version.
11 //
12 // COMPASS: End-to-end AO simulation tool using GPU acceleration
13 // The COMPASS platform was designed to meet the need of high-performance for the simulation of AO systems.
14 //
15 // The final product includes a software package for simulating all the critical subcomponents of AO,
16 // particularly in the context of the ELT and a real-time core based on several control approaches,
17 // with performances consistent with its integration into an instrument. Taking advantage of the specific
18 // hardware architecture of the GPU, the COMPASS tool allows to achieve adequate execution speeds to
19 // conduct large simulation campaigns called to the ELT.
20 //
21 // The COMPASS platform can be used to carry a wide variety of simulations to both testspecific components
22 // of AO of the E-ELT (such as wavefront analysis device with a pyramid or elongated Laser star), and
23 // various systems configurations such as multi-conjugate AO.
24 //
25 // COMPASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
26 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 // See the GNU Lesser General Public License for more details.
28 //
29 // You should have received a copy of the GNU Lesser General Public License along with COMPASS.
30 // If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.
31 // -----------------------------------------------------------------------------
32 
41 
42 
43 #ifndef _CARMA_FFT_H_
44 #define _CARMA_FFT_H_
45 
46 #include <carma_obj.h>
47 #include <cufft.h>
48 
49 template <class T_in, class T_out>
50 class CarmaFFT {
51  protected:
54  cufftHandle plan;
55  cufftType type_plan;
56  int inplace;
57 
58  public:
59  CarmaFFT(long *dims_data, int inplace);
61 
62  int host2device(T_in *data);
63  int device2host(T_out *data);
66  int compute(int dir);
68  int compute(T_in *input, T_out *output, int dir);
70 };
71 
75 
79 
80 #endif // _CARMA_FFT_H_
caFFT_Z2D
CarmaFFT< cuDoubleComplex, cufftDoubleReal > caFFT_Z2D
Definition: carma_fft.h:78
CarmaFFT
this class provides the fft features to CarmaObj
Definition: carma_fft.h:50
caFFT_R2C
CarmaFFT< cufftReal, cuFloatComplex > caFFT_R2C
Definition: carma_fft.h:73
CarmaFFT::compute
int compute(T_in *input, T_out *output, int dir)
CarmaFFT::type_plan
cufftType type_plan
FFT plan type.
Definition: carma_fft.h:55
CarmaFFT::d_input
CarmaObj< T_in > * d_input
Input data.
Definition: carma_fft.h:52
caFFT_C2C
CarmaFFT< cuFloatComplex, cuFloatComplex > caFFT_C2C
Definition: carma_fft.h:72
CarmaFFT::compute
int compute(int dir)
CarmaFFT::~CarmaFFT
~CarmaFFT()
CarmaFFT::host2device
int host2device(T_in *data)
CarmaFFT::d_output
CarmaObj< T_out > * d_output
Output data.
Definition: carma_fft.h:53
CarmaFFT::device2host
int device2host(T_out *data)
CarmaFFT::CarmaFFT
CarmaFFT(long *dims_data, int inplace)
caFFT_Z2Z
CarmaFFT< cuDoubleComplex, cuDoubleComplex > caFFT_Z2Z
Definition: carma_fft.h:76
CarmaObj< T_in >
carma_obj.h
caFFT_D2Z
CarmaFFT< cufftDoubleReal, cuDoubleComplex > caFFT_D2Z
Definition: carma_fft.h:77
caFFT_C2R
CarmaFFT< cuFloatComplex, cufftReal > caFFT_C2R
Definition: carma_fft.h:74
CarmaFFT::inplace
int inplace
flag to select inplace transform or not (1 or 0)
Definition: carma_fft.h:56
CarmaFFT::plan
cufftHandle plan
FFT plan.
Definition: carma_fft.h:54