SimdUnifiedOps

Trait SimdUnifiedOps 

Source
pub trait SimdUnifiedOps:
    Sized
    + Copy
    + PartialOrd
    + Zero {
Show 25 methods // Required methods fn simd_add( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_sub( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_mul( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_div( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_dot(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Self; fn simd_gemv( a: &ArrayView2<'_, Self>, x: &ArrayView1<'_, Self>, beta: Self, y: &mut Array1<Self>, ); fn simd_gemm( alpha: Self, a: &ArrayView2<'_, Self>, b: &ArrayView2<'_, Self>, beta: Self, c: &mut Array2<Self>, ); fn simd_norm(a: &ArrayView1<'_, Self>) -> Self; fn simd_max( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_min( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_scalar_mul(a: &ArrayView1<'_, Self>, scalar: Self) -> Array1<Self>; fn simd_sum(a: &ArrayView1<'_, Self>) -> Self; fn simd_mean(a: &ArrayView1<'_, Self>) -> Self; fn simd_max_element(a: &ArrayView1<'_, Self>) -> Self; fn simd_min_element(a: &ArrayView1<'_, Self>) -> Self; fn simd_fma( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_add_cache_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_fma_advanced_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_add_adaptive( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_transpose(a: &ArrayView2<'_, Self>) -> Array2<Self>; fn simd_abs(a: &ArrayView1<'_, Self>) -> Array1<Self>; fn simd_sqrt(a: &ArrayView1<'_, Self>) -> Array1<Self>; fn simd_sum_squares(a: &ArrayView1<'_, Self>) -> Self; fn simd_multiply( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>; fn simd_available() -> bool;
}
Expand description

Unified SIMD operations trait

Required Methods§

Source

fn simd_add(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise addition

Source

fn simd_sub(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise subtraction

Source

fn simd_mul(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise multiplication

Source

fn simd_div(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise division

Source

fn simd_dot(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Self

Dot product

Source

fn simd_gemv( a: &ArrayView2<'_, Self>, x: &ArrayView1<'_, Self>, beta: Self, y: &mut Array1<Self>, )

Matrix-vector multiplication (GEMV)

Source

fn simd_gemm( alpha: Self, a: &ArrayView2<'_, Self>, b: &ArrayView2<'_, Self>, beta: Self, c: &mut Array2<Self>, )

Matrix-matrix multiplication (GEMM)

Source

fn simd_norm(a: &ArrayView1<'_, Self>) -> Self

Vector norm (L2)

Source

fn simd_max(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise maximum

Source

fn simd_min(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise minimum

Source

fn simd_scalar_mul(a: &ArrayView1<'_, Self>, scalar: Self) -> Array1<Self>

Scalar multiplication

Source

fn simd_sum(a: &ArrayView1<'_, Self>) -> Self

Sum reduction

Source

fn simd_mean(a: &ArrayView1<'_, Self>) -> Self

Mean reduction

Source

fn simd_max_element(a: &ArrayView1<'_, Self>) -> Self

Find maximum element

Source

fn simd_min_element(a: &ArrayView1<'_, Self>) -> Self

Find minimum element

Source

fn simd_fma( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>

Fused multiply-add: a * b + c

Source

fn simd_add_cache_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Enhanced cache-optimized addition for large arrays

Source

fn simd_fma_advanced_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>

Advanced-optimized fused multiply-add for maximum performance

Source

fn simd_add_adaptive( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Adaptive SIMD operation that selects optimal implementation

Source

fn simd_transpose(a: &ArrayView2<'_, Self>) -> Array2<Self>

Matrix transpose

Source

fn simd_abs(a: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise absolute value

Source

fn simd_sqrt(a: &ArrayView1<'_, Self>) -> Array1<Self>

Element-wise square root

Source

fn simd_sum_squares(a: &ArrayView1<'_, Self>) -> Self

Sum of squares

Source

fn simd_multiply( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Element-wise multiplication (alias for simd_mul)

Source

fn simd_available() -> bool

Check if SIMD is available for this type

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.

Implementations on Foreign Types§

Source§

impl SimdUnifiedOps for f32

Source§

fn simd_add(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_sub(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_mul(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_div(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_dot(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_gemv( a: &ArrayView2<'_, Self>, x: &ArrayView1<'_, Self>, beta: Self, y: &mut Array1<Self>, )

Source§

fn simd_gemm( alpha: Self, a: &ArrayView2<'_, Self>, b: &ArrayView2<'_, Self>, beta: Self, c: &mut Array2<Self>, )

Source§

fn simd_norm(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_max(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_min(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_scalar_mul(a: &ArrayView1<'_, Self>, scalar: Self) -> Array1<Self>

Source§

fn simd_sum(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_mean(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_max_element(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_min_element(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_fma( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_add_cache_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_fma_advanced_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_add_adaptive( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_transpose(a: &ArrayView2<'_, Self>) -> Array2<Self>

Source§

fn simd_abs(a: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_sqrt(a: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_sum_squares(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_multiply( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_available() -> bool

Source§

impl SimdUnifiedOps for f64

Source§

fn simd_add(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_sub(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_mul(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_div(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_dot(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_gemv( a: &ArrayView2<'_, Self>, x: &ArrayView1<'_, Self>, beta: Self, y: &mut Array1<Self>, )

Source§

fn simd_gemm( alpha: Self, a: &ArrayView2<'_, Self>, b: &ArrayView2<'_, Self>, beta: Self, c: &mut Array2<Self>, )

Source§

fn simd_norm(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_max(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_min(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_scalar_mul(a: &ArrayView1<'_, Self>, scalar: Self) -> Array1<Self>

Source§

fn simd_sum(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_mean(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_max_element(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_min_element(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_fma( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_add_cache_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_fma_advanced_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_add_adaptive( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_transpose(a: &ArrayView2<'_, Self>) -> Array2<Self>

Source§

fn simd_abs(a: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_sqrt(a: &ArrayView1<'_, Self>) -> Array1<Self>

Source§

fn simd_sum_squares(a: &ArrayView1<'_, Self>) -> Self

Source§

fn simd_multiply( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>

Source§

fn simd_available() -> bool

Implementors§