pub struct ExecutionReceipt { /* private fields */ }Expand description
Account of one algorithm execution.
The requested policy is kept separately from the resolved policy so callers can distinguish an automatic CPU choice from an explicit CPU request. The transfer counters describe the explicit host/device boundary copies made by the operation; backend-specific internal work remains an implementation detail of the executing crate.
Implementations§
Source§impl ExecutionReceipt
impl ExecutionReceipt
Sourcepub fn new(
requested_policy: ExecutionPolicy,
resolved_policy: ExecutionPolicy,
) -> ExecutionReceipt
pub fn new( requested_policy: ExecutionPolicy, resolved_policy: ExecutionPolicy, ) -> ExecutionReceipt
Creates a receipt for a requested policy and the policy actually used.
Sourcepub const fn requested_policy(&self) -> ExecutionPolicy
pub const fn requested_policy(&self) -> ExecutionPolicy
Returns the policy supplied by the caller.
Sourcepub const fn resolved_policy(&self) -> ExecutionPolicy
pub const fn resolved_policy(&self) -> ExecutionPolicy
Returns the backend policy selected for this execution.
Sourcepub const fn transfer_stats(&self) -> TransferStats
pub const fn transfer_stats(&self) -> TransferStats
Returns transfer accounting for this execution.
Sourcepub const fn host_to_device_bytes(&self) -> u64
pub const fn host_to_device_bytes(&self) -> u64
Returns bytes copied from host memory to a device.
Sourcepub const fn device_to_device_bytes(&self) -> u64
pub const fn device_to_device_bytes(&self) -> u64
Returns bytes copied between buffers on a device.
Sourcepub const fn device_to_host_bytes(&self) -> u64
pub const fn device_to_host_bytes(&self) -> u64
Returns bytes copied from a device back to host memory.
Sourcepub fn stages(&self) -> &[&'static str]
pub fn stages(&self) -> &[&'static str]
Returns logical stages recorded by the algorithm or pipeline.
Sourcepub fn record_transfer(&mut self, direction: TransferDirection, bytes: u64)
pub fn record_transfer(&mut self, direction: TransferDirection, bytes: u64)
Records an explicit transfer made by the operation.
Sourcepub fn record_stage(&mut self, stage: &'static str)
pub fn record_stage(&mut self, stage: &'static str)
Records a logical stage name in execution order.
Trait Implementations§
Source§impl Clone for ExecutionReceipt
impl Clone for ExecutionReceipt
Source§fn clone(&self) -> ExecutionReceipt
fn clone(&self) -> ExecutionReceipt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionReceipt
impl Debug for ExecutionReceipt
Source§impl Default for ExecutionReceipt
impl Default for ExecutionReceipt
Source§fn default() -> ExecutionReceipt
fn default() -> ExecutionReceipt
Source§impl PartialEq for ExecutionReceipt
impl PartialEq for ExecutionReceipt
Source§fn eq(&self, other: &ExecutionReceipt) -> bool
fn eq(&self, other: &ExecutionReceipt) -> bool
self and other values to be equal, and is used by ==.impl Eq for ExecutionReceipt
impl StructuralPartialEq for ExecutionReceipt
Auto Trait Implementations§
impl Freeze for ExecutionReceipt
impl RefUnwindSafe for ExecutionReceipt
impl Send for ExecutionReceipt
impl Sync for ExecutionReceipt
impl Unpin for ExecutionReceipt
impl UnsafeUnpin for ExecutionReceipt
impl UnwindSafe for ExecutionReceipt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().