[][src]Struct simd::f32x4

#[repr(simd)]
pub struct f32x4(_, _, _, _);

A SIMD vector of 4 f32s.

Methods

impl f32x4
[src]

pub const fn new(x0: f32, x1: f32, x2: f32, x3: f32) -> f32x4
[src]

Create a new instance.

pub const fn splat(x: f32) -> f32x4
[src]

Create a new instance where every lane has value x.

pub fn eq(self, other: Self) -> bool32fx4
[src]

Compare for equality.

pub fn ne(self, other: Self) -> bool32fx4
[src]

Compare for equality.

pub fn lt(self, other: Self) -> bool32fx4
[src]

Compare for equality.

pub fn le(self, other: Self) -> bool32fx4
[src]

Compare for equality.

pub fn gt(self, other: Self) -> bool32fx4
[src]

Compare for equality.

pub fn ge(self, other: Self) -> bool32fx4
[src]

Compare for equality.

pub fn extract(self, idx: u32) -> f32
[src]

Extract the value of the idxth lane of self.

Panics

extract will panic if idx is out of bounds.

pub fn replace(self, idx: u32, elem: f32) -> Self
[src]

Return a new vector where the idxth lane is replaced by elem.

Panics

replace will panic if idx is out of bounds.

pub fn load(array: &[f32], idx: usize) -> Self
[src]

Load a new value from the idxth position of array.

This is equivalent to the following, but is possibly more efficient:

This example is not tested
Self::new(array[idx], array[idx + 1], ...)

Panics

load will panic if idx is out of bounds in array, or if array[idx..] is too short.

pub fn store(self, array: &mut [f32], idx: usize)
[src]

Store the elements of self to array, starting at the idxth position.

This is equivalent to the following, but is possibly more efficient:

This example is not tested
array[i] = self.extract(0);
array[i + 1] = self.extract(1);
// ...

Panics

store will panic if idx is out of bounds in array, or if array[idx...] is too short.

impl f32x4
[src]

pub fn sqrt(self) -> Self
[src]

Compute the square root of each lane.

pub fn approx_rsqrt(self) -> Self
[src]

Compute an approximation to the reciprocal of the square root of self, that is, f32::splat(1.0) / self.sqrt().

The accuracy of this approximation is platform dependent.

pub fn approx_reciprocal(self) -> Self
[src]

Compute an approximation to the reciprocal of self, that is, f32::splat(1.0) / self.

The accuracy of this approximation is platform dependent.

pub fn max(self, other: Self) -> Self
[src]

Compute the lane-wise maximum of self and other.

This is equivalent to the following, but is possibly more efficient:

This example is not tested
f32x4::new(self.extract(0).max(other.extract(0)),
           self.extract(1).max(other.extract(1)),
           ...)

pub fn min(self, other: Self) -> Self
[src]

Compute the lane-wise minimum of self and other.

This is equivalent to the following, but is possibly more efficient:

This example is not tested
f32x4::new(self.extract(0).min(other.extract(0)),
           self.extract(1).min(other.extract(1)),
           ...)

pub fn to_i32(self) -> i32x4
[src]

Convert each lane to a signed integer.

pub fn to_u32(self) -> u32x4
[src]

Convert each lane to an unsigned integer.

Trait Implementations

impl Simd for f32x4
[src]

type Bool = bool32fx4

The corresponding boolean vector type.

type Elem = f32

The element that this vector stores.

impl Sse2F32x4 for f32x4
[src]

impl Sse3F32x4 for f32x4
[src]

impl Sse41F32x4 for f32x4
[src]

impl AvxF32x4 for f32x4
[src]

impl Aarch64F32x4 for f32x4
[src]

impl Copy for f32x4
[src]

impl Clone for f32x4
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for f32x4
[src]

impl Sub<f32x4> for f32x4
[src]

type Output = Self

The resulting type after applying the - operator.

impl Add<f32x4> for f32x4
[src]

type Output = Self

The resulting type after applying the + operator.

impl Mul<f32x4> for f32x4
[src]

type Output = Self

The resulting type after applying the * operator.

impl Div<f32x4> for f32x4
[src]

type Output = Self

The resulting type after applying the / operator.

impl Neg for f32x4
[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

impl Send for f32x4

impl Sync for f32x4

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]