pub trait IterGetSet {
type Item;
Show 14 methods
// Required methods
fn set_end_index(&mut self, end_index: usize);
fn set_intervals(&mut self, intervals: Arc<Vec<(usize, usize)>>);
fn set_strides(&mut self, strides: Strides);
fn set_shape(&mut self, shape: Shape);
fn set_prg(&mut self, prg: Vec<i64>);
fn intervals(&self) -> &Arc<Vec<(usize, usize)>>;
fn strides(&self) -> &Strides;
fn shape(&self) -> &Shape;
fn layout(&self) -> &Layout;
fn broadcast_set_strides(&mut self, shape: &Shape);
fn outer_loop_size(&self) -> usize;
fn inner_loop_size(&self) -> usize;
fn next(&mut self);
fn inner_loop_next(&mut self, index: usize) -> Self::Item;
}
Expand description
A trait for getting and setting values from an iterator.
Required Associated Types§
Required Methods§
Sourcefn set_end_index(&mut self, end_index: usize)
fn set_end_index(&mut self, end_index: usize)
set the end index of the iterator, this is used when rayon perform data splitting
Sourcefn set_intervals(&mut self, intervals: Arc<Vec<(usize, usize)>>)
fn set_intervals(&mut self, intervals: Arc<Vec<(usize, usize)>>)
set the chunk intervals of the iterator, we chunk the outer loop
Sourcefn set_strides(&mut self, strides: Strides)
fn set_strides(&mut self, strides: Strides)
set the strides for the iterator, we call this method normally when we do broadcasting
Sourcefn 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
Sourcefn broadcast_set_strides(&mut self, shape: &Shape)
fn broadcast_set_strides(&mut self, shape: &Shape)
set the strides for all the iterators
Sourcefn outer_loop_size(&self) -> usize
fn outer_loop_size(&self) -> usize
get the outer loop size
Sourcefn inner_loop_size(&self) -> usize
fn inner_loop_size(&self) -> usize
get the inner loop size
Sourcefn 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