pub struct PaddedIt<I> {
pub it: I,
pub padding: usize,
}
Expand description
An iterator over values in multiple SIMD lanes, with a certain amount of padding
at the end.
This type is returned by functions like crate::Seq::par_iter_bp
.
It usally contains an iterator over e.g. u32x8
values or (u32x8, u32x8)
tuples,
Fields§
§it: I
§padding: usize
Implementations§
Source§impl<I> PaddedIt<I>
impl<I> PaddedIt<I>
Sourcepub fn map<T, T2>(self, f: impl FnMut(T) -> T2) -> PaddedIt<impl ChunkIt<T2>>where
I: ChunkIt<T>,
pub fn map<T, T2>(self, f: impl FnMut(T) -> T2) -> PaddedIt<impl ChunkIt<T2>>where
I: ChunkIt<T>,
Apply f
to each element.
Sourcepub fn advance<T>(self, n: usize) -> PaddedIt<impl ChunkIt<T>>where
I: ChunkIt<T>,
pub fn advance<T>(self, n: usize) -> PaddedIt<impl ChunkIt<T>>where
I: ChunkIt<T>,
Advance the iterator by n
steps, consuming the first n
values (of each lane).
Sourcepub fn advance_with<T>(&mut self, n: usize, f: impl FnMut(T))where
I: ChunkIt<T>,
pub fn advance_with<T>(&mut self, n: usize, f: impl FnMut(T))where
I: ChunkIt<T>,
Advance the iterator by n
steps, consuming the first n
values (of each lane).
Source§impl<I: ChunkIt<u32x8>> PaddedIt<I>
impl<I: ChunkIt<u32x8>> PaddedIt<I>
Sourcepub fn collect(self) -> Vec<u32>
pub fn collect(self) -> Vec<u32>
Collect all values of a padded u32x8
-iterator into a flat vector.
Prefer collect_into
to avoid repeated allocations.
Sourcepub fn collect_into(self, out_vec: &mut Vec<u32>)
pub fn collect_into(self, out_vec: &mut Vec<u32>)
Collect all values of a padded u32x8
-iterator into a flat vector.
Implemented by taking 8 elements from each stream, and transposing this SIMD-matrix before writing out the results.
The tail
is appended at the end.
Auto Trait Implementations§
impl<I> Freeze for PaddedIt<I>where
I: Freeze,
impl<I> RefUnwindSafe for PaddedIt<I>where
I: RefUnwindSafe,
impl<I> Send for PaddedIt<I>where
I: Send,
impl<I> Sync for PaddedIt<I>where
I: Sync,
impl<I> Unpin for PaddedIt<I>where
I: Unpin,
impl<I> UnwindSafe for PaddedIt<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more