pub trait SimdUnifiedOps:
Sized
+ Copy
+ PartialOrd
+ Zero {
Show 37 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;
fn simd_sub_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_mul_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_sum_cubes(a: &ArrayView1<'_, Self>) -> Self;
fn simd_div_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_sin_f32_ultra(
a: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_add_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_fma_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
c: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_pow_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_exp_f32_ultra(
a: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_cos_f32_ultra(
a: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
);
fn simd_dot_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
) -> Self;
// Provided method
fn simd_sum_f32_ultra(a: &ArrayView1<'_, Self>) -> Self { ... }
}
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
Sourcefn simd_sub_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_sub_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized subtraction (alias for simd_sub for compatibility)
Sourcefn simd_mul_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_mul_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized multiplication (alias for simd_mul for compatibility)
Sourcefn simd_sum_cubes(a: &ArrayView1<'_, Self>) -> Self
fn simd_sum_cubes(a: &ArrayView1<'_, Self>) -> Self
Ultra-optimized cubes sum (power 3 sum)
Sourcefn simd_div_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_div_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized division (alias for simd_div for compatibility)
Sourcefn simd_sin_f32_ultra(
a: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_sin_f32_ultra( a: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized sine function
Sourcefn simd_add_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_add_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized addition (alias for simd_add for compatibility)
Sourcefn simd_fma_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
c: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_fma_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, c: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized fused multiply-add
Sourcefn simd_pow_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_pow_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized power function
Sourcefn simd_exp_f32_ultra(
a: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_exp_f32_ultra( a: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized exponential function
Sourcefn simd_cos_f32_ultra(
a: &ArrayView1<'_, Self>,
result: &mut ArrayViewMut1<'_, Self>,
)
fn simd_cos_f32_ultra( a: &ArrayView1<'_, Self>, result: &mut ArrayViewMut1<'_, Self>, )
Ultra-optimized cosine function
Sourcefn simd_dot_f32_ultra(
a: &ArrayView1<'_, Self>,
b: &ArrayView1<'_, Self>,
) -> Self
fn simd_dot_f32_ultra( a: &ArrayView1<'_, Self>, b: &ArrayView1<'_, Self>, ) -> Self
Ultra-optimized dot product
Provided Methods§
Sourcefn simd_sum_f32_ultra(a: &ArrayView1<'_, Self>) -> Self
fn simd_sum_f32_ultra(a: &ArrayView1<'_, Self>) -> Self
Ultra-optimized sum reduction (alias for simd_sum for compatibility)
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.