|
| KernelArg (void *data, size_t size, bool download=false, bool copy=true, bool upload=true) |
| A constructor. More...
|
|
| KernelArg (void *data) |
|
const void * | content () const |
|
CUdeviceptr | deviceptr () |
|
void | malloc () |
| mallocs data on device
|
|
void | uploadAsync (CUstream stream) |
|
void | downloadAsync (CUstream stream) |
|
void | downloadAsync (void *hdata, CUstream stream) |
|
void | free () |
| frees allocated data on device
|
|
size_t | size () const |
|
bool | isDownload () const |
|
void | setDownload (bool download) |
|
bool | isCopy () const |
|
void | setCopy (bool copy) |
|
|
const void * | m_hdata |
|
CUdeviceptr | m_ddata |
|
std::shared_ptr< detail::DataCopy > | m_dataCopy |
|
◆ KernelArg() [1/2]
KernelArg::KernelArg |
( |
void * |
data, |
|
|
size_t |
size, |
|
|
bool |
download = false , |
|
|
bool |
copy = true , |
|
|
bool |
upload = true |
|
) |
| |
A constructor.
- Parameters
-
data | pointer to argument for kernel function |
size | size of argument in bytes |
download | copy the results from device to host after kernel execution |
copy | copy the results to the device |
upload | allocate the argument on the device (not necessary for basic types, e.g. int) |
◆ KernelArg() [2/2]
yacx::KernelArg::KernelArg |
( |
void * |
data | ) |
|
|
inlineexplicit |
A constructor for basic types, e.g. int
- Parameters
-
data | pointer to argument for kernel function |
◆ content()
const void * KernelArg::content |
( |
| ) |
const |
- Returns
- pointer to host data
◆ deviceptr()
CUdeviceptr yacx::KernelArg::deviceptr |
( |
| ) |
|
|
inline |
- Returns
- pointer to device data
◆ downloadAsync() [1/2]
void yacx::KernelArg::downloadAsync |
( |
CUstream |
stream | ) |
|
|
inline |
downloads data to host
- Parameters
-
stream | to enqueue operations |
◆ downloadAsync() [2/2]
void KernelArg::downloadAsync |
( |
void * |
hdata, |
|
|
CUstream |
stream |
|
) |
| |
downloads data to host
- Parameters
-
hdata | pointer to host memory for the downloaded data |
stream | to enqueue operations |
◆ uploadAsync()
void KernelArg::uploadAsync |
( |
CUstream |
stream | ) |
|
uploads data to device
- Parameters
-
stream | to enqueue operations |
The documentation for this class was generated from the following files: