Struct rayon::par_iter::map::Map [] [src]

pub struct Map<M, MAP_OP> {
    // some fields omitted
}

Methods

impl<M, MAP_OP> Map<M, MAP_OP>
[src]

fn new(base: M, map_op: MAP_OP) -> Map<M, MAP_OP>

Trait Implementations

impl<M, MAP_OP, R> ParallelIterator for Map<M, MAP_OP> where M: ParallelIterator, MAP_OP: Fn(M::Item) -> R + Sync, R: Send
[src]

type Item = R

type Shared = MapShared<M, MAP_OP>

type State = MapState<M, MAP_OP>

fn state(self) -> (Self::Shared, Self::State)

fn weight(self, scale: f64) -> Weight<Self> where Self: Sized

Indicates the relative "weight" of producing each item in this parallel iterator. A higher weight will cause finer-grained parallel subtasks. 1.0 indicates something very cheap and uniform, like copying a value out of an array, or computing x + 1. If your tasks are either very expensive, or very unpredictable, you are better off with higher values. See also weight_max, which is a convenient shorthand to force the finest grained parallel execution posible. Tuning this value should not affect correctness but can improve (or hurt) performance. Read more

fn weight_max(self) -> Weight<Self> where Self: Sized

Shorthand for self.weight(f64::INFINITY). This forces the smallest granularity of parallel execution, which makes sense when your parallel tasks are (potentially) very expensive to execute. Read more

fn enumerate(self) -> Enumerate<Self> where Self: Sized

Yields an index along with each item.

fn for_each<OP>(self, op: OP) where OP: Fn(Self::Item) + Sync, Self: Sized

Executes OP on each item produced by the iterator, in parallel.

fn map<MAP_OP, R>(self, map_op: MAP_OP) -> Map<Self, MAP_OP> where MAP_OP: Fn(Self::Item) -> R, Self: Sized

Applies map_op to each item of his iterator, producing a new iterator with the results. Read more

fn collect_into(self, target: &mut Vec<Self::Item>) where Self: Sized

Collects the results of the iterator into the specified vector. The vector is always truncated before execution begins. If possible, reusing the vector across calls can lead to better performance since it reuses the same backing buffer. Read more

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item> where Self: Sized, OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync

Reduces the items in the iterator into one item using op. See also sum, mul, min, etc, which are slightly more efficient. Returns None if the iterator is empty. Read more

fn sum(self) -> Self::Item where Self: Sized, SumOp: ReduceOp<Self::Item>

Sums up the items in the iterator. Read more

fn mul(self) -> Self::Item where Self: Sized, MulOp: ReduceOp<Self::Item>

Multiplies all the items in the iterator. Read more

fn min(self) -> Self::Item where Self: Sized, MinOp: ReduceOp<Self::Item>

Computes the minimum of all the items in the iterator. Read more

fn max(self) -> Self::Item where Self: Sized, MaxOp: ReduceOp<Self::Item>

Computes the maximum of all the items in the iterator. Read more

fn reduce<REDUCE_OP>(self, reduce_op: &REDUCE_OP) -> Self::Item where Self: Sized, REDUCE_OP: ReduceOp<Self::Item>

Reduces the items using the given "reduce operator". You may prefer reduce_with for a simpler interface. Read more

fn zip<ZIP_OP>(self, zip_op: ZIP_OP) -> ZipIter<Self, ZIP_OP::Iter> where Self: Sized, ZIP_OP: IntoParallelIterator

Iterate over tuples (A, B), where the items A are from this iterator and B are from the iterator given as argument. Like the zip method on ordinary iterators, if the two iterators are of unequal length, you only get the items they have in common. Read more