|
void | copyTo (DeviceArray &other) const |
| Performs data copying. If destination size differs it will be reallocated. More...
|
|
void | create (size_t size) |
| Allocates internal buffer in GPU memory. If internal buffer was created before the function recreates it with new size. If new and old sizes are equal it does nothing. More...
|
|
| DeviceArray () |
| Empty constructor. More...
|
|
| DeviceArray (const DeviceArray &other) |
| Copy constructor. Just increments reference counter. More...
|
|
| DeviceArray (size_t size) |
| Allocates internal buffer in GPU memory. More...
|
|
| DeviceArray (T *ptr, size_t size) |
| Initializes with user allocated buffer. Reference counting is disabled in this case. More...
|
|
template<typename A > |
void | download (std::vector< T, A > &data) const |
| Downloads data from internal buffer to CPU memory. More...
|
|
void | download (T *host_ptr) const |
| Downloads data from internal buffer to CPU memory. More...
|
|
| operator const T * () const |
| Returns const pointer for internal buffer in GPU memory. More...
|
|
| operator T* () |
| Returns pointer for internal buffer in GPU memory. More...
|
|
DeviceArray & | operator= (const DeviceArray &other) |
| Assigment operator. Just increments reference counter. More...
|
|
T * | ptr () |
| Returns pointer for internal buffer in GPU memory. More...
|
|
const T * | ptr () const |
| Returns const pointer for internal buffer in GPU memory. More...
|
|
void | release () |
| Decrements reference counter and releases internal buffer if needed. More...
|
|
size_t | size () const |
| Returns size in elements. More...
|
|
void | swap (DeviceArray &other_arg) |
| Performs swap of data pointed with another device array. More...
|
|
template<class A > |
void | upload (const std::vector< T, A > &data) |
| Uploads data to internal buffer in GPU memory. It calls create() inside to ensure that intenal buffer size is enough. More...
|
|
void | upload (const T *host_ptr, size_t size) |
| Uploads data to internal buffer in GPU memory. It calls create() inside to ensure that intenal buffer size is enough. More...
|
|
void | copyTo (DeviceMemory &other) const |
| Performs data copying. If destination size differs it will be reallocated. More...
|
|
void | create (size_t sizeBytes_arg) |
| Allocates internal buffer in GPU memory. If internal buffer was created before the function recreates it with new size. If new and old sizes are equal it does nothing. More...
|
|
| DeviceMemory () |
| Empty constructor. More...
|
|
| DeviceMemory (const DeviceMemory &other_arg) |
| Copy constructor. Just increments reference counter. More...
|
|
| DeviceMemory (size_t sizeBytes_arg) |
| Allocates internal buffer in GPU memory. More...
|
|
| DeviceMemory (void *ptr_arg, size_t sizeBytes_arg) |
| Initializes with user allocated buffer. Reference counting is disabled in this case. More...
|
|
void | download (void *host_ptr_arg) const |
| Downloads data from internal buffer to CPU memory. More...
|
|
bool | empty () const |
| Returns true if unallocated otherwise false. More...
|
|
template<class U > |
| operator PtrSz< U > () const |
| Conversion to PtrSz for passing to kernel functions. More...
|
|
DeviceMemory & | operator= (const DeviceMemory &other_arg) |
| Assigment operator. Just increments reference counter. More...
|
|
template<class T > |
T * | ptr () |
| Returns pointer for internal buffer in GPU memory. More...
|
|
template<class T > |
const T * | ptr () const |
| Returns constant pointer for internal buffer in GPU memory. More...
|
|
void | release () |
| Decrements reference counter and releases internal buffer if needed. More...
|
|
size_t | sizeBytes () const |
|
void | swap (DeviceMemory &other_arg) |
| Performs swap of data pointed with another device memory. More...
|
|
void | upload (const void *host_ptr_arg, size_t sizeBytes_arg) |
| Uploads data to internal buffer in GPU memory. It calls create() inside to ensure that intenal buffer size is enough. More...
|
|
| ~DeviceMemory () |
| Destructor. More...
|
|
template<class T>
class kfusion::cuda::DeviceArray< T >
DeviceArray class
- Note
- Typed container for GPU memory with reference counting.
- Author
- Anatoly Baksheev
Definition at line 20 of file device_array.hpp.