pub struct MappedLine(/* private fields */);cuda only.Expand description
A page-locked, device-mapped CompletionLine that CUDA streams store into.
Implementations§
Source§impl MappedLine
impl MappedLine
Sourcepub fn new() -> Result<Self, LineError>
pub fn new() -> Result<Self, LineError>
A fresh line reading all 0, owned by the primary context of the device of the calling
thread’s current context. The line holds its own reference to that primary context
(cuDevicePrimaryCtxRetain) until after its page is freed, so it stays valid whoever else
lets the context go. Only streams of that primary context may store into it; a stream of a
non-primary context (cuCtxCreate), which the line cannot keep alive, is refused with
LineError::ForeignStream.
§Errors
The driver’s status, LineError::Unavailable when the driver or an entry point is
missing, LineError::NoDomain when no context is current.
Sourcepub fn line(&self) -> &CompletionLine
pub fn line(&self) -> &CompletionLine
The line, as the host reads it.
Sourcepub fn device_address(&self) -> u64
pub fn device_address(&self) -> u64
The device address of word 0; word i is at + 8 * i (for a stream-side wait on it).
Sourcepub fn enqueue_store(
&self,
stream: CuStream,
slot: Slot,
value: u64,
) -> Result<(), LineError>
pub fn enqueue_store( &self, stream: CuStream, slot: Slot, value: u64, ) -> Result<(), LineError>
Queue a store of value into word slot on stream, behind the work queued there.
§Errors
The driver’s status, or LineError::ForeignStream for a stream of any context other
than the line’s primary context.