COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
sutra_controller_cured.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 #ifndef _SUTRA_CONTROLLER_CURED_H_
43 #define _SUTRA_CONTROLLER_CURED_H_
44 
45 #include <sutra_controller.h>
46 
47 template <typename Tcomp, typename Tout>
48 class SutraControllerCured : public SutraController<Tcomp, Tout> {
49  public:
50  int ndivs; // number of subdivision levels for cured
51  bool tt_flag; // flag for separate tt
52 
53  // data for CuReD */
56  CarmaObj<Tcomp> *d_err; // current error
57  CarmaObj<Tcomp> *d_cenbuff; // centroids circular buffer
58 
59  // data for CuReD */
61 
62  // structures needed to run CuReD */
63  // sysCure* h_syscure;
64  void *h_syscure;
65  // parCure* h_parcure;
66  void *h_parcure;
67 
68  public:
69  SutraControllerCured(CarmaContext *context, long nvalid, long nslope,
70  long nactu, float delay, SutraDms *dms, int *idx_dms,
71  int ndm, int *idx_centro, int ncentro);
74 
75  string get_type() { return "cured"; }
76 
77  int comp_com();
78 
79  int init_cured(int nxsubs, int *isvalid, int ndivs, int tt);
80  int frame_delay();
81 };
82 
83 #endif // _SUTRA_CONTROLLER_CURED_H_
sutra_controller.h
SutraController::delay
Tcomp delay
Definition: sutra_controller.h:79
SutraControllerCured::get_type
string get_type()
Definition: sutra_controller_cured.h:75
SutraDms
Definition: sutra_dm.h:164
SutraControllerCured::d_imat
CarmaObj< Tcomp > * d_imat
Definition: sutra_controller_cured.h:60
SutraControllerCured::d_err
CarmaObj< Tcomp > * d_err
Definition: sutra_controller_cured.h:56
SutraControllerCured::h_parcure
void * h_parcure
Definition: sutra_controller_cured.h:66
SutraControllerCured::SutraControllerCured
SutraControllerCured(const SutraControllerCured &controller)
SutraControllerCured::~SutraControllerCured
~SutraControllerCured()
SutraControllerCured::ndivs
int ndivs
Definition: sutra_controller_cured.h:50
SutraControllerCured::frame_delay
int frame_delay()
CarmaObj< Tcomp >
CarmaContext
this class provides the context in which CarmaObj are created
Definition: carma_context.h:104
SutraControllerCured::SutraControllerCured
SutraControllerCured(CarmaContext *context, long nvalid, long nslope, long nactu, float delay, SutraDms *dms, int *idx_dms, int ndm, int *idx_centro, int ncentro)
SutraControllerCured::comp_com
int comp_com()
!!! YOU MUST set d_centroids before calling it!!!!
SutraController::nslope
int nslope()
Definition: sutra_controller.h:124
CarmaHostObj< Tcomp >
SutraControllerCured::d_cenbuff
CarmaObj< Tcomp > * d_cenbuff
Definition: sutra_controller_cured.h:57
SutraControllerCured::h_err
CarmaHostObj< Tcomp > * h_err
Definition: sutra_controller_cured.h:55
SutraControllerCured::h_syscure
void * h_syscure
Definition: sutra_controller_cured.h:64
SutraController::nactu
int nactu()
Definition: sutra_controller.h:123
SutraControllerCured::h_centroids
CarmaHostObj< Tcomp > * h_centroids
Definition: sutra_controller_cured.h:54
SutraControllerCured::tt_flag
bool tt_flag
Definition: sutra_controller_cured.h:51
SutraControllerCured::init_cured
int init_cured(int nxsubs, int *isvalid, int ndivs, int tt)
SutraControllerCured
this class provides the controller_cured features to COMPASS
Definition: sutra_controller_cured.h:48
SutraController
this class provides the controller features to COMPASS
Definition: sutra_controller.h:73