Struct core::simd::f32x4
[−]
[src]
#[repr(simd)]pub struct f32x4(_, _, _, _);
A 128-bit vector with 4 f32 lanes.
Methods
impl f32x4[src]
pub const fn new(x0: f32, x1: f32, x2: f32, x3: f32) -> Self[src]
Creates a new instance with each vector elements initialized with the provided values.
pub const fn lanes() -> usize[src]
Returns the number of vector lanes.
pub const fn splat(value: f32) -> Self[src]
Constructs a new instance with each element initialized to
value.
pub fn extract(self, index: usize) -> f32[src]
pub unsafe fn extract_unchecked(self, index: usize) -> f32[src]
Extracts the value at index.
If index >= Self::lanes() the behavior is undefined.
pub fn replace(self, index: usize, new_value: f32) -> Self[src]
Returns a new vector where the value at index is replaced by new_value.
Panics
If index >= Self::lanes().
pub unsafe fn replace_unchecked(self, index: usize, new_value: f32) -> Self[src]
Returns a new vector where the value at index is replaced by new_value.
Panics
If index >= Self::lanes().
impl f32x4[src]
pub fn store_aligned(self, slice: &mut [f32])[src]
Writes the values of the vector to the slice.
Panics
If slice.len() < Self::lanes() or &slice[0] is not
aligned to an align_of::<Self>() boundary.
pub fn store_unaligned(self, slice: &mut [f32])[src]
pub unsafe fn store_aligned_unchecked(self, slice: &mut [f32])[src]
Writes the values of the vector to the slice.
Precondition
If slice.len() < Self::lanes() or &slice[0] is not
aligned to an align_of::<Self>() boundary, the behavior is
undefined.
pub unsafe fn store_unaligned_unchecked(self, slice: &mut [f32])[src]
Writes the values of the vector to the slice.
Precondition
If slice.len() < Self::lanes() the behavior is undefined.
pub fn load_aligned(slice: &[f32]) -> Self[src]
Instantiates a new vector with the values of the slice.
Panics
If slice.len() < Self::lanes() or &slice[0] is not aligned
to an align_of::<Self>() boundary.
pub fn load_unaligned(slice: &[f32]) -> Self[src]
pub unsafe fn load_aligned_unchecked(slice: &[f32]) -> Self[src]
Instantiates a new vector with the values of the slice.
Precondition
If slice.len() < Self::lanes() or &slice[0] is not aligned
to an align_of::<Self>() boundary, the behavior is undefined.
pub unsafe fn load_unaligned_unchecked(slice: &[f32]) -> Self[src]
Instantiates a new vector with the values of the slice.
Precondition
If slice.len() < Self::lanes() the behavior is undefined.
impl f32x4[src]
pub fn eq(self, other: f32x4) -> b8x4[src]
Lane-wise equality comparison.
pub fn ne(self, other: f32x4) -> b8x4[src]
Lane-wise inequality comparison.
pub fn lt(self, other: f32x4) -> b8x4[src]
Lane-wise less-than comparison.
pub fn le(self, other: f32x4) -> b8x4[src]
Lane-wise less-than-or-equals comparison.
pub fn gt(self, other: f32x4) -> b8x4[src]
Lane-wise greater-than comparison.
pub fn ge(self, other: f32x4) -> b8x4[src]
Lane-wise greater-than-or-equals comparison.
impl f32x4[src]
pub fn sum(self) -> f32[src]
Lane-wise addition of the vector elements.
pub fn product(self) -> f32[src]
Lane-wise multiplication of the vector elements.
impl f32x4[src]
pub fn max(self) -> f32[src]
Largest vector value.
pub fn min(self) -> f32[src]
Smallest vector value.
Trait Implementations
impl From<f32x4> for i8x4[src]
impl From<f32x4> for u8x4[src]
impl From<f32x4> for u16x4[src]
impl From<f32x4> for i16x4[src]
impl Copy for f32x4[src]
impl Debug for f32x4[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialOrd for f32x4[src]
fn partial_cmp(&self, __arg_0: &f32x4) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &f32x4) -> bool[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &f32x4) -> bool[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &f32x4) -> bool[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &f32x4) -> bool[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Clone for f32x4[src]
fn clone(&self) -> Self[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Add for f32x4[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, other: Self) -> Self[src]
Performs the + operation.
impl Sub for f32x4[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, other: Self) -> Self[src]
Performs the - operation.
impl Mul for f32x4[src]
type Output = Self
The resulting type after applying the * operator.
fn mul(self, other: Self) -> Self[src]
Performs the * operation.
impl Div for f32x4[src]
type Output = Self
The resulting type after applying the / operator.
fn div(self, other: Self) -> Self[src]
Performs the / operation.
impl Rem for f32x4[src]
type Output = Self
The resulting type after applying the % operator.
fn rem(self, other: Self) -> Self[src]
Performs the % operation.
impl AddAssign for f32x4[src]
fn add_assign(&mut self, other: Self)[src]
Performs the += operation.
impl SubAssign for f32x4[src]
fn sub_assign(&mut self, other: Self)[src]
Performs the -= operation.
impl MulAssign for f32x4[src]
fn mul_assign(&mut self, other: Self)[src]
Performs the *= operation.
impl DivAssign for f32x4[src]
fn div_assign(&mut self, other: Self)[src]
Performs the /= operation.
impl RemAssign for f32x4[src]
fn rem_assign(&mut self, other: Self)[src]
Performs the %= operation.
impl Neg for f32x4[src]
type Output = Self
The resulting type after applying the - operator.
fn neg(self) -> Self[src]
Performs the unary - operation.
impl PartialEq<f32x4> for f32x4[src]
fn eq(&self, other: &Self) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Self) -> bool[src]
This method tests for !=.