pub struct RuntimeAllocBlock { /* private fields */ }Expand description
Owned handle for a raw allocation routed through
GpuMemoryManager::alloc_raw / the v0.6 device runtime.
Manual Debug impl below — the runtime / manager handles
inside this struct are not Debug, so a derive would not
compile.
On drop, deallocates through the runtime (returning the bytes
to the runtime’s bookkeeping — pending if the runtime’s backend
is async) and decrements the manager’s local allocated
counter. The block exposes only the raw device pointer and
byte length; typed views are the caller’s responsibility (this
path is not yet wired into the typed CudaSlice<T> API — that
is a follow-up slice).
Implementations§
Source§impl RuntimeAllocBlock
impl RuntimeAllocBlock
Sourcepub fn ptr(&self) -> u64
pub fn ptr(&self) -> u64
Raw device pointer for this allocation. Live until the block is dropped.
Sourcepub fn device_block(&self) -> &DeviceBlock
pub fn device_block(&self) -> &DeviceBlock
Borrow the underlying DeviceBlock metadata. Test/
diagnostic accessor.