![]() |
COMPASS
5.4.4
End-to-end AO simulation tool using GPU acceleration
|
#include <carma_context.h>#include <carma_streams.h>#include <carma_utils.h>#include <curand.h>#include <curand_kernel.h>#include <iostream>#include <type_traits>#include <typeinfo>Go to the source code of this file.
Classes | |
| class | CarmaData< T_data > |
| class | CarmaObj< T_data > |
| this class provides wrappers to the generic carma object More... | |
Macros | |
| #define | BLOCK_SZ 16 |
Typedefs | |
| typedef CarmaObj< int > | CarmaObjI |
| typedef CarmaObj< unsigned int > | CarmaObjUI |
| typedef CarmaObj< uint16_t > | CarmaObjUSI |
| typedef CarmaObj< float > | CarmaObjS |
| typedef CarmaObj< double > | CarmaObjD |
| typedef CarmaObj< float2 > | CarmaObjS2 |
| typedef CarmaObj< double2 > | CarmaObjD2 |
| typedef CarmaObj< cuFloatComplex > | CarmaObjC |
| typedef CarmaObj< cuDoubleComplex > | CarmaObjZ |
Enumerations | |
| enum | MemType { MT_DEVICE , MT_DARRAY , MT_HOST , MT_PAGELOCK , MT_ZEROCPY , MT_PORTABLE , MT_WRICOMB , MT_GENEPIN } |
Functions | |
| template<class T_data > | |
| std::ostream & | operator<< (std::ostream &os, CarmaObj< T_data > &obj) |
| template<class T_data > | |
| void | clip_array (T_data *d_data, T_data min, T_data max, int N, CarmaDevice *device, cudaStream_t stream) |
| template<class T_data > | |
| void | reduce (int size, int threads, int blocks, T_data *d_idata, T_data *d_odata) |
| template<class T_data > | |
| T_data | reduce (T_data *data, int N) |
| template<class T_data > | |
| void | init_reduceCubCU (T_data *&cub_data, size_t &cub_data_size, T_data *data, T_data *&o_data, int N) |
| template<class T_data > | |
| void | reduceCubCU (T_data *cub_data, size_t cub_data_size, T_data *data, T_data *o_data, int N, cudaStream_t stream=0) |
| template<class T_data > | |
| int | transposeCU (T_data *d_idata, T_data *d_odata, long N1, long N2) |
| template<class T_data > | |
| int | launch_generic1d (T_data *d_idata, T_data *d_odata, int N, CarmaDevice *device) |
| template<class T_data > | |
| int | launch_generic2d (T_data *d_odata, T_data *d_idata, int N1, int N2) |
| int | carma_prng_init (int *seed, const int nb_threads, const int nb_blocks, curandState *state) |
| template<class T > | |
| int | carma_prng_cu (T *results, const int nb_threads, const int nb_blocks, curandState *state, char gtype, int n, float alpha, float beta) |
| template<class T > | |
| int | carma_curand_montagn (curandState *state, T *d_odata, int N, CarmaDevice *device) |
| template<class T_in , class T_out > | |
| cufftType | carma_select_plan () |
| template<class T_in , class T_out > | |
| void | carma_initfft (const long *dims_data, cufftHandle *plan, cufftType type_plan) |
| template<class T_in , class T_out > | |
| int | CarmaFFT (T_in *input, T_out *output, int dir, cufftHandle plan) |
| template<class T_data > | |
| int | fillindex (T_data *d_odata, T_data *d_idata, int *indx, int N, CarmaDevice *device) |
| template<class T_data > | |
| int | fillvalues (T_data *d_odata, T_data *val, int N, CarmaDevice *device) |
| template<class T > | |
| int | getarray2d (T *d_odata, T *d_idata, int x0, int Ncol, int NC, int N, CarmaDevice *device) |
| template<class T > | |
| int | fillarray2d (T *d_odata, T *d_idata, int x0, int Ncol, int NC, int N, CarmaDevice *device) |
| template<class T > | |
| int | fillarray2d2 (T *d_odata, T *d_idata, int x0, int Ncol, int NC, int N, CarmaDevice *device) |
| template<class T > | |
| int | fill_sym_matrix (char src_uplo, T *d_data, int Ncol, int N, CarmaDevice *device) |
| template<class T > | |
| int | carma_plus (T *d_odata, T elpha, int N, CarmaDevice *device) |
| template<class T > | |
| int | carma_plusai (T *d_odata, T *i_data, int i, int sgn, int N, CarmaDevice *device) |
| template<class T > | |
| int | extract (T *d_smallimg, const T *d_fullimg, int fullimg_size, int center_pos, int extract_size, bool roll) |
| Kernel to extract a part of the image centred on center_pos. More... | |
| #define BLOCK_SZ 16 |
Definition at line 53 of file carma_obj.h.
Definition at line 367 of file carma_obj.h.
Definition at line 364 of file carma_obj.h.
| typedef CarmaObj<double2> CarmaObjD2 |
Definition at line 366 of file carma_obj.h.
Definition at line 360 of file carma_obj.h.
Definition at line 363 of file carma_obj.h.
| typedef CarmaObj<float2> CarmaObjS2 |
Definition at line 365 of file carma_obj.h.
| typedef CarmaObj<unsigned int> CarmaObjUI |
Definition at line 361 of file carma_obj.h.
| typedef CarmaObj<uint16_t> CarmaObjUSI |
Definition at line 362 of file carma_obj.h.
Definition at line 368 of file carma_obj.h.
| enum MemType |
| Enumerator | |
|---|---|
| MT_DEVICE | |
| MT_DARRAY | |
| MT_HOST | |
| MT_PAGELOCK | |
| MT_ZEROCPY | |
| MT_PORTABLE | |
| MT_WRICOMB | |
| MT_GENEPIN | |
Definition at line 55 of file carma_obj.h.
| int carma_curand_montagn | ( | curandState * | state, |
| T * | d_odata, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| void carma_initfft | ( | const long * | dims_data, |
| cufftHandle * | plan, | ||
| cufftType | type_plan | ||
| ) |
| int carma_plus | ( | T * | d_odata, |
| T | elpha, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int carma_plusai | ( | T * | d_odata, |
| T * | i_data, | ||
| int | i, | ||
| int | sgn, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int carma_prng_cu | ( | T * | results, |
| const int | nb_threads, | ||
| const int | nb_blocks, | ||
| curandState * | state, | ||
| char | gtype, | ||
| int | n, | ||
| float | alpha, | ||
| float | beta | ||
| ) |
| int carma_prng_init | ( | int * | seed, |
| const int | nb_threads, | ||
| const int | nb_blocks, | ||
| curandState * | state | ||
| ) |
| cufftType carma_select_plan | ( | ) |
| int CarmaFFT | ( | T_in * | input, |
| T_out * | output, | ||
| int | dir, | ||
| cufftHandle | plan | ||
| ) |
| void clip_array | ( | T_data * | d_data, |
| T_data | min, | ||
| T_data | max, | ||
| int | N, | ||
| CarmaDevice * | device, | ||
| cudaStream_t | stream | ||
| ) |
| int extract | ( | T * | d_smallimg, |
| const T * | d_fullimg, | ||
| int | fullimg_size, | ||
| int | center_pos, | ||
| int | extract_size, | ||
| bool | roll | ||
| ) |
Kernel to extract a part of the image centred on center_pos.
| T | type of the image items |
| d_smallimg | extracted small image of size extract_size*extract_size |
| d_fullimg | full image of size fullimg_size*fullimg_size |
| fullimg_size | size of the d_fullimg leading dimension |
| center_pos | position of the center of d_smallimg in d_fullimg |
| extract_size | size of the d_smallimg leading dimension |
| roll | get pixels as if d_fullimg need to be roll |
| int fill_sym_matrix | ( | char | src_uplo, |
| T * | d_data, | ||
| int | Ncol, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int fillarray2d | ( | T * | d_odata, |
| T * | d_idata, | ||
| int | x0, | ||
| int | Ncol, | ||
| int | NC, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int fillarray2d2 | ( | T * | d_odata, |
| T * | d_idata, | ||
| int | x0, | ||
| int | Ncol, | ||
| int | NC, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int fillindex | ( | T_data * | d_odata, |
| T_data * | d_idata, | ||
| int * | indx, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int fillvalues | ( | T_data * | d_odata, |
| T_data * | val, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int getarray2d | ( | T * | d_odata, |
| T * | d_idata, | ||
| int | x0, | ||
| int | Ncol, | ||
| int | NC, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| void init_reduceCubCU | ( | T_data *& | cub_data, |
| size_t & | cub_data_size, | ||
| T_data * | data, | ||
| T_data *& | o_data, | ||
| int | N | ||
| ) |
| int launch_generic1d | ( | T_data * | d_idata, |
| T_data * | d_odata, | ||
| int | N, | ||
| CarmaDevice * | device | ||
| ) |
| int launch_generic2d | ( | T_data * | d_odata, |
| T_data * | d_idata, | ||
| int | N1, | ||
| int | N2 | ||
| ) |
| std::ostream& operator<< | ( | std::ostream & | os, |
| CarmaObj< T_data > & | obj | ||
| ) |
| void reduce | ( | int | size, |
| int | threads, | ||
| int | blocks, | ||
| T_data * | d_idata, | ||
| T_data * | d_odata | ||
| ) |
| T_data reduce | ( | T_data * | data, |
| int | N | ||
| ) |
| void reduceCubCU | ( | T_data * | cub_data, |
| size_t | cub_data_size, | ||
| T_data * | data, | ||
| T_data * | o_data, | ||
| int | N, | ||
| cudaStream_t | stream = 0 |
||
| ) |
| int transposeCU | ( | T_data * | d_idata, |
| T_data * | d_odata, | ||
| long | N1, | ||
| long | N2 | ||
| ) |