PaddedIt

Struct PaddedIt 

Source
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>

Source

pub fn map<T, T2>(self, f: impl FnMut(T) -> T2) -> PaddedIt<impl ChunkIt<T2>>
where I: ChunkIt<T>,

Apply f to each element.

Source

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).

Source

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

pub fn zip<T, T2>( self, other: PaddedIt<impl ChunkIt<T2>>, ) -> PaddedIt<impl ChunkIt<(T, T2)>>
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>

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V