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.

Static functions

create
CUDABuffer create(size_t numBytes)

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

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

Meta