Trait halo2_backend::multicore::IntoParallelIterator

pub trait IntoParallelIterator {
    type Iter: ParallelIterator<Item = Self::Item>;
    type Item: Send;

    // Required method
    fn into_par_iter(self) -> Self::Iter;
}
Expand description

IntoParallelIterator implements the conversion to a ParallelIterator.

By implementing IntoParallelIterator for a type, you define how it will transformed into an iterator. This is a parallel version of the standard library’s std::iter::IntoIterator trait.

Required Associated Types§

type Iter: ParallelIterator<Item = Self::Item>

The parallel iterator type that will be created.

type Item: Send

The type of item that the parallel iterator will produce.

Required Methods§

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator.

§Examples
use rayon::prelude::*;

println!("counting in parallel:");
(0..100).into_par_iter()
    .for_each(|i| println!("{}", i));

This conversion is often implicit for arguments to methods like zip.

use rayon::prelude::*;

let v: Vec<_> = (0..5).into_par_iter().zip(5..10).collect();
assert_eq!(v, [(0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]);

Implementations on Foreign Types§

§

impl<'a, A> IntoParallelIterator for &'a (A,)

§

type Item = (<A as IntoParallelRefIterator<'a>>::Item,)

§

type Iter = MultiZip<(<A as IntoParallelRefIterator<'a>>::Iter,)>

§

fn into_par_iter(self) -> <&'a (A,) as IntoParallelIterator>::Iter

§

impl<'a, A> IntoParallelIterator for &'a mut (A,)

§

type Item = (<A as IntoParallelRefMutIterator<'a>>::Item,)

§

type Iter = MultiZip<(<A as IntoParallelRefMutIterator<'a>>::Iter,)>

§

fn into_par_iter(self) -> <&'a mut (A,) as IntoParallelIterator>::Iter

§

impl<'a, A, B> IntoParallelIterator for &'a (A, B)

§

type Item = (<A as IntoParallelRefIterator<'a>>::Item, <B as IntoParallelRefIterator<'a>>::Item)

§

type Iter = MultiZip<(<A as IntoParallelRefIterator<'a>>::Iter, <B as IntoParallelRefIterator<'a>>::Iter)>

§

fn into_par_iter(self) -> <&'a (A, B) as IntoParallelIterator>::Iter

§

impl<'a, A, B> IntoParallelIterator for &'a mut (A, B)

§

impl<'a, A, B, C> IntoParallelIterator for &'a (A, B, C)

§

impl<'a, A, B, C> IntoParallelIterator for &'a mut (A, B, C)

§

impl<'a, A, B, C, D> IntoParallelIterator for &'a (A, B, C, D)

§

impl<'a, A, B, C, D> IntoParallelIterator for &'a mut (A, B, C, D)

§

impl<'a, A, B, C, D, E> IntoParallelIterator for &'a (A, B, C, D, E)

§

impl<'a, A, B, C, D, E> IntoParallelIterator for &'a mut (A, B, C, D, E)

§

impl<'a, A, B, C, D, E, F> IntoParallelIterator for &'a (A, B, C, D, E, F)

§

impl<'a, A, B, C, D, E, F> IntoParallelIterator for &'a mut (A, B, C, D, E, F)

§

impl<'a, A, B, C, D, E, F, G> IntoParallelIterator for &'a (A, B, C, D, E, F, G)

§

impl<'a, A, B, C, D, E, F, G> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G)

§

impl<'a, A, B, C, D, E, F, G, H> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H)

§

impl<'a, A, B, C, D, E, F, G, H> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H)

§

impl<'a, A, B, C, D, E, F, G, H, I> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I)

§

impl<'a, A, B, C, D, E, F, G, H, I> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I)

§

impl<'a, A, B, C, D, E, F, G, H, I, J> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I, J)

§

impl<'a, A, B, C, D, E, F, G, H, I, J> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I, J)

§

impl<'a, A, B, C, D, E, F, G, H, I, J, K> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I, J, K)

§

impl<'a, A, B, C, D, E, F, G, H, I, J, K> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I, J, K)

§

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I, J, K, L)

§

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I, J, K, L)

§

impl<'a, K, V> IntoParallelIterator for &'a BTreeMap<K, V>
where K: Ord + Sync, V: Sync,

§

type Item = <&'a BTreeMap<K, V> as IntoIterator>::Item

§

type Iter = Iter<'a, K, V>

§

fn into_par_iter(self) -> <&'a BTreeMap<K, V> as IntoParallelIterator>::Iter

§

impl<'a, K, V> IntoParallelIterator for &'a mut BTreeMap<K, V>
where K: Ord + Sync, V: Send,

§

type Item = <&'a mut BTreeMap<K, V> as IntoIterator>::Item

§

type Iter = IterMut<'a, K, V>

§

fn into_par_iter(self) -> <&'a mut BTreeMap<K, V> as IntoParallelIterator>::Iter

§

impl<'a, K, V, S> IntoParallelIterator for &'a HashMap<K, V, S>
where K: Hash + Eq + Sync, V: Sync, S: BuildHasher,

§

type Item = <&'a HashMap<K, V, S> as IntoIterator>::Item

§

type Iter = Iter<'a, K, V>

§

fn into_par_iter(self) -> <&'a HashMap<K, V, S> as IntoParallelIterator>::Iter

§

impl<'a, K, V, S> IntoParallelIterator for &'a mut HashMap<K, V, S>
where K: Hash + Eq + Sync, V: Send, S: BuildHasher,

§

type Item = <&'a mut HashMap<K, V, S> as IntoIterator>::Item

§

type Iter = IterMut<'a, K, V>

§

fn into_par_iter( self ) -> <&'a mut HashMap<K, V, S> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a Option<T>
where T: Sync,

§

type Item = &'a T

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a Option<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a BinaryHeap<T>
where T: Ord + Sync,

§

type Item = <&'a BinaryHeap<T> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a BinaryHeap<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a BTreeSet<T>
where T: Ord + Sync,

§

type Item = <&'a BTreeSet<T> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a BTreeSet<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a LinkedList<T>
where T: Sync,

§

type Item = <&'a LinkedList<T> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a LinkedList<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a VecDeque<T>
where T: Sync,

§

type Item = &'a T

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a VecDeque<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a mut Option<T>
where T: Send,

§

type Item = &'a mut T

§

type Iter = IterMut<'a, T>

§

fn into_par_iter(self) -> <&'a mut Option<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a mut LinkedList<T>
where T: Send,

§

type Item = <&'a mut LinkedList<T> as IntoIterator>::Item

§

type Iter = IterMut<'a, T>

§

fn into_par_iter(self) -> <&'a mut LinkedList<T> as IntoParallelIterator>::Iter

§

impl<'a, T> IntoParallelIterator for &'a mut VecDeque<T>
where T: Send,

§

type Item = &'a mut T

§

type Iter = IterMut<'a, T>

§

fn into_par_iter(self) -> <&'a mut VecDeque<T> as IntoParallelIterator>::Iter

§

impl<'a, T, E> IntoParallelIterator for &'a Result<T, E>
where T: Sync,

§

type Item = &'a T

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a Result<T, E> as IntoParallelIterator>::Iter

§

impl<'a, T, E> IntoParallelIterator for &'a mut Result<T, E>
where T: Send,

§

type Item = &'a mut T

§

type Iter = IterMut<'a, T>

§

fn into_par_iter(self) -> <&'a mut Result<T, E> as IntoParallelIterator>::Iter

§

impl<'a, T, S> IntoParallelIterator for &'a HashSet<T, S>
where T: Hash + Eq + Sync, S: BuildHasher,

§

type Item = <&'a HashSet<T, S> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

§

fn into_par_iter(self) -> <&'a HashSet<T, S> as IntoParallelIterator>::Iter

§

impl<'data, T> IntoParallelIterator for &'data [T]
where T: Sync + 'data,

§

type Item = &'data T

§

type Iter = Iter<'data, T>

§

fn into_par_iter(self) -> <&'data [T] as IntoParallelIterator>::Iter

§

impl<'data, T> IntoParallelIterator for &'data Vec<T>
where T: Sync + 'data,

§

type Item = &'data T

§

type Iter = Iter<'data, T>

§

fn into_par_iter(self) -> <&'data Vec<T> as IntoParallelIterator>::Iter

§

impl<'data, T> IntoParallelIterator for &'data mut [T]
where T: Send + 'data,

§

type Item = &'data mut T

§

type Iter = IterMut<'data, T>

§

fn into_par_iter(self) -> <&'data mut [T] as IntoParallelIterator>::Iter

§

impl<'data, T> IntoParallelIterator for &'data mut Vec<T>
where T: Send + 'data,

§

type Item = &'data mut T

§

type Iter = IterMut<'data, T>

§

fn into_par_iter(self) -> <&'data mut Vec<T> as IntoParallelIterator>::Iter

§

impl<'data, T, const N: usize> IntoParallelIterator for &'data [T; N]
where T: Sync + 'data,

§

type Item = &'data T

§

type Iter = Iter<'data, T>

§

fn into_par_iter(self) -> <&'data [T; N] as IntoParallelIterator>::Iter

§

impl<'data, T, const N: usize> IntoParallelIterator for &'data mut [T; N]
where T: Send + 'data,

§

type Item = &'data mut T

§

type Iter = IterMut<'data, T>

§

fn into_par_iter(self) -> <&'data mut [T; N] as IntoParallelIterator>::Iter

§

impl<A> IntoParallelIterator for (A,)

§

type Item = (<A as IntoParallelIterator>::Item,)

§

type Iter = MultiZip<(<A as IntoParallelIterator>::Iter,)>

§

fn into_par_iter(self) -> <(A,) as IntoParallelIterator>::Iter

§

impl<A, B> IntoParallelIterator for (A, B)

§

impl<A, B, C> IntoParallelIterator for (A, B, C)

§

impl<A, B, C, D> IntoParallelIterator for (A, B, C, D)

§

impl<A, B, C, D, E> IntoParallelIterator for (A, B, C, D, E)

§

impl<A, B, C, D, E, F> IntoParallelIterator for (A, B, C, D, E, F)

§

impl<A, B, C, D, E, F, G> IntoParallelIterator for (A, B, C, D, E, F, G)

§

impl<A, B, C, D, E, F, G, H> IntoParallelIterator for (A, B, C, D, E, F, G, H)

§

impl<A, B, C, D, E, F, G, H, I> IntoParallelIterator for (A, B, C, D, E, F, G, H, I)

§

impl<A, B, C, D, E, F, G, H, I, J> IntoParallelIterator for (A, B, C, D, E, F, G, H, I, J)

§

impl<A, B, C, D, E, F, G, H, I, J, K> IntoParallelIterator for (A, B, C, D, E, F, G, H, I, J, K)

§

impl<A, B, C, D, E, F, G, H, I, J, K, L> IntoParallelIterator for (A, B, C, D, E, F, G, H, I, J, K, L)

§

impl<K, V> IntoParallelIterator for BTreeMap<K, V>
where K: Ord + Send, V: Send,

§

type Item = <BTreeMap<K, V> as IntoIterator>::Item

§

type Iter = IntoIter<K, V>

§

fn into_par_iter(self) -> <BTreeMap<K, V> as IntoParallelIterator>::Iter

§

impl<K, V, S> IntoParallelIterator for HashMap<K, V, S>
where K: Hash + Eq + Send, V: Send, S: BuildHasher,

§

type Item = <HashMap<K, V, S> as IntoIterator>::Item

§

type Iter = IntoIter<K, V>

§

fn into_par_iter(self) -> <HashMap<K, V, S> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for Option<T>
where T: Send,

§

type Item = T

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <Option<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for BinaryHeap<T>
where T: Ord + Send,

§

type Item = T

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <BinaryHeap<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for BTreeSet<T>
where T: Ord + Send,

§

type Item = <BTreeSet<T> as IntoIterator>::Item

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <BTreeSet<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for LinkedList<T>
where T: Send,

§

type Item = <LinkedList<T> as IntoIterator>::Item

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <LinkedList<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for VecDeque<T>
where T: Send,

§

type Item = T

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <VecDeque<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for Vec<T>
where T: Send,

§

type Item = T

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <Vec<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for Range<T>
where Iter<T>: ParallelIterator,

Implemented for ranges of all primitive integer types and char.

§

type Item = <Iter<T> as ParallelIterator>::Item

§

type Iter = Iter<T>

§

fn into_par_iter(self) -> <Range<T> as IntoParallelIterator>::Iter

§

impl<T> IntoParallelIterator for RangeInclusive<T>
where Iter<T>: ParallelIterator,

Implemented for ranges of all primitive integer types and char.

§

type Item = <Iter<T> as ParallelIterator>::Item

§

type Iter = Iter<T>

§

fn into_par_iter(self) -> <RangeInclusive<T> as IntoParallelIterator>::Iter

§

impl<T, E> IntoParallelIterator for Result<T, E>
where T: Send,

§

type Item = T

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <Result<T, E> as IntoParallelIterator>::Iter

§

impl<T, S> IntoParallelIterator for HashSet<T, S>
where T: Hash + Eq + Send, S: BuildHasher,

§

type Item = <HashSet<T, S> as IntoIterator>::Item

§

type Iter = IntoIter<T>

§

fn into_par_iter(self) -> <HashSet<T, S> as IntoParallelIterator>::Iter

§

impl<T, const N: usize> IntoParallelIterator for [T; N]
where T: Send,

§

type Item = T

§

type Iter = IntoIter<T, N>

§

fn into_par_iter(self) -> <[T; N] as IntoParallelIterator>::Iter

Implementors§

§

impl<T> IntoParallelIterator for T

§

type Iter = T

§

type Item = <T as ParallelIterator>::Item