pub trait ParallelTaskWithIdx {
type Item;
// Required methods
fn f1(&self, idx: usize, value: Self::Item);
fn fc(
&self,
begin_idx: usize,
values: impl ExactSizeIterator<Item = Self::Item>,
);
}
Expand description
A parallel task shared with threads, where indices are also used.
Required Associated Types§
Required Methods§
Sourcefn f1(&self, idx: usize, value: Self::Item)
fn f1(&self, idx: usize, value: Self::Item)
Task to perform on a single value
with the given input idx
.
Sourcefn fc(
&self,
begin_idx: usize,
values: impl ExactSizeIterator<Item = Self::Item>,
)
fn fc( &self, begin_idx: usize, values: impl ExactSizeIterator<Item = Self::Item>, )
Task to perform on a chunk of values
with known length starting at the given begin_idx
.
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.