COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_template.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-2023 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 
7 // -----------------------------------------------------------------------------
8 
16 
17 #ifndef _SUTRA_AOTEMPLATE_H_
18 #define _SUTRA_AOTEMPLATE_H_
19 
20 #include <sutra_wfs.h>
21 
23  public:
24  int device; // # device
25  std::string type; // a name for your data
26  long dim; // # of elements
27 
28  CarmaObj<float> *d_data; // the data
29  CarmaObj<float> *d_res; // the result
30 
31  CarmaContext *current_context; // the context in which it has been created
32 
33  public:
34  SutraTemplate(CarmaContext *context, const char *type, long dim,
35  int device);
36  SutraTemplate(const SutraTemplate &aotemplate);
38 
39  int fill_data(float *idata);
40  int fill_data();
41  int do_compute();
42 };
43 template <class T>
44 void comp_aotemplate(int threads, int blocks, T *d_idata, T *d_odata, int N);
45 
46 #endif // _SUTRA_AOTEMPLATE_H_
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
this class provides a class template to COMPASS
CarmaObj< float > * d_res
SutraTemplate(const SutraTemplate &aotemplate)
std::string type
SutraTemplate(CarmaContext *context, const char *type, long dim, int device)
int fill_data(float *idata)
CarmaContext * current_context
CarmaObj< float > * d_data
void comp_aotemplate(int threads, int blocks, T *d_idata, T *d_odata, int N)