[][src]Trait broccoli::Joinable

pub trait Joinable: Clone + Send + Sync {
    fn join<A, B, RA, RB>(&self, oper_a: A, oper_b: B) -> (RA, RB)
    where
        A: FnOnce(&Self) -> RA + Send,
        B: FnOnce(&Self) -> RB + Send,
        RA: Send,
        RB: Send
; fn for_every<T, F>(&self, arr: &mut [T], func: F)
    where
        T: Send,
        F: Fn(&mut T) + Send + Copy
, { ... } }

Trait defining the main primitive with which the _par functions will be parallelized. The trait is based off of rayon's join function.

Required methods

fn join<A, B, RA, RB>(&self, oper_a: A, oper_b: B) -> (RA, RB) where
    A: FnOnce(&Self) -> RA + Send,
    B: FnOnce(&Self) -> RB + Send,
    RA: Send,
    RB: Send
[src]

Execute both closures potentially in parallel.

Loading content...

Provided methods

fn for_every<T, F>(&self, arr: &mut [T], func: F) where
    T: Send,
    F: Fn(&mut T) + Send + Copy
[src]

Execute function F on each element in parallel using Self::join.

Loading content...

Implementors

impl Joinable for RayonJoin[src]

Loading content...