pub struct Silu {}
Expand description
Vectorized Sigmoid Linear Unit (SiLU) function.
This computes x * sigmoid(x)
for all lanes in x
.
Trait Implementations§
Source§impl SimdUnaryOp<f32> for Silu
impl SimdUnaryOp<f32> for Silu
Source§fn eval<I: Isa, S: Simd<Elem = f32, Isa = I>>(&self, isa: I, x: S) -> S
fn eval<I: Isa, S: Simd<Elem = f32, Isa = I>>(&self, isa: I, x: S) -> S
Evaluate the unary function on the elements in
x
. Read moreSource§fn map(&self, input: &[T], output: &mut [MaybeUninit<T>])
fn map(&self, input: &[T], output: &mut [MaybeUninit<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 Silu
impl RefUnwindSafe for Silu
impl Send for Silu
impl Sync for Silu
impl Unpin for Silu
impl UnwindSafe for Silu
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