pub trait SimdIterable {
type Elem: Elem;
// Required methods
fn simd_iter<O: NumOps<Self::Elem>>(
&self,
ops: O,
) -> Iter<'_, Self::Elem, O> ⓘ;
fn simd_iter_pad<O: NumOps<Self::Elem>>(
&self,
ops: O,
) -> impl ExactSizeIterator<Item = O::Simd>;
}Expand description
Methods for creating vectorized iterators.
Required Associated Types§
Required Methods§
Sourcefn simd_iter<O: NumOps<Self::Elem>>(&self, ops: O) -> Iter<'_, Self::Elem, O> ⓘ
fn simd_iter<O: NumOps<Self::Elem>>(&self, ops: O) -> Iter<'_, Self::Elem, O> ⓘ
Iterate over SIMD-sized chunks of the input.
If the input length is not divisble by the SIMD vector width, the
iterator yields only the full chunks. The tail is accessible via the
iterator’s tail method.
Sourcefn simd_iter_pad<O: NumOps<Self::Elem>>(
&self,
ops: O,
) -> impl ExactSizeIterator<Item = O::Simd>
fn simd_iter_pad<O: NumOps<Self::Elem>>( &self, ops: O, ) -> impl ExactSizeIterator<Item = O::Simd>
Iterate over SIMD-sized chunks of the input.
If the input length is not divisble by the SIMD vector width, the final chunk will be padded with zeros.
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.