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§
Sourcefn simd_add(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_add(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise addition
Sourcefn simd_sub(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_sub(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise subtraction
Sourcefn simd_mul(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_mul(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise multiplication
Sourcefn simd_div(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_div(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise division
Sourcefn simd_dot(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Self
fn simd_dot(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Self
Dot product
Sourcefn simd_gemv(
a: &ArrayView2<'_, Self>,
x: &ArrayView1<'_, Self>,
beta: Self,
y: &mut Array1<Self>,
)
fn simd_gemv( a: &ArrayView2<'_, Self>, x: &ArrayView1<'_, Self>, beta: Self, y: &mut Array1<Self>, )
Matrix-vector multiplication (GEMV)
Sourcefn simd_gemm(
alpha: Self,
a: &ArrayView2<'_, Self>,
b: &ArrayView2<'_, Self>,
beta: Self,
c: &mut Array2<Self>,
)
fn simd_gemm( alpha: Self, a: &ArrayView2<'_, Self>, b: &ArrayView2<'_, Self>, beta: Self, c: &mut Array2<Self>, )
Matrix-matrix multiplication (GEMM)
Sourcefn simd_norm(a: &ArrayView1<'_, Self>) -> Self
fn simd_norm(a: &ArrayView1<'_, Self>) -> Self
Vector norm (L2)
Sourcefn simd_max(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_max(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise maximum
Sourcefn simd_min(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_min(a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise minimum
Sourcefn simd_scalar_mul(a: &ArrayView1<'_, Self>, scalar: Self) -> Array1<Self>
fn simd_scalar_mul(a: &ArrayView1<'_, Self>, scalar: Self) -> Array1<Self>
Scalar multiplication
Sourcefn simd_sum(a: &ArrayView1<'_, Self>) -> Self
fn simd_sum(a: &ArrayView1<'_, Self>) -> Self
Sum reduction
Sourcefn simd_mean(a: &ArrayView1<'_, Self>) -> Self
fn simd_mean(a: &ArrayView1<'_, Self>) -> Self
Mean reduction
Sourcefn simd_max_element(a: &ArrayView1<'_, Self>) -> Self
fn simd_max_element(a: &ArrayView1<'_, Self>) -> Self
Find maximum element
Sourcefn simd_min_element(a: &ArrayView1<'_, Self>) -> Self
fn simd_min_element(a: &ArrayView1<'_, Self>) -> Self
Find minimum element
Sourcefn simd_fma(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
c: &ArrayView1<'_, Self>,
) -> Array1<Self>
fn simd_fma( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>
Fused multiply-add: a * b + c
Sourcefn simd_add_cache_optimized(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
) -> Array1<Self>
fn simd_add_cache_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>
Enhanced cache-optimized addition for large arrays
Sourcefn simd_fma_advanced_optimized(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
c: &ArrayView1<'_, Self>,
) -> Array1<Self>
fn simd_fma_advanced_optimized( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, ) -> Array1<Self>
Advanced-optimized fused multiply-add for maximum performance
Sourcefn simd_add_adaptive(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
) -> Array1<Self>
fn simd_add_adaptive( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>
Adaptive SIMD operation that selects optimal implementation
Sourcefn simd_transpose(a: &ArrayView2<'_, Self>) -> Array2<Self>
fn simd_transpose(a: &ArrayView2<'_, Self>) -> Array2<Self>
Matrix transpose
Sourcefn simd_abs(a: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_abs(a: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise absolute value
Sourcefn simd_sqrt(a: &ArrayView1<'_, Self>) -> Array1<Self>
fn simd_sqrt(a: &ArrayView1<'_, Self>) -> Array1<Self>
Element-wise square root
Sourcefn simd_sum_squares(a: &ArrayView1<'_, Self>) -> Self
fn simd_sum_squares(a: &ArrayView1<'_, Self>) -> Self
Sum of squares
Sourcefn simd_multiply(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
) -> Array1<Self>
fn simd_multiply( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Array1<Self>
Element-wise multiplication (alias for simd_mul)
Sourcefn simd_available() -> bool
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.