orx-parallel 4.0.0

Performant parallel computations with an expressive iterator API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{Params, infallible::Xap, runner::ParRunner};
use orx_concurrent_iter::ConcurrentIter;

/// Core trait for all parallel computation variants.
pub trait ParCore: IntoIterator {
    /// Type of the parallel runner.
    type Runner: ParRunner;

    /// Concurrent iterator of the input elements.
    type Input: ConcurrentIter;

    /// Transformation.
    type Xap: Xap<I = <Self::Input as ConcurrentIter>::Item, O = Self::Item>;

    /// Destructs the parallel iterator into its members.
    fn destruct(self) -> (Self::Input, Self::Xap, Self::Runner, Params);
}