cuquantum.BaseCUDAMemoryManager¶
- class cuquantum.BaseCUDAMemoryManager(*args, **kwargs)[source]¶
Protocol for memory manager plugins.
See also
Methods
- __init__(*args, **kwargs)¶
- abstract memalloc(size)[source]¶
Allocate device memory.
- Parameters
size – The size of the memory buffer in bytes.
- Returns
An object that owns the allocated memory and is responsible for releasing it (to the OS or a pool). The object must have an attribute named
device_ptr
,device_pointer
, orptr
specifying the pointer to the allocated memory buffer. SeeMemoryPointer
for an example interface.
Note
Objects of type
numba.cuda.MemoryPointer
as well ascupy.cuda.MemoryPointer
meet the requirements listed above for the device memory pointer object.