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
impl V3
sourcepub unsafe fn new_unchecked() -> Self
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.
sourcepub fn try_new() -> Option<Self>
pub fn try_new() -> Option<Self>
Returns a SIMD token type if the required CPU features for this type are
available, otherwise returns None
.
sourcepub fn is_available() -> bool
pub fn is_available() -> bool
Returns true
if the required CPU features for this type are available,
otherwise returns false
.
sourcepub fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output
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)]
sourcepub fn to_ref(self) -> &'static Self
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 MixedSimd<Complex<f32>, Complex<f32>, Complex<f32>, Complex<f32>> for V3
impl MixedSimd<Complex<f32>, Complex<f32>, Complex<f32>, Complex<f32>> for V3
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]
fn try_new() -> Option<Self>
fn mult(self, lhs: c32, rhs: c32) -> c32
fn mult_add(self, lhs: c32, rhs: c32, acc: c32) -> c32
fn from_lhs(self, lhs: c32) -> c32
fn from_rhs(self, rhs: c32) -> c32
fn from_dst(self, dst: c32) -> c32
fn into_dst(self, acc: c32) -> c32
fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN
fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN
fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN
fn simd_splat(self, lhs: c32) -> Self::AccN
fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN
fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN
fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output
fn add(self, lhs: c32, rhs: c32) -> c32
fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
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
impl MixedSimd<Complex<f64>, Complex<f64>, Complex<f64>, Complex<f64>> for V3
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]
fn try_new() -> Option<Self>
fn mult(self, lhs: c64, rhs: c64) -> c64
fn mult_add(self, lhs: c64, rhs: c64, acc: c64) -> c64
fn from_lhs(self, lhs: c64) -> c64
fn from_rhs(self, rhs: c64) -> c64
fn from_dst(self, dst: c64) -> c64
fn into_dst(self, acc: c64) -> c64
fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN
fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN
fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN
fn simd_splat(self, lhs: c64) -> Self::AccN
fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN
fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN
fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output
fn add(self, lhs: c64, rhs: c64) -> c64
fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
source§impl MixedSimd<f16, f16, f16, f32> for V3
impl MixedSimd<f16, f16, f16, f32> for V3
const SIMD_WIDTH: usize = 8usize
type LhsN = [f16; 8]
type RhsN = [f16; 8]
type DstN = [f16; 8]
type AccN = [f32; 8]
fn try_new() -> Option<Self>
fn mult(self, lhs: f32, rhs: f32) -> f32
fn mult_add(self, lhs: f32, rhs: f32, acc: f32) -> f32
fn from_lhs(self, lhs: f16) -> f32
fn from_rhs(self, rhs: f16) -> f32
fn from_dst(self, dst: f16) -> f32
fn into_dst(self, acc: f32) -> f16
fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN
fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN
fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN
fn simd_splat(self, lhs: f32) -> Self::AccN
fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN
fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN
fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output
fn add(self, lhs: f32, rhs: f32) -> f32
fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
source§impl MixedSimd<f32, f32, f32, f32> for V3
impl MixedSimd<f32, f32, f32, f32> for V3
const SIMD_WIDTH: usize = 8usize
type LhsN = [f32; 8]
type RhsN = [f32; 8]
type DstN = [f32; 8]
type AccN = [f32; 8]
fn try_new() -> Option<Self>
fn mult(self, lhs: f32, rhs: f32) -> f32
fn mult_add(self, lhs: f32, rhs: f32, acc: f32) -> f32
fn from_lhs(self, lhs: f32) -> f32
fn from_rhs(self, rhs: f32) -> f32
fn from_dst(self, dst: f32) -> f32
fn into_dst(self, acc: f32) -> f32
fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN
fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN
fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN
fn simd_splat(self, lhs: f32) -> Self::AccN
fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN
fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN
fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output
fn add(self, lhs: f32, rhs: f32) -> f32
fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
source§impl MixedSimd<f64, f64, f64, f64> for V3
impl MixedSimd<f64, f64, f64, f64> for V3
const SIMD_WIDTH: usize = 4usize
type LhsN = [f64; 4]
type RhsN = [f64; 4]
type DstN = [f64; 4]
type AccN = [f64; 4]
fn try_new() -> Option<Self>
fn mult(self, lhs: f64, rhs: f64) -> f64
fn mult_add(self, lhs: f64, rhs: f64, acc: f64) -> f64
fn from_lhs(self, lhs: f64) -> f64
fn from_rhs(self, rhs: f64) -> f64
fn from_dst(self, dst: f64) -> f64
fn into_dst(self, acc: f64) -> f64
fn simd_mult_add( self, lhs: Self::AccN, rhs: Self::AccN, acc: Self::AccN ) -> Self::AccN
fn simd_from_lhs(self, lhs: Self::LhsN) -> Self::AccN
fn simd_from_rhs(self, rhs: Self::RhsN) -> Self::AccN
fn simd_splat(self, lhs: f64) -> Self::AccN
fn simd_from_dst(self, dst: Self::DstN) -> Self::AccN
fn simd_into_dst(self, acc: Self::AccN) -> Self::DstN
fn vectorize<F: NullaryFnOnce>(self, f: F) -> F::Output
fn add(self, lhs: f64, rhs: f64) -> f64
fn simd_mul(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
fn simd_add(self, lhs: Self::AccN, rhs: Self::AccN) -> Self::AccN
impl Copy for V3
Auto Trait Implementations§
impl Freeze for V3
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> 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