![]() |
COMPASS
5.0.0
End-to-end AO simulation tool using GPU acceleration
|
this class provides wrappers to the generic carma object More...
#include <carma_host_obj.h>
Public Member Functions | |
CarmaObj (const CarmaObj< T_data > *obj) | |
CarmaObj (CarmaContext *current_context, const long *dims_data) | |
CarmaObj (CarmaContext *current_context, const CarmaObj< T_data > *obj) | |
CarmaObj (CarmaContext *current_context, const long *dims_data, const T_data *data) | |
CarmaObj (CarmaContext *current_context, const long *dims_data, int nb_streams) | |
CarmaObj (CarmaContext *current_context, const CarmaObj< T_data > *obj, int nb_streams) | |
CarmaObj (CarmaContext *current_context, const long *dims_data, const T_data *data, int nb_streams) | |
~CarmaObj () | |
void | sync_h_data () |
T_data * | get_h_data () |
int | get_nb_streams () const |
int | add_stream () |
int | add_stream (int nb) |
int | del_stream () |
int | del_stream (int nb) |
cudaStream_t | get_cuda_stream (int stream) |
int | wait_stream (int stream) |
int | wait_all_streams () |
void | swap_ptr (T_data *ptr) |
void | dealloc () |
operator T_data * () | |
std::string | to_string () |
operator std::string () | |
char const * | c_str () |
const T_data | operator[] (int index) const |
T_data * | get_data () |
T_data * | get_data_at (int index) |
T_data * | get_o_data () |
const T_data | get_o_data_value () const |
const long * | get_dims () |
long | get_dims (int i) |
int | get_nb_elements () |
CarmaContext * | get_context () |
int | get_device () |
bool | is_rng_init () |
template<typename T_dest > | |
int | host2device (const T_dest *data) |
template<typename T_dest > | |
int | device2host (T_dest *data) |
int | host2device_async (const T_data *data, cudaStream_t stream) |
int | device2host_async (T_data *data, cudaStream_t stream) |
int | device2host_opt (T_data *data) |
int | host2device_vect (const T_data *data, int incx, int incy) |
int | device2host_vect (T_data *data, int incx, int incy) |
int | host2device_mat (const T_data *data, int lda, int ldb) |
int | device2host_mat (T_data *data, int lda, int ldb) |
int | copy_into (T_data *data, int nb_elem) |
int | copy_from (const T_data *data, int nb_elem) |
int | reset () |
int | memset (T_data value) |
cufftHandle * | get_plan () |
FFT plan. More... | |
cufftType | get_type_plan () |
FFT plan type. More... | |
unsigned int * | get_values () |
optional data (used for sort) More... | |
T_data | sum () |
void | init_reduceCub () |
void | reduceCub () |
void | clip (T_data min, T_data max) |
int | transpose (CarmaObj< T_data > *source) |
int | aimax (int incx) |
int | aimin (int incx) |
T_data | asum (int incx) |
T_data | nrm2 (int incx) |
T_data | dot (CarmaObj< T_data > *source, int incx, int incy) |
void | scale (T_data alpha, int incx) |
void | swap (CarmaObj< T_data > *source, int incx, int incy) |
void | copy (CarmaObj< T_data > *source, int incx, int incy) |
void | axpy (T_data alpha, CarmaObj< T_data > *source, int incx, int incy, int offset=0) |
void | rot (CarmaObj< T_data > *source, int incx, int incy, T_data sc, T_data ss) |
void | gemv (char trans, T_data alpha, CarmaObj< T_data > *matA, int lda, CarmaObj< T_data > *vectx, int incx, T_data beta, int incy) |
void | ger (T_data alpha, CarmaObj< T_data > *vectx, int incx, CarmaObj< T_data > *vecty, int incy, int lda) |
void | symv (char uplo, T_data alpha, CarmaObj< T_data > *matA, int lda, CarmaObj< T_data > *vectx, int incx, T_data beta, int incy) |
void | gemm (char transa, char transb, T_data alpha, CarmaObj< T_data > *matA, int lda, CarmaObj< T_data > *matB, int ldb, T_data beta, int ldc) |
void | symm (char side, char uplo, T_data alpha, CarmaObj< T_data > *matA, int lda, CarmaObj< T_data > *matB, int ldb, T_data beta, int ldc) |
void | syrk (char uplo, char transa, T_data alpha, CarmaObj< T_data > *matA, int lda, T_data beta, int ldc) |
void | syrkx (char uplo, char transa, T_data alpha, CarmaObj< T_data > *matA, int lda, CarmaObj< T_data > *matB, int ldb, T_data beta, int ldc) |
void | geam (char transa, char transb, T_data alpha, CarmaObj< T_data > *matA, int lda, T_data beta, CarmaObj< T_data > *matB, int ldb, int ldc) |
void | dgmm (char side, CarmaObj< T_data > *matA, int lda, CarmaObj< T_data > *vectx, int incx, int ldc) |
int | init_prng () |
int | init_prng (long seed) |
int | destroy_prng () |
int | prng (T_data *output, char gtype, float alpha, float beta) |
int | prng (T_data *output, char gtype, float alpha) |
int | prng (char gtype, float alpha, float beta) |
int | prng (char gtype, float alpha) |
int | prng (char gtype) |
int | prng_montagn (float init_montagn) |
int | init_prng_host (int seed) |
int | prng_host (char gtype) |
int | prng_host (char gtype, T_data stddev) |
int | prng_host (char gtype, T_data stddev, T_data alpha) |
int | destroy_prng_host () |
Protected Member Functions | |
void | init (CarmaContext *current_context, const long *dims_data, const T_data *data, bool fromHost, int nb_streams) |
Protected Attributes | |
T_data * | d_data |
Input data => change to vector. More... | |
std::vector< T_data > | h_data |
T_data * | o_data |
optional data (used for scan / reduction) More... | |
T_data * | cub_data |
optional data (used for scan / reduction) More... | |
size_t | cub_data_size |
int | ndim |
long * | dims_data |
dimensions of the array More... | |
int | nb_elem |
number of elements in the array More... | |
int | device |
device where the CarmaObj is allocate More... | |
CarmaContext * | current_context |
curandGenerator_t | gen |
curandState * | d_states |
int | nb_threads |
int | nb_blocks |
bool | keys_only |
bool | owner = true |
unsigned int * | values |
optional data (used for sort) More... | |
size_t * | d_num_valid |
used for compact More... | |
cufftHandle | plan |
FFT plan. More... | |
cufftType | type_plan |
FFT plan type. More... | |
CarmaStreams * | streams |
this class provides wrappers to the generic carma object
Definition at line 65 of file carma_host_obj.h.
CarmaObj::CarmaObj | ( | const CarmaObj< T_data > * | obj | ) |
CarmaObj::CarmaObj | ( | CarmaContext * | current_context, |
const long * | dims_data | ||
) |
CarmaObj::CarmaObj | ( | CarmaContext * | current_context, |
const CarmaObj< T_data > * | obj | ||
) |
CarmaObj::CarmaObj | ( | CarmaContext * | current_context, |
const long * | dims_data, | ||
const T_data * | data | ||
) |
CarmaObj::CarmaObj | ( | CarmaContext * | current_context, |
const long * | dims_data, | ||
int | nb_streams | ||
) |
CarmaObj::CarmaObj | ( | CarmaContext * | current_context, |
const CarmaObj< T_data > * | obj, | ||
int | nb_streams | ||
) |
CarmaObj::CarmaObj | ( | CarmaContext * | current_context, |
const long * | dims_data, | ||
const T_data * | data, | ||
int | nb_streams | ||
) |
CarmaObj::~CarmaObj | ( | ) |
int CarmaObj::add_stream | ( | ) |
Definition at line 176 of file carma_obj.h.
int CarmaObj::add_stream | ( | int | nb | ) |
Definition at line 180 of file carma_obj.h.
int CarmaObj::aimax | ( | int | incx | ) |
int CarmaObj::aimin | ( | int | incx | ) |
T_data CarmaObj::asum | ( | int | incx | ) |
void CarmaObj::axpy | ( | T_data | alpha, |
CarmaObj< T_data > * | source, | ||
int | incx, | ||
int | incy, | ||
int | offset = 0 |
||
) |
char const* CarmaObj::c_str | ( | ) |
Definition at line 223 of file carma_obj.h.
void CarmaObj::clip | ( | T_data | min, |
T_data | max | ||
) |
transpose
void CarmaObj::copy | ( | CarmaObj< T_data > * | source, |
int | incx, | ||
int | incy | ||
) |
int CarmaObj::copy_from | ( | const T_data * | data, |
int | nb_elem | ||
) |
int CarmaObj::copy_into | ( | T_data * | data, |
int | nb_elem | ||
) |
void CarmaObj::dealloc | ( | ) |
General Utilities
Definition at line 209 of file carma_obj.h.
int CarmaObj::del_stream | ( | ) |
Definition at line 184 of file carma_obj.h.
int CarmaObj::del_stream | ( | int | nb | ) |
Definition at line 188 of file carma_obj.h.
int CarmaObj::destroy_prng | ( | ) |
int CarmaObj::destroy_prng_host | ( | ) |
int CarmaObj::device2host | ( | T_dest * | data | ) |
int CarmaObj::device2host_async | ( | T_data * | data, |
cudaStream_t | stream | ||
) |
int CarmaObj::device2host_mat | ( | T_data * | data, |
int | lda, | ||
int | ldb | ||
) |
int CarmaObj::device2host_opt | ( | T_data * | data | ) |
int CarmaObj::device2host_vect | ( | T_data * | data, |
int | incx, | ||
int | incy | ||
) |
void CarmaObj::dgmm | ( | char | side, |
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
CarmaObj< T_data > * | vectx, | ||
int | incx, | ||
int | ldc | ||
) |
Curand
T_data CarmaObj::dot | ( | CarmaObj< T_data > * | source, |
int | incx, | ||
int | incy | ||
) |
void CarmaObj::geam | ( | char | transa, |
char | transb, | ||
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
T_data | beta, | ||
CarmaObj< T_data > * | matB, | ||
int | ldb, | ||
int | ldc | ||
) |
void CarmaObj::gemm | ( | char | transa, |
char | transb, | ||
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
CarmaObj< T_data > * | matB, | ||
int | ldb, | ||
T_data | beta, | ||
int | ldc | ||
) |
void CarmaObj::gemv | ( | char | trans, |
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
CarmaObj< T_data > * | vectx, | ||
int | incx, | ||
T_data | beta, | ||
int | incy | ||
) |
void CarmaObj::ger | ( | T_data | alpha, |
CarmaObj< T_data > * | vectx, | ||
int | incx, | ||
CarmaObj< T_data > * | vecty, | ||
int | incy, | ||
int | lda | ||
) |
CarmaContext* CarmaObj::get_context | ( | ) |
cudaStream_t CarmaObj::get_cuda_stream | ( | int | stream | ) |
Definition at line 192 of file carma_obj.h.
T_data* CarmaObj::get_data | ( | ) |
Definition at line 230 of file carma_obj.h.
T_data* CarmaObj::get_data_at | ( | int | index | ) |
int CarmaObj::get_device | ( | ) |
const long* CarmaObj::get_dims | ( | ) |
long CarmaObj::get_dims | ( | int | i | ) |
Definition at line 240 of file carma_obj.h.
T_data* CarmaObj::get_h_data | ( | ) |
Definition at line 169 of file carma_obj.h.
int CarmaObj::get_nb_elements | ( | ) |
int CarmaObj::get_nb_streams | ( | ) | const |
get the number of streams attached to the host object
Definition at line 171 of file carma_obj.h.
T_data* CarmaObj::get_o_data | ( | ) |
Definition at line 232 of file carma_obj.h.
const T_data CarmaObj::get_o_data_value | ( | ) | const |
Definition at line 233 of file carma_obj.h.
cufftHandle* CarmaObj::get_plan | ( | ) |
FFT plan.
Definition at line 278 of file carma_obj.h.
cufftType CarmaObj::get_type_plan | ( | ) |
FFT plan type.
Definition at line 280 of file carma_obj.h.
unsigned int* CarmaObj::get_values | ( | ) |
int CarmaObj::host2device | ( | const T_dest * | data | ) |
int CarmaObj::host2device_async | ( | const T_data * | data, |
cudaStream_t | stream | ||
) |
int CarmaObj::host2device_mat | ( | const T_data * | data, |
int | lda, | ||
int | ldb | ||
) |
int CarmaObj::host2device_vect | ( | const T_data * | data, |
int | incx, | ||
int | incy | ||
) |
|
protected |
int CarmaObj::init_prng | ( | ) |
int CarmaObj::init_prng | ( | long | seed | ) |
int CarmaObj::init_prng_host | ( | int | seed | ) |
void CarmaObj::init_reduceCub | ( | ) |
bool CarmaObj::is_rng_init | ( | ) |
Memory transfers both ways
Definition at line 246 of file carma_obj.h.
int CarmaObj::memset | ( | T_data | value | ) |
Definition at line 273 of file carma_obj.h.
T_data CarmaObj::nrm2 | ( | int | incx | ) |
CarmaObj::operator std::string | ( | ) |
Definition at line 222 of file carma_obj.h.
CarmaObj::operator T_data * | ( | ) |
Definition at line 214 of file carma_obj.h.
const T_data CarmaObj::operator[] | ( | int | index | ) | const |
Definition at line 224 of file carma_obj.h.
int CarmaObj::prng | ( | char | gtype | ) |
int CarmaObj::prng | ( | char | gtype, |
float | alpha | ||
) |
int CarmaObj::prng | ( | char | gtype, |
float | alpha, | ||
float | beta | ||
) |
int CarmaObj::prng | ( | T_data * | output, |
char | gtype, | ||
float | alpha | ||
) |
int CarmaObj::prng | ( | T_data * | output, |
char | gtype, | ||
float | alpha, | ||
float | beta | ||
) |
int CarmaObj::prng_host | ( | char | gtype | ) |
int CarmaObj::prng_host | ( | char | gtype, |
T_data | stddev | ||
) |
int CarmaObj::prng_host | ( | char | gtype, |
T_data | stddev, | ||
T_data | alpha | ||
) |
int CarmaObj::prng_montagn | ( | float | init_montagn | ) |
void CarmaObj::reduceCub | ( | ) |
int CarmaObj::reset | ( | ) |
void CarmaObj::rot | ( | CarmaObj< T_data > * | source, |
int | incx, | ||
int | incy, | ||
T_data | sc, | ||
T_data | ss | ||
) |
void CarmaObj::scale | ( | T_data | alpha, |
int | incx | ||
) |
T_data CarmaObj::sum | ( | ) |
void CarmaObj::swap | ( | CarmaObj< T_data > * | source, |
int | incx, | ||
int | incy | ||
) |
void CarmaObj::swap_ptr | ( | T_data * | ptr | ) |
Definition at line 203 of file carma_obj.h.
void CarmaObj::symm | ( | char | side, |
char | uplo, | ||
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
CarmaObj< T_data > * | matB, | ||
int | ldb, | ||
T_data | beta, | ||
int | ldc | ||
) |
void CarmaObj::symv | ( | char | uplo, |
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
CarmaObj< T_data > * | vectx, | ||
int | incx, | ||
T_data | beta, | ||
int | incy | ||
) |
void CarmaObj::sync_h_data | ( | ) |
Definition at line 164 of file carma_obj.h.
void CarmaObj::syrk | ( | char | uplo, |
char | transa, | ||
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
T_data | beta, | ||
int | ldc | ||
) |
void CarmaObj::syrkx | ( | char | uplo, |
char | transa, | ||
T_data | alpha, | ||
CarmaObj< T_data > * | matA, | ||
int | lda, | ||
CarmaObj< T_data > * | matB, | ||
int | ldb, | ||
T_data | beta, | ||
int | ldc | ||
) |
std::string CarmaObj::to_string | ( | ) |
int CarmaObj::transpose | ( | CarmaObj< T_data > * | source | ) |
int CarmaObj::wait_all_streams | ( | ) |
Definition at line 199 of file carma_obj.h.
int CarmaObj::wait_stream | ( | int | stream | ) |
Definition at line 195 of file carma_obj.h.
|
protected |
optional data (used for scan / reduction)
Definition at line 122 of file carma_obj.h.
|
protected |
Definition at line 123 of file carma_obj.h.
|
protected |
Definition at line 128 of file carma_obj.h.
|
protected |
Input data => change to vector.
Definition at line 119 of file carma_obj.h.
|
protected |
used for compact
Definition at line 140 of file carma_obj.h.
|
protected |
Definition at line 131 of file carma_obj.h.
|
protected |
device where the CarmaObj is allocate
Definition at line 127 of file carma_obj.h.
|
protected |
dimensions of the array
Definition at line 125 of file carma_obj.h.
|
protected |
Definition at line 130 of file carma_obj.h.
|
protected |
Definition at line 120 of file carma_obj.h.
|
protected |
Definition at line 136 of file carma_obj.h.
|
protected |
Definition at line 134 of file carma_obj.h.
|
protected |
number of elements in the array
Definition at line 126 of file carma_obj.h.
|
protected |
Definition at line 133 of file carma_obj.h.
|
protected |
Definition at line 124 of file carma_obj.h.
|
protected |
optional data (used for scan / reduction)
Definition at line 121 of file carma_obj.h.
|
protected |
Definition at line 137 of file carma_obj.h.
|
protected |
FFT plan.
Definition at line 142 of file carma_obj.h.
|
protected |
Definition at line 145 of file carma_obj.h.
|
protected |
FFT plan type.
Definition at line 143 of file carma_obj.h.
|
protected |
optional data (used for sort)
Definition at line 139 of file carma_obj.h.