pub struct StridedZip<'a, A: 'a, B: 'a> { /* private fields */ }
Expand description
A single thread non
SIMD-optimized zipped iterator combining two iterators over tensor elements.
Implementations§
Source§impl<'a, A, B> StridedZip<'a, A, B>where
A: 'a + IterGetSet,
B: 'a + IterGetSet,
<A as IterGetSet>::Item: Send,
<B as IterGetSet>::Item: Send,
impl<'a, A, B> StridedZip<'a, A, B>where
A: 'a + IterGetSet,
B: 'a + IterGetSet,
<A as IterGetSet>::Item: Send,
<B as IterGetSet>::Item: Send,
Trait Implementations§
Source§impl<'a, A: Clone + 'a, B: Clone + 'a> Clone for StridedZip<'a, A, B>
impl<'a, A: Clone + 'a, B: Clone + 'a> Clone for StridedZip<'a, A, B>
Source§fn clone(&self) -> StridedZip<'a, A, B>
fn clone(&self) -> StridedZip<'a, A, B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, A, B> IterGetSet for StridedZip<'a, A, B>where
A: IterGetSet,
B: IterGetSet,
impl<'a, A, B> IterGetSet for StridedZip<'a, A, B>where
A: IterGetSet,
B: IterGetSet,
Source§type Item = (<A as IterGetSet>::Item, <B as IterGetSet>::Item)
type Item = (<A as IterGetSet>::Item, <B as IterGetSet>::Item)
The type of the iterator’s elements.
Source§fn set_end_index(&mut self, _: usize)
fn set_end_index(&mut self, _: usize)
set the end index of the iterator, this is used when rayon perform data splitting
Source§fn set_intervals(&mut self, _: Arc<Vec<(usize, usize)>>)
fn set_intervals(&mut self, _: Arc<Vec<(usize, usize)>>)
set the chunk intervals of the iterator, we chunk the outer loop
Source§fn set_strides(&mut self, last_stride: Strides)
fn set_strides(&mut self, last_stride: Strides)
set the strides for the iterator, we call this method normally when we do broadcasting
Source§fn set_shape(&mut self, shape: Shape)
fn set_shape(&mut self, shape: Shape)
set the shape for the iterator, we call this method normally when we do broadcasting
Source§fn broadcast_set_strides(&mut self, shape: &Shape)
fn broadcast_set_strides(&mut self, shape: &Shape)
set the strides for all the iterators
Source§fn outer_loop_size(&self) -> usize
fn outer_loop_size(&self) -> usize
get the outer loop size
Source§fn inner_loop_size(&self) -> usize
fn inner_loop_size(&self) -> usize
get the inner loop size
Source§fn inner_loop_next(&mut self, index: usize) -> Self::Item
fn inner_loop_next(&mut self, index: usize) -> Self::Item
get the next element of the inner loop
Source§impl<'a, A, B> StridedIterator for StridedZip<'a, A, B>where
A: IterGetSet,
B: IterGetSet,
impl<'a, A, B> StridedIterator for StridedZip<'a, A, B>where
A: IterGetSet,
B: IterGetSet,
Source§impl<'a, A, B> StridedIteratorMap for StridedZip<'a, A, B>
impl<'a, A, B> StridedIteratorMap for StridedZip<'a, A, B>
Source§fn map<'a, T, F, U>(self, f: F) -> StridedMap<'a, Self, T, F>
fn map<'a, T, F, U>(self, f: F) -> StridedMap<'a, Self, T, F>
Transforms the strided iterators by applying a provided function to their items. Read more
impl<'a, A, B> StridedIteratorZip for StridedZip<'a, A, B>
Auto Trait Implementations§
impl<'a, A, B> Freeze for StridedZip<'a, A, B>
impl<'a, A, B> RefUnwindSafe for StridedZip<'a, A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<'a, A, B> Send for StridedZip<'a, A, B>
impl<'a, A, B> Sync for StridedZip<'a, A, B>
impl<'a, A, B> Unpin for StridedZip<'a, A, B>
impl<'a, A, B> UnwindSafe for StridedZip<'a, A, B>where
A: UnwindSafe,
B: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more