 |
COMPASS
5.0.0
End-to-end AO simulation tool using GPU acceleration
|
Go to the documentation of this file.
42 #ifndef _SUTRA_CONTROLLER_H_
43 #define _SUTRA_CONTROLLER_H_
60 template <
typename Tcomp,
typename Tout>
61 typename std::enable_if<std::is_same<Tcomp, Tout>::value,
void>::type
66 template <
typename Tcomp,
typename Tout>
67 typename std::enable_if<!std::is_same<Tcomp, Tout>::value,
void>::type
72 template <
typename Tcomp,
typename Tout>
111 float delay,
SutraDms *dms,
int *idx_dms,
int ndm,
int *idx_centro,
int ncentro);
129 init_voltage_impl<Tcomp, Tout>(this->d_voltage, this->d_com_clipped);
161 template <
typename Tin,
typename Tout>
162 typename std::enable_if<std::is_same<Tin, Tout>::value,
void>::type
166 template <
typename Tin,
typename Tout>
167 typename std::enable_if<!std::is_same<Tin, Tout>::value,
void>::type
168 convert_to_voltage(Tin *d_idata, Tout *d_odata,
int N,
float volt_min,
float volt_max,
174 int fill_cmat(
float *cmat,
float *wtt,
float *Mtt,
int nactu,
int nslopes,
176 int do_statmat(
float *statcov,
long dim,
float *xpos,
float *ypos,
float norm,
185 int absnormfft(cuFloatComplex *idata,
float *odata,
int N,
float norm,
189 #endif // _SUTRA_CONTROLLER_H_
int disable_perturb_voltage(string name)
int add_perturb_voltage(string name, float *perturb, int N)
this file provides the cublas features to CarmaObj
int do_statmat(float *statcov, long dim, float *xpos, float *ypos, float norm, CarmaDevice *device)
int set_open_loop(int open_loop_status, bool rst=true)
virtual ~SutraController()
int set_centroids_ref(Tcomp *centroids_ref)
int shift_buf(float *d_data, int offset, int N, CarmaDevice *device)
CarmaObj< Tout > * d_voltage
int absnormfft(cuFloatComplex *idata, float *odata, int N, float norm, CarmaDevice *device)
int enable_perturb_voltage(string name)
map< string, tuple< CarmaObj< Tcomp > *, int, bool > > d_perturb_map
CarmaObj< Tcomp > * d_com1
CarmaContext * get_context()
int adjust_csr_index(int *rowind, int *NNZ, int *nact, int nact_tot, int row_off, CarmaDevice *device)
std::enable_if< std::is_same< Tcomp, Tout >::value, void >::type init_voltage_impl(CarmaObj< Tout > *&volts, CarmaObj< Tcomp > *comClipped)
CarmaObj< Tcomp > * d_com_padded
virtual int comp_com()=0
!!! YOU MUST set d_centroids before calling it!!!!
int fill_filtmat(float *filter, int nactu, int N, CarmaDevice *device)
CarmaObj< Tcomp > * d_centroids
CarmaObj< Tcomp > * d_com_clipped
int set_volt_min(float volt_min)
int get_pupphase(T *odata, float *idata, int *indx_pup, int Nphi, CarmaDevice *device)
this class provides the stream features to CarmaObj
vector< SutraDm * > d_dmseen
int fill_cmat(float *cmat, float *wtt, float *Mtt, int nactu, int nslopes, CarmaDevice *device)
virtual string get_type()=0
int set_val_max(float val_max)
int set_delay(float delay)
std::deque< CarmaObj< Tcomp > * > d_circular_coms
this class provides the context in which CarmaObj are created
CarmaObj< Tcomp > * d_centroids_padded
cublasHandle_t get_cublas_handle()
int reset_perturb_voltage()
int compute_Hcor_gpu(float *o_data, int nrow, int ncol, float Fs, float gmin, float gmax, float delay, CarmaDevice *device)
std::enable_if< std::is_same< Tin, Tout >::value, void >::type convert_to_voltage(Tin *d_idata, Tout *d_odata, int N, float volt_min, float volt_max, uint16_t val_max, CarmaDevice *device)
CarmaObj< Tcomp > * d_com
int TT_filt(float *mat, int n, CarmaDevice *device)
cublasHandle_t cublas_handle()
int set_com(float *com, int nElem)
CarmaContext * current_context
int set_perturb_voltage(string name, float *perturb, int N)
int remove_perturb_voltage(string name)
SutraController(CarmaContext *context, int nvalid, int nslope, int nactu, float delay, SutraDms *dms, int *idx_dms, int ndm, int *idx_centro, int ncentro)
int set_volt_max(float volt_max)
this class provides the controller features to COMPASS