Struct gemm_common::simd::V3

source ·
pub struct V3 {
    pub sse: Sse,
    pub sse2: Sse2,
    pub fxsr: Fxsr,
    pub sse3: Sse3,
    pub ssse3: Ssse3,
    pub sse4_1: Sse4_1,
    pub sse4_2: Sse4_2,
    pub avx: Avx,
    pub avx2: Avx2,
    pub fma: Fma,
    pub f16c: F16c,
}

Fields§

§sse: Sse§sse2: Sse2§fxsr: Fxsr§sse3: Sse3§ssse3: Ssse3§sse4_1: Sse4_1§sse4_2: Sse4_2§avx: Avx§avx2: Avx2§fma: Fma§f16c: F16c

Implementations§

source§

impl V3

source

pub unsafe fn new_unchecked() -> Self

Returns a SIMD token type without checking if the required CPU features for this type are available.

§Safety
  • the required CPU features must be available.
source

pub fn try_new() -> Option<Self>

Returns a SIMD token type if the required CPU features for this type are available, otherwise returns None.

source

pub fn is_available() -> bool

Returns true if the required CPU features for this type are available, otherwise returns false.

source

pub fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output

Vectorizes the given function as if the CPU features for this type were applied to it.

§Note

For the vectorization to work properly, the given function must be inlined. Consider marking it as #[inline(always)]

source

pub fn to_ref(self) -> &'static Self

Takes a proof of the existence of this SIMD token (self), and returns a persistent reference to it.

Trait Implementations§

source§

impl Clone for V3

source§

fn clone(&self) -> V3

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for V3

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl MixedSimd<Complex<f32>, Complex<f32>, Complex<f32>, Complex<f32>> for V3

source§

const SIMD_WIDTH: usize = 4usize

§

type LhsN = [Complex<f32>; 4]

§

type RhsN = [Complex<f32>; 4]

§

type DstN = [Complex<f32>; 4]

§

type AccN = [Complex<f32>; 4]

source§

fn try_new() -> Option<Self>

source§

fn mult(self, lhs: c32, rhs: c32) -> c32

source§

fn mult_add(self, lhs: c32, rhs: c32, acc: c32) -> c32

source§

fn from_lhs(self, lhs: c32) -> c32

source§

fn from_rhs(self, rhs: c32) -> c32

source§

fn from_dst(self, dst: c32) -> c32

source§

fn into_dst(self, acc: c32) -> c32

source§

fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN

source§

fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN

source§

fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN

source§

fn simd_splat(self, lhs: c32) -> Self::AccN

source§

fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN

source§

fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN

source§

fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output

source§

fn add(self, lhs: c32, rhs: c32) -> c32

source§

fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

impl MixedSimd<Complex<f64>, Complex<f64>, Complex<f64>, Complex<f64>> for V3

source§

const SIMD_WIDTH: usize = 2usize

§

type LhsN = [Complex<f64>; 2]

§

type RhsN = [Complex<f64>; 2]

§

type DstN = [Complex<f64>; 2]

§

type AccN = [Complex<f64>; 2]

source§

fn try_new() -> Option<Self>

source§

fn mult(self, lhs: c64, rhs: c64) -> c64

source§

fn mult_add(self, lhs: c64, rhs: c64, acc: c64) -> c64

source§

fn from_lhs(self, lhs: c64) -> c64

source§

fn from_rhs(self, rhs: c64) -> c64

source§

fn from_dst(self, dst: c64) -> c64

source§

fn into_dst(self, acc: c64) -> c64

source§

fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN

source§

fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN

source§

fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN

source§

fn simd_splat(self, lhs: c64) -> Self::AccN

source§

fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN

source§

fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN

source§

fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output

source§

fn add(self, lhs: c64, rhs: c64) -> c64

source§

fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

impl MixedSimd<f16, f16, f16, f32> for V3

source§

const SIMD_WIDTH: usize = 8usize

§

type LhsN = [f16; 8]

§

type RhsN = [f16; 8]

§

type DstN = [f16; 8]

§

type AccN = [f32; 8]

source§

fn try_new() -> Option<Self>

source§

fn mult(self, lhs: f32, rhs: f32) -> f32

source§

fn mult_add(self, lhs: f32, rhs: f32, acc: f32) -> f32

source§

fn from_lhs(self, lhs: f16) -> f32

source§

fn from_rhs(self, rhs: f16) -> f32

source§

fn from_dst(self, dst: f16) -> f32

source§

fn into_dst(self, acc: f32) -> f16

source§

fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN

source§

fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN

source§

fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN

source§

fn simd_splat(self, lhs: f32) -> Self::AccN

source§

fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN

source§

fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN

source§

fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output

source§

fn add(self, lhs: f32, rhs: f32) -> f32

source§

fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

impl MixedSimd<f32, f32, f32, f32> for V3

source§

const SIMD_WIDTH: usize = 8usize

§

type LhsN = [f32; 8]

§

type RhsN = [f32; 8]

§

type DstN = [f32; 8]

§

type AccN = [f32; 8]

source§

fn try_new() -> Option<Self>

source§

fn mult(self, lhs: f32, rhs: f32) -> f32

source§

fn mult_add(self, lhs: f32, rhs: f32, acc: f32) -> f32

source§

fn from_lhs(self, lhs: f32) -> f32

source§

fn from_rhs(self, rhs: f32) -> f32

source§

fn from_dst(self, dst: f32) -> f32

source§

fn into_dst(self, acc: f32) -> f32

source§

fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN

source§

fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN

source§

fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN

source§

fn simd_splat(self, lhs: f32) -> Self::AccN

source§

fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN

source§

fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN

source§

fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output

source§

fn add(self, lhs: f32, rhs: f32) -> f32

source§

fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

impl MixedSimd<f64, f64, f64, f64> for V3

source§

const SIMD_WIDTH: usize = 4usize

§

type LhsN = [f64; 4]

§

type RhsN = [f64; 4]

§

type DstN = [f64; 4]

§

type AccN = [f64; 4]

source§

fn try_new() -> Option<Self>

source§

fn mult(self, lhs: f64, rhs: f64) -> f64

source§

fn mult_add(self, lhs: f64, rhs: f64, acc: f64) -> f64

source§

fn from_lhs(self, lhs: f64) -> f64

source§

fn from_rhs(self, rhs: f64) -> f64

source§

fn from_dst(self, dst: f64) -> f64

source§

fn into_dst(self, acc: f64) -> f64

source§

fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN

source§

fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN

source§

fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN

source§

fn simd_splat(self, lhs: f64) -> Self::AccN

source§

fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN

source§

fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN

source§

fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output

source§

fn add(self, lhs: f64, rhs: f64) -> f64

source§

fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN

source§

impl Simd for V3

source§

unsafe fn vectorize<F: NullaryFnOnce>(f: F) -> F::Output

source§

impl Copy for V3

Auto Trait Implementations§

§

impl RefUnwindSafe for V3

§

impl Send for V3

§

impl Sync for V3

§

impl Unpin for V3

§

impl UnwindSafe for V3

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> 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.