Struct simd::f32x4 [−][src]
#[repr(simd)]pub struct f32x4(_, _, _, _);
A SIMD vector of 4 f32
s.
Methods
impl f32x4
[src]
impl f32x4
pub const fn new(x0: f32, x1: f32, x2: f32, x3: f32) -> f32x4
[src]
pub const fn new(x0: f32, x1: f32, x2: f32, x3: f32) -> f32x4
Create a new instance.
pub const fn splat(x: f32) -> f32x4
[src]
pub const fn splat(x: f32) -> f32x4
Create a new instance where every lane has value x
.
pub fn eq(self, other: Self) -> bool32fx4
[src]
pub fn eq(self, other: Self) -> bool32fx4
Compare for equality.
pub fn ne(self, other: Self) -> bool32fx4
[src]
pub fn ne(self, other: Self) -> bool32fx4
Compare for equality.
pub fn lt(self, other: Self) -> bool32fx4
[src]
pub fn lt(self, other: Self) -> bool32fx4
Compare for equality.
pub fn le(self, other: Self) -> bool32fx4
[src]
pub fn le(self, other: Self) -> bool32fx4
Compare for equality.
pub fn gt(self, other: Self) -> bool32fx4
[src]
pub fn gt(self, other: Self) -> bool32fx4
Compare for equality.
pub fn ge(self, other: Self) -> bool32fx4
[src]
pub fn ge(self, other: Self) -> bool32fx4
Compare for equality.
pub fn extract(self, idx: u32) -> f32
[src]
pub fn extract(self, idx: u32) -> f32
pub fn replace(self, idx: u32, elem: f32) -> Self
[src]
pub fn replace(self, idx: u32, elem: f32) -> Self
Return a new vector where the idx
th lane is replaced
by elem
.
Panics
replace
will panic if idx
is out of bounds.
pub fn load(array: &[f32], idx: usize) -> Self
[src]
pub fn load(array: &[f32], idx: usize) -> Self
Load a new value from the idx
th position of array
.
This is equivalent to the following, but is possibly more efficient:
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]
pub fn store(self, array: &mut [f32], idx: usize)
Store the elements of self
to array
, starting at
the idx
th position.
This is equivalent to the following, but is possibly more efficient:
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]
impl f32x4
pub fn sqrt(self) -> Self
[src]
pub fn sqrt(self) -> Self
Compute the square root of each lane.
pub fn approx_rsqrt(self) -> Self
[src]
pub fn approx_rsqrt(self) -> Self
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]
pub fn approx_reciprocal(self) -> Self
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]
pub fn max(self, other: Self) -> Self
Compute the lane-wise maximum of self
and other
.
This is equivalent to the following, but is possibly more efficient:
f32x4::new(self.extract(0).max(other.extract(0)), self.extract(1).max(other.extract(1)), ...)
pub fn min(self, other: Self) -> Self
[src]
pub fn min(self, other: Self) -> Self
Compute the lane-wise minimum of self
and other
.
This is equivalent to the following, but is possibly more efficient:
f32x4::new(self.extract(0).min(other.extract(0)), self.extract(1).min(other.extract(1)), ...)
pub fn to_i32(self) -> i32x4
[src]
pub fn to_i32(self) -> i32x4
Convert each lane to a signed integer.
pub fn to_u32(self) -> u32x4
[src]
pub fn to_u32(self) -> u32x4
Convert each lane to an unsigned integer.
Trait Implementations
impl Neg for f32x4
[src]
impl Neg for f32x4
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self
[src]
fn neg(self) -> Self
Performs the unary -
operation.
impl Add for f32x4
[src]
impl Add for f32x4
type Output = Self
The resulting type after applying the +
operator.
fn add(self, x: Self) -> Self
[src]
fn add(self, x: Self) -> Self
Performs the +
operation.
impl Sub for f32x4
[src]
impl Sub for f32x4
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, x: Self) -> Self
[src]
fn sub(self, x: Self) -> Self
Performs the -
operation.
impl Mul for f32x4
[src]
impl Mul for f32x4
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, x: Self) -> Self
[src]
fn mul(self, x: Self) -> Self
Performs the *
operation.
impl Div for f32x4
[src]
impl Div for f32x4
type Output = Self
The resulting type after applying the /
operator.
fn div(self, x: Self) -> Self
[src]
fn div(self, x: Self) -> Self
Performs the /
operation.
impl Sse2F32x4 for f32x4
[src]
impl Sse2F32x4 for f32x4
impl Sse3F32x4 for f32x4
[src]
impl Sse3F32x4 for f32x4
fn addsub(self, other: Self) -> Self
[src]
fn addsub(self, other: Self) -> Self
fn hadd(self, other: Self) -> Self
[src]
fn hadd(self, other: Self) -> Self
fn hsub(self, other: Self) -> Self
[src]
fn hsub(self, other: Self) -> Self
impl Sse41F32x4 for f32x4
[src]
impl Sse41F32x4 for f32x4
impl AvxF32x4 for f32x4
[src]
impl AvxF32x4 for f32x4
fn permutevar(self, other: i32x4) -> f32x4
[src]
fn permutevar(self, other: i32x4) -> f32x4
impl Aarch64F32x4 for f32x4
[src]
impl Aarch64F32x4 for f32x4
impl Debug for f32x4
[src]
impl Debug for f32x4
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for f32x4
[src]
impl Copy for f32x4
impl Simd for f32x4
[src]
impl Simd for f32x4
type Bool = bool32fx4
The corresponding boolean vector type.
type Elem = f32
The element that this vector stores.
impl Clone for f32x4
[src]
impl Clone for f32x4