Skip to main content

Avx2Kernel

Struct Avx2Kernel 

Source
pub struct Avx2Kernel;
Expand description

AVX2/FMA-accelerated kernel.

Guarded at construction time by a runtime has_avx2() check; never instantiated on non-x86_64 targets.

Trait Implementations§

Source§

impl SimdKernel for Avx2Kernel

Available on x86-64 only.
Source§

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])

Element-wise subtraction: out[i] = a[i] - b[i].
Source§

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])

Element-wise division: out[i] = a[i] / b[i].
Source§

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])

Element-wise square root: out[i] = sqrt(a[i]).
Source§

fn batch_neg(&self, a: &[f64], out: &mut [f64])

Element-wise negation: out[i] = -a[i].
Source§

fn batch_abs(&self, a: &[f64], out: &mut [f64])

Element-wise absolute value: out[i] = |a[i]|.
Source§

fn name(&self) -> &'static str

Short name for logging/introspection.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,