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,
) -> Self
pub fn new( requested_policy: ExecutionPolicy, resolved_policy: ExecutionPolicy, ) -> Self
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 ==.