pub enum ExecPolicy {
Sequential,
Parallel(usize),
}Expand description
Per-call execution policy for a compute backend operation.
Parallel(0) means “backend auto” — faer uses rayon’s
current_num_threads, while HPTT resolves 0 via
std::thread::available_parallelism() before crossing the FFI
boundary (HPTT 0.4 rejects a literal 0). Parallel(n) with
n > 0 is a target worker count whose strictness depends on the
backend: HPTT spawns exactly n OpenMP threads, while faer and
the naive Rayon kernel treat n as a partitioning hint dispatched
on the global Rayon pool. Sequential forces single-threaded
execution.
Variants§
Sequential
Force single-threaded execution.
Parallel(usize)
Run in parallel with the given target worker count; 0 means
“backend auto” (see the type-level note for per-backend semantics).
Trait Implementations§
Source§impl Clone for ExecPolicy
impl Clone for ExecPolicy
Source§fn clone(&self) -> ExecPolicy
fn clone(&self) -> ExecPolicy
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 ExecPolicy
Source§impl Debug for ExecPolicy
impl Debug for ExecPolicy
impl Eq for ExecPolicy
Source§impl PartialEq for ExecPolicy
impl PartialEq for ExecPolicy
Source§fn eq(&self, other: &ExecPolicy) -> bool
fn eq(&self, other: &ExecPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExecPolicy
Auto Trait Implementations§
impl Freeze for ExecPolicy
impl RefUnwindSafe for ExecPolicy
impl Send for ExecPolicy
impl Sync for ExecPolicy
impl Unpin for ExecPolicy
impl UnsafeUnpin for ExecPolicy
impl UnwindSafe for ExecPolicy
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