Skip to main content

ScalarFallback

Struct ScalarFallback 

Source
pub struct ScalarFallback;
Expand description

Scalar fallback SIMD implementation.

Implementations§

Source§

impl ScalarFallback

Source

pub const fn new() -> Self

Create a new scalar fallback instance.

Trait Implementations§

Source§

impl Clone for ScalarFallback

Source§

fn clone(&self) -> ScalarFallback

Returns a duplicate 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 ScalarFallback

Source§

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

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

impl Default for ScalarFallback

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl SimdOps for ScalarFallback

Source§

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

Get the name of this SIMD implementation.
Source§

fn is_available(&self) -> bool

Check if this implementation is available on the current CPU.
Source§

fn add_i16x8(&self, a: I16x8, b: I16x8) -> I16x8

Element-wise addition of two i16x8 vectors.
Source§

fn sub_i16x8(&self, a: I16x8, b: I16x8) -> I16x8

Element-wise subtraction of two i16x8 vectors.
Source§

fn mul_i16x8(&self, a: I16x8, b: I16x8) -> I16x8

Element-wise multiplication of two i16x8 vectors.
Source§

fn add_i32x4(&self, a: I32x4, b: I32x4) -> I32x4

Element-wise addition of two i32x4 vectors.
Source§

fn sub_i32x4(&self, a: I32x4, b: I32x4) -> I32x4

Element-wise subtraction of two i32x4 vectors.
Source§

fn min_i16x8(&self, a: I16x8, b: I16x8) -> I16x8

Element-wise minimum of two i16x8 vectors.
Source§

fn max_i16x8(&self, a: I16x8, b: I16x8) -> I16x8

Element-wise maximum of two i16x8 vectors.
Source§

fn clamp_i16x8(&self, v: I16x8, min: i16, max: i16) -> I16x8

Element-wise clamp of i16x8 vector.
Source§

fn min_u8x16(&self, a: U8x16, b: U8x16) -> U8x16

Element-wise minimum of two u8x16 vectors.
Source§

fn max_u8x16(&self, a: U8x16, b: U8x16) -> U8x16

Element-wise maximum of two u8x16 vectors.
Source§

fn clamp_u8x16(&self, v: U8x16, min: u8, max: u8) -> U8x16

Element-wise clamp of u8x16 vector.
Source§

fn horizontal_sum_i16x8(&self, v: I16x8) -> i32

Horizontal sum of all elements in an i16x8 vector.
Source§

fn horizontal_sum_i32x4(&self, v: I32x4) -> i32

Horizontal sum of all elements in an i32x4 vector.
Source§

fn sad_u8x16(&self, a: U8x16, b: U8x16) -> u32

Sum of absolute differences between two u8x16 vectors. Read more
Source§

fn sad_8(&self, a: &[u8], b: &[u8]) -> u32

Sum of absolute differences for 8 bytes.
Source§

fn sad_16(&self, a: &[u8], b: &[u8]) -> u32

Sum of absolute differences for 16 bytes.
Source§

fn widen_low_u8_to_i16(&self, v: U8x16) -> I16x8

Widen u8x16 low half to i16x8.
Source§

fn widen_high_u8_to_i16(&self, v: U8x16) -> I16x8

Widen u8x16 high half to i16x8.
Source§

fn narrow_i32x4_to_i16x8(&self, low: I32x4, high: I32x4) -> I16x8

Narrow two i32x4 to i16x8 with saturation.
Source§

fn madd_i16x8(&self, a: I16x8, b: I16x8, c: I16x8) -> I16x8

Multiply and add: a * b + c for i16x8.
Source§

fn pmaddwd(&self, a: I16x8, b: I16x8) -> I32x4

Multiply pairs and add adjacent results (pmaddwd equivalent). Read more
Source§

fn shr_i16x8(&self, v: I16x8, shift: u32) -> I16x8

Arithmetic right shift of i16x8 by immediate.
Source§

fn shl_i16x8(&self, v: I16x8, shift: u32) -> I16x8

Logical left shift of i16x8 by immediate.
Source§

fn shr_i32x4(&self, v: I32x4, shift: u32) -> I32x4

Arithmetic right shift of i32x4 by immediate.
Source§

fn shl_i32x4(&self, v: I32x4, shift: u32) -> I32x4

Logical left shift of i32x4 by immediate.
Source§

fn avg_u8x16(&self, a: U8x16, b: U8x16) -> U8x16

Average of two u8x16 vectors (rounding up).
Source§

impl SimdOpsExt for ScalarFallback

Source§

fn load4_u8_to_i16x8(&self, src: &[u8]) -> I16x8

Load 4 bytes from memory and zero-extend to i16x8.
Source§

fn load8_u8_to_i16x8(&self, src: &[u8]) -> I16x8

Load 8 bytes from memory and zero-extend to i16x8.
Source§

fn store4_i16x8_as_u8(&self, v: I16x8, dst: &mut [u8])

Store lower 4 elements of i16x8 to memory as saturated u8.
Source§

fn store8_i16x8_as_u8(&self, v: I16x8, dst: &mut [u8])

Store lower 8 elements of i16x8 to memory as saturated u8.
Source§

fn transpose_4x4_i16(&self, rows: &[I16x8; 4]) -> [I16x8; 4]

Transpose 4x4 block of i16 values. Read more
Source§

fn transpose_8x8_i16(&self, rows: &[I16x8; 8]) -> [I16x8; 8]

Transpose 8x8 block of i16 values.
Source§

fn butterfly_i16x8(&self, a: I16x8, b: I16x8) -> (I16x8, I16x8)

DCT butterfly: (a + b, a - b).
Source§

fn butterfly_i32x4(&self, a: I32x4, b: I32x4) -> (I32x4, I32x4)

DCT butterfly for i32x4.
Source§

impl Copy for ScalarFallback

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

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,

Source§

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

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.