pub struct OffloadConfig { /* private fields */ }Expand description
Global limits and lookahead used when validating an explicit offload plan.
Implementations§
Source§impl OffloadConfig
impl OffloadConfig
Sourcepub fn new(
device_budget_bytes: Option<u64>,
host_budget_bytes: Option<u64>,
prefetch_depth: usize,
) -> Result<Self, OffloadError>
pub fn new( device_budget_bytes: Option<u64>, host_budget_bytes: Option<u64>, prefetch_depth: usize, ) -> Result<Self, OffloadError>
Creates a configuration with optional finite device and host budgets.
A zero-byte budget is meaningful and forbids assigning non-empty units
to that tier. prefetch_depth must be nonzero.
Sourcepub const fn device_budget_bytes(self) -> Option<u64>
pub const fn device_budget_bytes(self) -> Option<u64>
Returns the finite device-tier budget, if configured.
Sourcepub const fn host_budget_bytes(self) -> Option<u64>
pub const fn host_budget_bytes(self) -> Option<u64>
Returns the finite physical host-allocation budget, if configured.
Sourcepub const fn prefetch_depth(self) -> usize
pub const fn prefetch_depth(self) -> usize
Returns the number of logical units the executor may prefetch ahead.
Sourcepub const fn with_eviction_policy(self, policy: CacheEvictionPolicy) -> Self
pub const fn with_eviction_policy(self, policy: CacheEvictionPolicy) -> Self
Selects deterministic cache eviction without changing tier budgets.
Sourcepub const fn eviction_policy(self) -> CacheEvictionPolicy
pub const fn eviction_policy(self) -> CacheEvictionPolicy
Returns the configured cache eviction ordering.
Trait Implementations§
Source§impl Clone for OffloadConfig
impl Clone for OffloadConfig
Source§fn clone(&self) -> OffloadConfig
fn clone(&self) -> OffloadConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OffloadConfig
Source§impl Debug for OffloadConfig
impl Debug for OffloadConfig
Source§impl Default for OffloadConfig
impl Default for OffloadConfig
Source§impl<'de> Deserialize<'de> for OffloadConfig
impl<'de> Deserialize<'de> for OffloadConfig
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OffloadConfig
Source§impl PartialEq for OffloadConfig
impl PartialEq for OffloadConfig
Source§impl Serialize for OffloadConfig
impl Serialize for OffloadConfig
impl StructuralPartialEq for OffloadConfig
Auto Trait Implementations§
impl Freeze for OffloadConfig
impl RefUnwindSafe for OffloadConfig
impl Send for OffloadConfig
impl Sync for OffloadConfig
impl Unpin for OffloadConfig
impl UnsafeUnpin for OffloadConfig
impl UnwindSafe for OffloadConfig
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
Mutably borrows from an owned value. Read more