pub trait IterGetSetSimd {
type Item;
type SimdItem;
Show 18 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, last_stride: 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 next_simd(&mut self);
fn inner_loop_next(&mut self, index: usize) -> Self::Item;
fn inner_loop_next_simd(&mut self, index: usize) -> Self::SimdItem;
fn all_last_stride_one(&self) -> bool;
fn lanes(&self) -> Option<usize>;
}Expand description
A trait for getting and setting values from an simd 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, 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
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
Sourcefn inner_loop_next_simd(&mut self, index: usize) -> Self::SimdItem
fn inner_loop_next_simd(&mut self, index: usize) -> Self::SimdItem
get the next vector of the inner loop, this is called when we do simd iteration
Sourcefn all_last_stride_one(&self) -> bool
fn all_last_stride_one(&self) -> bool
check if all iterators’ last stride is one, only when all iterators’ last stride is one, we can do simd iteration
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".