pub trait IndexedParallelIteratorExt: IndexedParallelIterator {
// Provided methods
fn with_min_task_bytes<T>(
self,
) -> impl IndexedParallelIterator<Item = Self::Item>
where Self: Sized { ... }
fn with_min_task(
self,
work: WorkPerItem,
) -> impl IndexedParallelIterator<Item = Self::Item>
where Self: Sized { ... }
}Expand description
Task-size adapters for parallel iterators.
Each adapter sets the minimum items per task from a cost model. A call site states what one item costs instead of hardcoding a count.
Provided Methods§
Sourcefn with_min_task_bytes<T>(
self,
) -> impl IndexedParallelIterator<Item = Self::Item>where
Self: Sized,
fn with_min_task_bytes<T>(
self,
) -> impl IndexedParallelIterator<Item = Self::Item>where
Self: Sized,
Floors the split so one task moves at least the byte budget.
The type parameter counts the bytes one item moves. Use this for loops bound by memory traffic: copies, transposes, permutations.
Sourcefn with_min_task(
self,
work: WorkPerItem,
) -> impl IndexedParallelIterator<Item = Self::Item>where
Self: Sized,
fn with_min_task(
self,
work: WorkPerItem,
) -> impl IndexedParallelIterator<Item = Self::Item>where
Self: Sized,
Floors the split so one task runs for at least the time budget.
Use this for loops bound by arithmetic, classified by the cost of one item.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.