pub struct Cos(/* private fields */);Expand description
Computes the cosine function.
The implementation has a maximum absolute error of 4.17e-7 (3.5 * f32::EPSILON).
Implementations§
Trait Implementations§
Source§impl SimdUnaryOp<f32> for Cos
impl SimdUnaryOp<f32> for Cos
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 Cos
impl RefUnwindSafe for Cos
impl Send for Cos
impl Sync for Cos
impl Unpin for Cos
impl UnwindSafe for Cos
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