Struct llml_simd::float::single::f32x4

source ·
pub struct f32x4(/* private fields */);

Implementations§

source§

impl f32x4

source

pub unsafe fn load(ptr: *const f32) -> Self

Loads values from the pointer into the SIMD vector

source

pub fn abs(self) -> Self

Returns a vector with the absolute values of the original vector

source

pub fn sqrt(self) -> Self

Returns a vector with the absolute values of the original vector

source

pub fn vmin(self, rhs: Self) -> Self

Returns a vector with the smallest/minimum value of each lane

source

pub fn vmax(self, rhs: Self) -> Self

Returns a vector with the biggest/maximum value of each lane

source

pub fn min(self) -> f32

Gets the smallest/minimum value of the vector

source

pub fn max(self) -> f32

Gets the biggest/maximum value of the vector

source

pub fn sum(self) -> f32

Sums up all the values inside the vector

source

pub fn prod(self) -> f32

Multiplies all the values inside the vector

source

pub fn mul_add(self, rhs: Self, add: Self) -> Self

Fused multiply-add. Computes (self * a) + b with only one rounding error.

§Compatibility

The fused multiply-add operation is only available on arm/aarch64 and x86/x86-64 with the target feature fma. For the rest of targets, a regular multiplication and addition are performed

source

pub fn zip(self, rhs: Self) -> Self

Interleaves elements of both vectors into one

§

impl f32x4

pub fn new(a: [f32; 4]) -> Self

pub fn filled_with(a: f32) -> f32x4

Creates a new vector with all lanes filled with the provided value

pub fn into_array(self) -> [f32; 4]

Returns an array with the vector’s values

§

impl f32x4

pub unsafe fn get_unchecked(&self, idx: usize) -> &f32

Returns a reference to the value in the specified lane without checking if it’s within range

pub unsafe fn get_mut_unchecked(&mut self, idx: usize) -> &mut f32

Returns a mutable reference to the value in the specified lane without checking if it’s within range

pub unsafe fn index_unchecked(&self, idx: usize) -> &f32

👎Deprecated since 0.1.4: use get_unchecked instead

Returns a reference to the value in the specified lane without checking if it’s within range

pub unsafe fn index_mut_unchecked(&mut self, idx: usize) -> &mut f32

👎Deprecated since 0.1.4: use get_mut_unchecked instead

Returns a mutable reference to the value in the specified lane without checking if it’s within range

Trait Implementations§

source§

impl Add<f32> for f32x4

§

type Output = f32x4

The resulting type after applying the + operator.
source§

fn add(self, rhs: f32) -> Self::Output

Performs the + operation. Read more
source§

impl Add<f32x4> for f32

§

type Output = f32x4

The resulting type after applying the + operator.
source§

fn add(self, rhs: f32x4) -> Self::Output

Performs the + operation. Read more
source§

impl Add for f32x4

§

type Output = f32x4

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<f32> for f32x4

source§

fn add_assign(&mut self, rhs: f32)

Performs the += operation. Read more
source§

impl AddAssign for f32x4

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
§

impl Clone for f32x4

§

fn clone(&self) -> Self

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
§

impl Debug for f32x4

§

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

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

impl Div<f32> for f32x4

§

type Output = f32x4

The resulting type after applying the / operator.
source§

fn div(self, rhs: f32) -> Self::Output

Performs the / operation. Read more
source§

impl Div<f32x4> for f32

§

type Output = f32x4

The resulting type after applying the / operator.
source§

fn div(self, rhs: f32x4) -> Self::Output

Performs the / operation. Read more
source§

impl Div for f32x4

§

type Output = f32x4

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl DivAssign<f32> for f32x4

source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
source§

impl DivAssign for f32x4

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
§

impl From<[f32; 4]> for f32x4

§

fn from(x: [f32; 4]) -> Self

Converts to this type from the input type.
source§

impl From<f32> for f32x4

source§

fn from(x: f32) -> Self

Converts to this type from the input type.
§

impl Index<usize> for f32x4

§

type Output = f32

The returned type after indexing.
§

fn index(&self, idx: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
§

impl IndexMut<usize> for f32x4

§

fn index_mut(&mut self, idx: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
§

impl Into<[f32; 4]> for f32x4

§

fn into(self) -> [f32; 4]

Converts this type into the (usually inferred) input type.
source§

impl Mul<f32> for f32x4

§

type Output = f32x4

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<f32x4> for f32

§

type Output = f32x4

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f32x4) -> Self::Output

Performs the * operation. Read more
source§

impl Mul for f32x4

§

type Output = f32x4

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl MulAssign<f32> for f32x4

source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
source§

impl MulAssign for f32x4

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Neg for f32x4

§

type Output = f32x4

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl PartialEq for f32x4

source§

fn eq(&self, rhs: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<f32> for f32x4

§

type Output = f32x4

The resulting type after applying the - operator.
source§

fn sub(self, rhs: f32) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<f32x4> for f32

§

type Output = f32x4

The resulting type after applying the - operator.
source§

fn sub(self, rhs: f32x4) -> Self::Output

Performs the - operation. Read more
source§

impl Sub for f32x4

§

type Output = f32x4

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign<f32> for f32x4

source§

fn sub_assign(&mut self, rhs: f32)

Performs the -= operation. Read more
source§

impl SubAssign for f32x4

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl Copy for f32x4

Auto Trait Implementations§

§

impl RefUnwindSafe for f32x4

§

impl Send for f32x4

§

impl Sync for f32x4

§

impl Unpin for f32x4

§

impl UnwindSafe for f32x4

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.

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.