Skip to main content

MappedLine

Struct MappedLine 

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

A page-locked, host-mapped, coherent CompletionLine that HIP streams store into.

Implementations§

Source§

impl MappedLine

Source

pub fn new() -> Result<Self, LineError>

A fresh line reading all 0, mapped for the calling thread’s current device. The line holds a reference to that device’s primary context until after its page is freed.

§Errors

The runtime’s status, LineError::Unavailable when the runtime or an entry point is missing, LineError::NoDomain when no device 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: HipStream, slot: Slot, value: u64, ) -> Result<(), LineError>

Queue a store of value into word slot on stream, behind the work queued there.

§Errors

The runtime’s status, or LineError::ForeignStream for a stream of another device.

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.