Skip to main content

KernelOperation

Struct KernelOperation 

Source
pub struct KernelOperation<K: KernelSignature, T> { /* private fields */ }
Expand description

Prepared owned kernel work with an explicit resource and access contract.

Trait Implementations§

Source§

impl<K: Debug + KernelSignature, T: Debug> Debug for KernelOperation<K, T>
where K::RawArguments: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K: KernelSignature, T: 'static> DeviceOperation for KernelOperation<K, T>

Source§

impl<K: KernelSignature, T: 'static> Operation for KernelOperation<K, T>

Source§

type Pending = <KernelOperation<K, T> as Operation>::Output

Value produced by enqueue before successful CUDA completion. It must not permit safe reads of results that are still pending.
Source§

type Output = T

Host-visible result produced by resolution after successful completion.
Source§

fn enqueue(self, execution: &mut Execution) -> Result<T>

Registers resources and enqueues this operation on the execution’s stream, returning its pending result. Read more
Source§

unsafe fn resolve(pending: Self::Pending) -> Result<Self::Output>

Resolves host results after successful native completion and resource retirement. Read more
Source§

fn submit_on( self, stream: &Stream, ) -> Result<Submission<Self::Output, Self::Pending>>

Enqueues this operation on stream and returns its pending result with independent checked completion. Read more
Source§

fn then<F, N>(self, next: F) -> Then<Self, F>
where Self: DeviceOperation, F: FnOnce(Self::Output) -> N, N: Operation,

Chains dependent device work on the same stream without promoting pending values.
Source§

fn pair<O: Operation>(self, other: O) -> Pair<Self, O>

Pairs independent work on the selected stream; separate submissions can overlap.
Source§

fn map<F, T: 'static>(self, map: F) -> Map<Self, F>
where F: FnOnce(Self::Output) -> T,

Runs host code on the waiting or polling thread after successful completion. Dropping the submission before resolution discards this callback.
Source§

fn shared(self) -> Shared<Self>
where Self: DeviceOperation, Self::Output: Send + Sync,

Shares one execution and orders every consuming stream after its completion event.
Source§

impl<K: KernelSignature, T: 'static> Recordable for KernelOperation<K, T>

Source§

type Output = T

Value produced by recording, without implying producer execution or initialized results.
Source§

fn record(self, recording: &mut Recording) -> Result<T>

Records this prepared operation and registers its replay resources with recording. Read more

Auto Trait Implementations§

§

impl<K, T> !RefUnwindSafe for KernelOperation<K, T>

§

impl<K, T> !UnwindSafe for KernelOperation<K, T>

§

impl<K, T> Forget for KernelOperation<K, T>

§

impl<K, T> Freeze for KernelOperation<K, T>

§

impl<K, T> Move for KernelOperation<K, T>

§

impl<K, T> Send for KernelOperation<K, T>

§

impl<K, T> Sync for KernelOperation<K, T>

§

impl<K, T> Unpin for KernelOperation<K, T>

§

impl<K, T> UnsafeUnpin for KernelOperation<K, T>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.