pub trait VectorArithmetic<T> {
// Required methods
fn add(&self, a: &[T], b: &[T]) -> Result<Vec<T>, SimdError>;
fn sub(&self, a: &[T], b: &[T]) -> Result<Vec<T>, SimdError>;
fn mul(&self, a: &[T], b: &[T]) -> Result<Vec<T>, SimdError>;
fn div(&self, a: &[T], b: &[T]) -> Result<Vec<T>, SimdError>;
fn fma(&self, a: &[T], b: &[T], c: &[T]) -> Result<Vec<T>, SimdError>;
fn scale(&self, vector: &[T], scalar: T) -> Result<Vec<T>, SimdError>;
}Expand description
Trait for vectorized arithmetic operations
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl VectorArithmetic<f32> for TargetOptimizedOps
Target-specific vector arithmetic implementation