pub struct Erf {}Expand description
Vectorized error function (erf).
The implementation uses an approximation from Abramowitz and Stegun, see https://en.wikipedia.org/wiki/Error_function#Approximation_with_elementary_functions.
This has a maximum absolute error of 6.631017e-7 when comparing to
libm::erff as a source of truth.
Trait Implementations§
Source§impl SimdUnaryOp<f32> for Erf
impl SimdUnaryOp<f32> for Erf
Source§fn eval<I: Isa>(&self, isa: I, x: I::F32) -> I::F32
fn eval<I: Isa>(&self, isa: I, x: I::F32) -> I::F32
Evaluate the unary function on the elements in
x. Read moreSource§fn apply<I>(isa: I, x: <T as GetSimd>::Simd<I>) -> <T as GetSimd>::Simd<I>
fn apply<I>(isa: I, x: <T as GetSimd>::Simd<I>) -> <T as GetSimd>::Simd<I>
Evaluate the unary function on elements in
x. Read moreSource§fn map<'dst>(
&self,
input: &[T],
output: &'dst mut [MaybeUninit<T>],
) -> &'dst mut [T]
fn map<'dst>( &self, input: &[T], output: &'dst mut [MaybeUninit<T>], ) -> &'dst mut [T]
Apply this function to a slice. Read more
Source§fn map_mut(&self, input: &mut [T])
fn map_mut(&self, input: &mut [T])
Apply a vectorized unary function to a mutable slice. Read more
Source§fn scalar_eval(&self, x: T) -> T
fn scalar_eval(&self, x: T) -> T
Apply this operation to a single element.
Auto Trait Implementations§
impl Freeze for Erf
impl RefUnwindSafe for Erf
impl Send for Erf
impl Sync for Erf
impl Unpin for Erf
impl UnwindSafe for Erf
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
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