pub struct StreamAllocation { /* private fields */ }Expand description
Handle to a stream-ordered memory allocation.
The allocation is produced by the pool’s faithful CPU model — the source of truth for byte accounting, block reuse, and per-stream ordering. It is associated with a specific stream and memory pool: it becomes available when all preceding work on the stream has completed, and is returned to the pool when freed (also stream-ordered).
§Pointer semantics
as_ptr returns the model address, which is
the allocator’s identity token — not a device pointer you can pass to a
kernel. Obtaining a real on-device CUdeviceptr requires the driver-backed
cuMemAllocAsync / cuMemAllocFromPoolAsync path (see the module’s
gpu_* bindings); the model address is stable and unique for reuse and
ordering bookkeeping only.
Implementations§
Source§impl StreamAllocation
impl StreamAllocation
Sourcepub fn as_ptr(&self) -> u64
pub fn as_ptr(&self) -> u64
Returns the allocator’s model address as a raw u64.
This is a stable, unique identity token used for reuse and ordering
bookkeeping — not a dereferenceable on-device CUdeviceptr. A real
device pointer must be obtained via the driver-backed cuMemAllocAsync
path (see the type-level documentation).
Sourcepub fn stream_id(&self) -> StreamOrderId
pub fn stream_id(&self) -> StreamOrderId
Returns the ordering identifier of the stream this allocation is bound to in the owning pool’s stream-ordered model.
Sourcepub fn ready_seq(&self) -> u64
pub fn ready_seq(&self) -> u64
Returns the sequence number at which this allocation becomes valid on
its stream within the owning pool’s StreamOrderModel.
The allocation is safe to read on its own stream only once that stream
has executed past this point (queryable via
StreamMemoryPool::is_ready).