pub struct MathFunctions;Expand description
SIMD-optimized mathematical functions
Implementations§
Source§impl MathFunctions
impl MathFunctions
Sourcepub fn exp_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
pub fn exp_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
Optimized exponential function using fast approximation
Sourcepub fn sqrt_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
pub fn sqrt_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
Element-wise square root with SIMD optimization hints
Sourcepub fn log_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
pub fn log_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
Element-wise natural logarithm with SIMD optimization hints
Sourcepub fn pow_f32_optimized(
base: &[f32],
exponent: &[f32],
output: &mut [f32],
) -> Result<()>
pub fn pow_f32_optimized( base: &[f32], exponent: &[f32], output: &mut [f32], ) -> Result<()>
Element-wise power operation (x^y) with SIMD optimization hints
Sourcepub fn sin_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
pub fn sin_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
Element-wise sine function with SIMD optimization hints
Sourcepub fn cos_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
pub fn cos_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
Element-wise cosine function with SIMD optimization hints
Sourcepub fn abs_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
pub fn abs_f32_optimized(input: &[f32], output: &mut [f32]) -> Result<()>
Element-wise absolute value with SIMD optimization hints
Sourcepub fn sub_f32_optimized(a: &[f32], b: &[f32], result: &mut [f32]) -> Result<()>
pub fn sub_f32_optimized(a: &[f32], b: &[f32], result: &mut [f32]) -> Result<()>
Element-wise subtraction with SIMD optimization hints
Sourcepub fn div_f32_optimized(a: &[f32], b: &[f32], result: &mut [f32]) -> Result<()>
pub fn div_f32_optimized(a: &[f32], b: &[f32], result: &mut [f32]) -> Result<()>
Element-wise division with SIMD optimization hints and division by zero protection
Auto Trait Implementations§
impl Freeze for MathFunctions
impl RefUnwindSafe for MathFunctions
impl Send for MathFunctions
impl Sync for MathFunctions
impl Unpin for MathFunctions
impl UnsafeUnpin for MathFunctions
impl UnwindSafe for MathFunctions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more