CUDABuffer

A class that encapsulates the CUDA memory allocation/deallocation process.

Members

Functions

get
void get(void[] buf)

Copies data from the device to the host.

numBytes
size_t numBytes()

Provides the size of the buffer allocated on the CUDA device.

ptr
inout(CUdeviceptr) ptr()

Provides the device pointer.

set
void set(void[] buf)

Copies data from the host to the device.

set
void set(DeviceBuffer buf)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

create
CUDABuffer create(size_t numBytes)

Constructs a CUDABuffer object and allocates memory on the CUDA device.

destroy
void destroy(CUDABuffer buf)

Releases the CUDA resources used by buf internally.

Meta