Skip to main content

SimdCowExt

Trait SimdCowExt 

Source
pub trait SimdCowExt<T: SimdScalar, Arch: SimdArch + SimdKernel<T>, Align: Alignment> {
    // Required method
    fn transform_vectors<F>(&mut self, f: F)
       where F: FnMut(Vector<T, Arch>) -> Vector<T, Arch>;
}
Expand description

Extension trait for SimdCow providing vector-register level operations.

Required Methods§

Source

fn transform_vectors<F>(&mut self, f: F)
where F: FnMut(Vector<T, Arch>) -> Vector<T, Arch>,

In-place vector-level transformation.

Promotes self to owned if borrowed (zero-copy upgrade), then applies the function f elementwise to each SIMD vector chunk.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T, Arch, Align> SimdCowExt<T, Arch, Align> for SimdCow<'a, T, Arch, Align>
where T: SimdScalar, Arch: SimdArch + SimdKernel<T>, Align: Alignment,