pub struct WorkBytes<const N: usize>;Expand description
Run in parallel only for an operation that moves at least N bytes.
Byte-reporting operators such as
for_each_unit_task_mut_with decide
through ExecutionPolicy::parallelize_work. Entry points that report only
an element count are treated as moving one byte per element, a lower bound
for any element type, so they lean serial rather than over-schedule.
Trait Implementations§
impl<const N: usize> Copy for WorkBytes<N>
Source§impl<const N: usize> ExecutionPolicy for WorkBytes<N>
impl<const N: usize> ExecutionPolicy for WorkBytes<N>
Source§fn parallelize(len: usize) -> bool
fn parallelize(len: usize) -> bool
Return
true if an operation over len elements should run in parallel.Source§fn parallelize_work(_len: usize, _chunks: usize, bytes: usize) -> bool
fn parallelize_work(_len: usize, _chunks: usize, bytes: usize) -> bool
Return
true if an operation over len elements, scheduled as chunks
tasks and moving bytes in total, should run in parallel. Read moreSource§fn parallelize_chunks(len: usize, chunks: usize) -> bool
fn parallelize_chunks(len: usize, chunks: usize) -> bool
Return
true if an operation over len elements, partitioned into
chunks logical chunks, should run in parallel. Read moreSource§fn parallelize_pair() -> bool
fn parallelize_pair() -> bool
Return
true if a fixed two-branch operation should run in parallel.Auto Trait Implementations§
impl<const N: usize> Freeze for WorkBytes<N>
impl<const N: usize> RefUnwindSafe for WorkBytes<N>
impl<const N: usize> Send for WorkBytes<N>
impl<const N: usize> Sync for WorkBytes<N>
impl<const N: usize> Unpin for WorkBytes<N>
impl<const N: usize> UnsafeUnpin for WorkBytes<N>
impl<const N: usize> UnwindSafe for WorkBytes<N>
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