Skip to main content

MappedLine

Struct MappedLine 

Source
pub struct MappedLine(/* private fields */);
Available on crate feature cuda only.
Expand description

A page-locked, device-mapped CompletionLine that CUDA streams store into.

Implementations§

Source§

impl MappedLine

Source

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.

Source

pub fn line(&self) -> &CompletionLine

The line, as the host reads it.

Source

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).

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.