pub struct SIMDOperations;
Expand description
SIMD operations for neural network computations (fallback implementation)
Implementations§
Source§impl SIMDOperations
impl SIMDOperations
Sourcepub fn simd_relu_f32_inplace(_input: &mut ArrayViewMut<'_, f32, IxDyn>)
pub fn simd_relu_f32_inplace(_input: &mut ArrayViewMut<'_, f32, IxDyn>)
Apply ReLU activation in-place using SIMD operations
Sourcepub fn simd_relu_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
pub fn simd_relu_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
Apply ReLU activation using SIMD operations
Sourcepub fn simd_sigmoid_f32_inplace(_input: &mut ArrayViewMut<'_, f32, IxDyn>)
pub fn simd_sigmoid_f32_inplace(_input: &mut ArrayViewMut<'_, f32, IxDyn>)
Apply sigmoid activation in-place using SIMD operations
Sourcepub fn simd_sigmoid_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
pub fn simd_sigmoid_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
Apply sigmoid activation using SIMD operations
Sourcepub fn simd_tanh_f32_inplace(_input: &mut ArrayViewMut<'_, f32, IxDyn>)
pub fn simd_tanh_f32_inplace(_input: &mut ArrayViewMut<'_, f32, IxDyn>)
Apply tanh activation in-place using SIMD operations
Sourcepub fn simd_tanh_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
pub fn simd_tanh_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
Apply tanh activation using SIMD operations
Sourcepub fn simd_gelu_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
pub fn simd_gelu_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
Apply GELU activation using SIMD operations
Sourcepub fn simd_swish_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
pub fn simd_swish_f32(_input: &ArrayView<'_, f32, IxDyn>) -> ArrayD<f32>
Apply Swish activation using SIMD operations
Sourcepub fn simd_softmax_f32(
_input: &ArrayD<f32>,
_axis: Option<usize>,
) -> Result<ArrayD<f32>>
pub fn simd_softmax_f32( _input: &ArrayD<f32>, _axis: Option<usize>, ) -> Result<ArrayD<f32>>
Apply softmax activation using SIMD operations
Sourcepub fn simd_cross_entropy_loss_f32(
_predictions: &ArrayView<'_, f32, IxDyn>,
_targets: &ArrayView<'_, f32, IxDyn>,
_epsilon: f32,
) -> Result<f32>
pub fn simd_cross_entropy_loss_f32( _predictions: &ArrayView<'_, f32, IxDyn>, _targets: &ArrayView<'_, f32, IxDyn>, _epsilon: f32, ) -> Result<f32>
Compute cross-entropy loss using SIMD operations
Sourcepub fn simd_matmul_f32(
_a: &ArrayView<'_, f32, IxDyn>,
_b: &ArrayView<'_, f32, IxDyn>,
) -> Result<ArrayD<f32>>
pub fn simd_matmul_f32( _a: &ArrayView<'_, f32, IxDyn>, _b: &ArrayView<'_, f32, IxDyn>, ) -> Result<ArrayD<f32>>
Perform matrix multiplication using SIMD operations
Sourcepub fn simd_add_f32(
_a: &ArrayView<'_, f32, IxDyn>,
_b: &ArrayView<'_, f32, IxDyn>,
) -> Result<ArrayD<f32>>
pub fn simd_add_f32( _a: &ArrayView<'_, f32, IxDyn>, _b: &ArrayView<'_, f32, IxDyn>, ) -> Result<ArrayD<f32>>
Perform element-wise addition using SIMD operations
Auto Trait Implementations§
impl Freeze for SIMDOperations
impl RefUnwindSafe for SIMDOperations
impl Send for SIMDOperations
impl Sync for SIMDOperations
impl Unpin for SIMDOperations
impl UnwindSafe for SIMDOperations
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