pub struct ScalarKernel;Expand description
Pure-scalar fallback kernel. Works on every platform.
Trait Implementations§
Source§impl SimdKernel for ScalarKernel
impl SimdKernel for ScalarKernel
Source§fn batch_add(&self, a: &[f64], b: &[f64], out: &mut [f64])
fn batch_add(&self, a: &[f64], b: &[f64], out: &mut [f64])
Element-wise addition:
out[i] = a[i] + b[i].Source§fn batch_sub(&self, a: &[f64], b: &[f64], out: &mut [f64])
fn batch_sub(&self, a: &[f64], b: &[f64], out: &mut [f64])
Element-wise subtraction:
out[i] = a[i] - b[i].Source§fn batch_mul(&self, a: &[f64], b: &[f64], out: &mut [f64])
fn batch_mul(&self, a: &[f64], b: &[f64], out: &mut [f64])
Element-wise multiplication:
out[i] = a[i] * b[i].Source§fn batch_div(&self, a: &[f64], b: &[f64], out: &mut [f64])
fn batch_div(&self, a: &[f64], b: &[f64], out: &mut [f64])
Element-wise division:
out[i] = a[i] / b[i].Source§fn batch_fma(&self, a: &[f64], b: &[f64], c: &[f64], out: &mut [f64])
fn batch_fma(&self, a: &[f64], b: &[f64], c: &[f64], out: &mut [f64])
Fused multiply-add:
out[i] = a[i] * b[i] + c[i].Source§fn batch_sqrt(&self, a: &[f64], out: &mut [f64])
fn batch_sqrt(&self, a: &[f64], out: &mut [f64])
Element-wise square root:
out[i] = sqrt(a[i]).Auto Trait Implementations§
impl Freeze for ScalarKernel
impl RefUnwindSafe for ScalarKernel
impl Send for ScalarKernel
impl Sync for ScalarKernel
impl Unpin for ScalarKernel
impl UnsafeUnpin for ScalarKernel
impl UnwindSafe for ScalarKernel
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