CuPtr

fat pointer in CUDA

version(grain_cuda)
struct CuPtr (
T
) {
CUdeviceptr ptr;
size_t length;
}

Constructors

this
this(T[] host)

create copy of host array into device

this
this(size_t n)

create uninitialized T.sizeof * n array in device

this
this(CUdeviceptr p, size_t l)

create fat pointer from raw pointer and its length

Destructor

~this
~this()

dtor calling cuMemFree

Postblit

Copying this object is disabled.

A postblit is present on this object, but not explicitly documented in the source.

Meta