COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
CarmaHostObj< T_data > Class Template Reference

this class provides wrappers to the generic carma host object More...

#include <carma_host_obj.h>

Inheritance diagram for CarmaHostObj< T_data >:
Collaboration diagram for CarmaHostObj< T_data >:

Public Member Functions

 CarmaHostObj ()
 
 CarmaHostObj (const long *dims_data)
 
 CarmaHostObj (const std::vector< long > &dims)
 
 CarmaHostObj (const long *dims_data, MemAlloc malloc_type)
 
 CarmaHostObj (const CarmaHostObj< T_data > *obj)
 
 CarmaHostObj (const CarmaHostObj< T_data > *obj, MemAlloc malloc_type)
 
 CarmaHostObj (const long *dims_data, const T_data *data)
 
 CarmaHostObj (const long *dims_data, const T_data *data, MemAlloc malloc_type)
 
 CarmaHostObj (const long *dims_data, int nb_streams)
 
 CarmaHostObj (const long *dims_data, MemAlloc malloc_type, int nb_streams)
 
 CarmaHostObj (const CarmaHostObj< T_data > *obj, int nb_streams)
 
 CarmaHostObj (const CarmaHostObj< T_data > *obj, MemAlloc malloc_type, int nb_streams)
 
 CarmaHostObj (const long *dims_data, const T_data *data, int nb_streams)
 
 CarmaHostObj (const long *dims_data, const T_data *data, MemAlloc malloc_type, int nb_streams)
 
 ~CarmaHostObj ()
 
void get_devpntr (void **pntr_dev)
 
int get_nb_streams ()
 
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 ()
 
int cpy_obj (CarmaObj< T_data > *carma_obj, cudaMemcpyKind flag)
 
int cpy_obj (CarmaObj< T_data > *carma_obj, cudaMemcpyKind flag, unsigned int stream)
 
T_data & operator[] (long idx)
 
const T_data & operator[] (long idx) const
 
 operator T_data * ()
 
 operator std::string ()
 
T_data * get_data ()
 
T_data * get_data_at (int index)
 
const long * get_dims ()
 
long get_dims (int i)
 
int get_nb_elements ()
 
int fill_from (const T_data *data)
 
int fill_into (T_data *data)
 
int fill (T_data value)
 
std::string get_mem_alloc ()
 

Protected Member Functions

void init (const long *dims_data, const T_data *data, MemAlloc malloc_type, int nb_streams)
 

Protected Attributes

T_data * h_data
 Input data. More...
 
T_data * data_UA
 unpadded input dara for generic pinned mem More...
 
long * dims_data
 dimensions of the array More...
 
int nb_elem
 number of elments in the array More...
 
MemAlloc malloc_type
 type of host alloc More...
 
CarmaStreamsstreams
 

Detailed Description

template<class T_data>
class CarmaHostObj< T_data >

this class provides wrappers to the generic carma host object

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.4.4
Date
2022/01/24

Definition at line 43 of file carma_host_obj.h.

Constructor & Destructor Documentation

◆ CarmaHostObj() [1/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( )

◆ CarmaHostObj() [2/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data)

◆ CarmaHostObj() [3/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const std::vector< long > &  dims)

◆ CarmaHostObj() [4/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
MemAlloc  malloc_type 
)

◆ CarmaHostObj() [5/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const CarmaHostObj< T_data > *  obj)

◆ CarmaHostObj() [6/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const CarmaHostObj< T_data > *  obj,
MemAlloc  malloc_type 
)

◆ CarmaHostObj() [7/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
const T_data *  data 
)

◆ CarmaHostObj() [8/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
const T_data *  data,
MemAlloc  malloc_type 
)

◆ CarmaHostObj() [9/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
int  nb_streams 
)

◆ CarmaHostObj() [10/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
MemAlloc  malloc_type,
int  nb_streams 
)

◆ CarmaHostObj() [11/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const CarmaHostObj< T_data > *  obj,
int  nb_streams 
)

◆ CarmaHostObj() [12/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const CarmaHostObj< T_data > *  obj,
MemAlloc  malloc_type,
int  nb_streams 
)

◆ CarmaHostObj() [13/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
const T_data *  data,
int  nb_streams 
)

◆ CarmaHostObj() [14/14]

template<class T_data >
CarmaHostObj< T_data >::CarmaHostObj ( const long *  dims_data,
const T_data *  data,
MemAlloc  malloc_type,
int  nb_streams 
)

◆ ~CarmaHostObj()

template<class T_data >
CarmaHostObj< T_data >::~CarmaHostObj ( )

Member Function Documentation

◆ add_stream() [1/2]

template<class T_data >
int CarmaHostObj< T_data >::add_stream ( )

◆ add_stream() [2/2]

template<class T_data >
int CarmaHostObj< T_data >::add_stream ( int  nb)

◆ cpy_obj() [1/2]

template<class T_data >
int CarmaHostObj< T_data >::cpy_obj ( CarmaObj< T_data > *  carma_obj,
cudaMemcpyKind  flag 
)

◆ cpy_obj() [2/2]

template<class T_data >
int CarmaHostObj< T_data >::cpy_obj ( CarmaObj< T_data > *  carma_obj,
cudaMemcpyKind  flag,
unsigned int  stream 
)

General Utilities

◆ del_stream() [1/2]

template<class T_data >
int CarmaHostObj< T_data >::del_stream ( )

◆ del_stream() [2/2]

template<class T_data >
int CarmaHostObj< T_data >::del_stream ( int  nb)

◆ fill()

template<class T_data >
int CarmaHostObj< T_data >::fill ( T_data  value)

◆ fill_from()

template<class T_data >
int CarmaHostObj< T_data >::fill_from ( const T_data *  data)

◆ fill_into()

template<class T_data >
int CarmaHostObj< T_data >::fill_into ( T_data *  data)

◆ get_cuda_stream()

template<class T_data >
cudaStream_t CarmaHostObj< T_data >::get_cuda_stream ( int  stream)

◆ get_data()

template<class T_data >
T_data* CarmaHostObj< T_data >::get_data ( )

Definition at line 99 of file carma_host_obj.h.

◆ get_data_at()

template<class T_data >
T_data* CarmaHostObj< T_data >::get_data_at ( int  index)

Definition at line 100 of file carma_host_obj.h.

◆ get_devpntr()

template<class T_data >
void CarmaHostObj< T_data >::get_devpntr ( void **  pntr_dev)

◆ get_dims() [1/2]

template<class T_data >
const long* CarmaHostObj< T_data >::get_dims ( )

Definition at line 101 of file carma_host_obj.h.

Here is the caller graph for this function:

◆ get_dims() [2/2]

template<class T_data >
long CarmaHostObj< T_data >::get_dims ( int  i)

Definition at line 102 of file carma_host_obj.h.

◆ get_mem_alloc()

template<class T_data >
std::string CarmaHostObj< T_data >::get_mem_alloc ( )

Definition at line 110 of file carma_host_obj.h.

◆ get_nb_elements()

template<class T_data >
int CarmaHostObj< T_data >::get_nb_elements ( )

Memory transfer

Definition at line 103 of file carma_host_obj.h.

Here is the caller graph for this function:

◆ get_nb_streams()

template<class T_data >
int CarmaHostObj< T_data >::get_nb_streams ( )

◆ init()

template<class T_data >
void CarmaHostObj< T_data >::init ( const long *  dims_data,
const T_data *  data,
MemAlloc  malloc_type,
int  nb_streams 
)
protected

◆ operator std::string()

template<class T_data >
CarmaHostObj< T_data >::operator std::string ( )

Definition at line 93 of file carma_host_obj.h.

◆ operator T_data *()

template<class T_data >
CarmaHostObj< T_data >::operator T_data * ( )

Definition at line 92 of file carma_host_obj.h.

◆ operator[]() [1/2]

template<class T_data >
T_data& CarmaHostObj< T_data >::operator[] ( long  idx)

Definition at line 90 of file carma_host_obj.h.

◆ operator[]() [2/2]

template<class T_data >
const T_data& CarmaHostObj< T_data >::operator[] ( long  idx) const

Definition at line 91 of file carma_host_obj.h.

◆ wait_all_streams()

template<class T_data >
int CarmaHostObj< T_data >::wait_all_streams ( )

◆ wait_stream()

template<class T_data >
int CarmaHostObj< T_data >::wait_stream ( int  stream)

Member Data Documentation

◆ data_UA

template<class T_data >
T_data* CarmaHostObj< T_data >::data_UA
protected

unpadded input dara for generic pinned mem

Definition at line 46 of file carma_host_obj.h.

◆ dims_data

template<class T_data >
long* CarmaHostObj< T_data >::dims_data
protected

dimensions of the array

Definition at line 47 of file carma_host_obj.h.

◆ h_data

template<class T_data >
T_data* CarmaHostObj< T_data >::h_data
protected

Input data.

Definition at line 45 of file carma_host_obj.h.

◆ malloc_type

template<class T_data >
MemAlloc CarmaHostObj< T_data >::malloc_type
protected

type of host alloc

Definition at line 49 of file carma_host_obj.h.

◆ nb_elem

template<class T_data >
int CarmaHostObj< T_data >::nb_elem
protected

number of elments in the array

Definition at line 48 of file carma_host_obj.h.

◆ streams

template<class T_data >
CarmaStreams* CarmaHostObj< T_data >::streams
protected

Definition at line 50 of file carma_host_obj.h.


The documentation for this class was generated from the following file: