pub struct CpuProviderExecutionCapabilities {
pub thread_count: CpuThreadCountControl,
pub placement: CpuPlacementControl,
pub worker_local_sequential: bool,
pub accepts_sequential: bool,
pub accepts_outer: bool,
pub accepts_inner: bool,
}Expand description
Immutable execution capabilities declared by one CPU provider.
The conservative default only permits provider-owned inner execution. A provider must opt in explicitly to sequential or engine-owned outer modes.
§Examples
use tenferro_cpu::{
CpuPlacementControl, CpuProviderExecutionCapabilities, CpuThreadCountControl,
};
let capabilities = CpuProviderExecutionCapabilities {
thread_count: CpuThreadCountControl::Sequential,
placement: CpuPlacementControl::CallingThread,
worker_local_sequential: true,
accepts_sequential: true,
accepts_outer: true,
accepts_inner: true,
};
assert!(capabilities.worker_local_sequential);Fields§
§thread_count: CpuThreadCountControlPer-call thread-count control implemented by the provider adapter.
placement: CpuPlacementControlPlacement control implemented independently from thread-count control.
worker_local_sequential: boolWhether a call can be forced to stay sequential on its current worker.
accepts_sequential: boolWhether the provider accepts a no-fan-out operation context.
accepts_outer: boolWhether the provider accepts engine-owned fan-out with sequential children.
accepts_inner: boolWhether the provider accepts ownership of one inner parallel region.
Trait Implementations§
Source§impl Clone for CpuProviderExecutionCapabilities
impl Clone for CpuProviderExecutionCapabilities
Source§fn clone(&self) -> CpuProviderExecutionCapabilities
fn clone(&self) -> CpuProviderExecutionCapabilities
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 moreSource§impl PartialEq for CpuProviderExecutionCapabilities
impl PartialEq for CpuProviderExecutionCapabilities
Source§fn eq(&self, other: &CpuProviderExecutionCapabilities) -> bool
fn eq(&self, other: &CpuProviderExecutionCapabilities) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CpuProviderExecutionCapabilities
impl Eq for CpuProviderExecutionCapabilities
impl StructuralPartialEq for CpuProviderExecutionCapabilities
Auto Trait Implementations§
impl Freeze for CpuProviderExecutionCapabilities
impl RefUnwindSafe for CpuProviderExecutionCapabilities
impl Send for CpuProviderExecutionCapabilities
impl Sync for CpuProviderExecutionCapabilities
impl Unpin for CpuProviderExecutionCapabilities
impl UnsafeUnpin for CpuProviderExecutionCapabilities
impl UnwindSafe for CpuProviderExecutionCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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