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
22
class
SutraTemplate
{
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);
37
~SutraTemplate
();
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_
CarmaContext
this class provides the context in which CarmaObj are created
Definition:
carma_context.h:79
CarmaObj< float >
SutraTemplate
this class provides a class template to COMPASS
Definition:
sutra_template.h:22
SutraTemplate::d_res
CarmaObj< float > * d_res
Definition:
sutra_template.h:29
SutraTemplate::SutraTemplate
SutraTemplate(const SutraTemplate &aotemplate)
SutraTemplate::type
std::string type
Definition:
sutra_template.h:25
SutraTemplate::~SutraTemplate
~SutraTemplate()
SutraTemplate::SutraTemplate
SutraTemplate(CarmaContext *context, const char *type, long dim, int device)
SutraTemplate::fill_data
int fill_data(float *idata)
SutraTemplate::fill_data
int fill_data()
SutraTemplate::dim
long dim
Definition:
sutra_template.h:26
SutraTemplate::current_context
CarmaContext * current_context
Definition:
sutra_template.h:31
SutraTemplate::do_compute
int do_compute()
SutraTemplate::d_data
CarmaObj< float > * d_data
Definition:
sutra_template.h:28
SutraTemplate::device
int device
Definition:
sutra_template.h:24
comp_aotemplate
void comp_aotemplate(int threads, int blocks, T *d_idata, T *d_odata, int N)
sutra_wfs.h
libsutra
include.h
sutra_template.h
Generated by
1.9.1