cuquantum.MemoryPointer¶
- class cuquantum.MemoryPointer(device_ptr: int, size: int, finalizer: None | collections.abc.Callable[None])¶
An RAII class for a device memory buffer.
- Parameters
device_ptr – The address of the device memory buffer.
size – The size of the memory buffer in bytes.
finalizer – A nullary callable that will be called when the buffer is to be freed.
See also
Methods
- free()¶
“Frees” the memory buffer by calling the finalizer.