Trait ParStridedIteratorSimdZip

Source
pub trait ParStridedIteratorSimdZip: Sized + IterGetSetSimd {
    // Provided method
    fn zip<'a, C>(self, other: C) -> ParStridedZipSimd<'a, Self, C>
       where C: UnindexedProducer + 'a + IterGetSetSimd + ParallelIterator + ShapeManipulator,
             <C as IterGetSetSimd>::Item: Send,
             Self: UnindexedProducer + ParallelIterator + ShapeManipulator,
             <Self as IterGetSetSimd>::Item: Send { ... }
}
Expand description

A trait to zip two parallel iterators together.

Provided Methods§

Source

fn zip<'a, C>(self, other: C) -> ParStridedZipSimd<'a, Self, C>

Combines this ParStridedZipSimd iterator with another SIMD-optimized iterator, enabling simultaneous parallel iteration.

This method performs shape broadcasting between self and other to ensure that both iterators iterate over tensors with compatible shapes. It calculates the appropriate iteration intervals based on the new broadcasted shape and configures both iterators accordingly. Finally, it returns a new ParStridedZipSimd instance that allows for synchronized parallel iteration over the combined iterators.

§Arguments
  • other - The third iterator to zip with. It must implement the IterGetSetSimd, UnindexedProducer, ShapeManipulator, and ParallelIterator traits, and its associated Item type must be Send.
§Returns

A new ParStridedZipSimd instance that combines self and other for synchronized parallel iteration over all three iterators.

§Panics

This method will panic if the shapes of self and other cannot be broadcasted together. Ensure that the shapes are compatible before calling this method.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§