[−][src]Type Definition packed_simd_2::f32x4
type f32x4 = Simd<[f32; 4]>;
A 128-bit vector with 4 f32
lanes.
Implementations
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]
#[must_use =
"replace does not modify the original value - \
it returns a new vector with the value at `index` \
replaced by `new_value`d"]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()
.
#[must_use =
"replace_unchecked does not modify the original value - \
it returns a new vector with the value at `index` \
replaced by `new_value`d"]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
.
Safety
If index >= Self::lanes()
the behavior is undefined.
impl f32x4
[src]
pub fn min(self, x: Self) -> Self
[src]
Minimum of two vectors.
Returns a new vector containing the minimum value of each of the input vector lanes.
pub fn max(self, x: Self) -> Self
[src]
Maximum of two vectors.
Returns a new vector containing the maximum value of each of the input vector lanes.
impl f32x4
[src]
pub fn sum(self) -> f32
[src]
Horizontal sum of the vector elements.
The intrinsic performs a tree-reduction of the vector elements. That is, for an 8 element vector:
((x0 + x1) + (x2 + x3)) + ((x4 + x5) + (x6 + x7))
If one of the vector element is NaN
the reduction returns
NaN
. The resulting NaN
is not required to be equal to any
of the NaN
s in the vector.
pub fn product(self) -> f32
[src]
Horizontal product of the vector elements.
The intrinsic performs a tree-reduction of the vector elements. That is, for an 8 element vector:
((x0 * x1) * (x2 * x3)) * ((x4 * x5) * (x6 * x7))
If one of the vector element is NaN
the reduction returns
NaN
. The resulting NaN
is not required to be equal to any
of the NaN
s in the vector.
impl f32x4
[src]
pub fn max_element(self) -> f32
[src]
Largest vector element value.
pub fn min_element(self) -> f32
[src]
Smallest vector element value.
impl f32x4
[src]
pub fn from_slice_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 from_slice_unaligned(slice: &[f32]) -> Self
[src]
pub unsafe fn from_slice_aligned_unchecked(slice: &[f32]) -> Self
[src]
Instantiates a new vector with the values of the slice
.
Safety
If slice.len() < Self::lanes()
or &slice[0]
is not aligned
to an align_of::<Self>()
boundary, the behavior is undefined.
pub unsafe fn from_slice_unaligned_unchecked(slice: &[f32]) -> Self
[src]
Instantiates a new vector with the values of the slice
.
Safety
If slice.len() < Self::lanes()
the behavior is undefined.
impl f32x4
[src]
pub fn write_to_slice_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 write_to_slice_unaligned(self, slice: &mut [f32])
[src]
pub unsafe fn write_to_slice_aligned_unchecked(self, slice: &mut [f32])
[src]
Writes the values of the vector to the slice
.
Safety
If slice.len() < Self::lanes()
or &slice[0]
is not
aligned to an align_of::<Self>()
boundary, the behavior is
undefined.
pub unsafe fn write_to_slice_unaligned_unchecked(self, slice: &mut [f32])
[src]
Writes the values of the vector to the slice
.
Safety
If slice.len() < Self::lanes()
the behavior is undefined.
impl f32x4
[src]
pub fn shuffle1_dyn<I>(self, indices: I) -> Self where
Self: Shuffle1Dyn<Indices = I>,
[src]
Self: Shuffle1Dyn<Indices = I>,
Shuffle vector elements according to indices
.
impl f32x4
[src]
pub const EPSILON: f32x4
[src]
Machine epsilon value.
pub const MIN: f32x4
[src]
Smallest finite value.
pub const MIN_POSITIVE: f32x4
[src]
Smallest positive normal value.
pub const MAX: f32x4
[src]
Largest finite value.
pub const NAN: f32x4
[src]
Not a Number (NaN).
pub const INFINITY: f32x4
[src]
Infinity (∞).
pub const NEG_INFINITY: f32x4
[src]
Negative infinity (-∞).
pub const PI: f32x4
[src]
Archimedes' constant (π)
pub const FRAC_PI_2: f32x4
[src]
π/2
pub const FRAC_PI_3: f32x4
[src]
π/3
pub const FRAC_PI_4: f32x4
[src]
π/4
pub const FRAC_PI_6: f32x4
[src]
π/6
pub const FRAC_PI_8: f32x4
[src]
π/8
pub const FRAC_1_PI: f32x4
[src]
1/π
pub const FRAC_2_PI: f32x4
[src]
2/π
pub const FRAC_2_SQRT_PI: f32x4
[src]
2/sqrt(π)
pub const SQRT_2: f32x4
[src]
sqrt(2)
pub const FRAC_1_SQRT_2: f32x4
[src]
1/sqrt(2)
pub const E: f32x4
[src]
Euler's number (e)
pub const LOG2_E: f32x4
[src]
log2(e)
pub const LOG10_E: f32x4
[src]
log10(e)
pub const LN_2: f32x4
[src]
ln(2)
pub const LN_10: f32x4
[src]
ln(10)
impl f32x4
[src]
pub fn is_nan(self) -> m32x4
[src]
pub fn is_infinite(self) -> m32x4
[src]
pub fn is_finite(self) -> m32x4
[src]
impl f32x4
[src]
impl f32x4
[src]
impl f32x4
[src]
impl f32x4
[src]
impl f32x4
[src]
impl f32x4
[src]
pub fn mul_adde(self, y: Self, z: Self) -> Self
[src]
Fused multiply add estimate: ~= self * y + z
While fused multiply-add (fma
) has infinite precision,
mul_adde
has at worst the same precision of a multiply followed by an add.
This might be more efficient on architectures that do not have an fma
instruction.
impl f32x4
[src]
impl f32x4
[src]
pub fn recpre(self) -> Self
[src]
Reciprocal estimate: ~= 1. / self
.
FIXME: The precision of the estimate is currently unspecified.
impl f32x4
[src]
pub fn rsqrte(self) -> Self
[src]
Reciprocal square-root estimate: ~= 1. / self.sqrt()
.
FIXME: The precision of the estimate is currently unspecified.
impl f32x4
[src]
pub fn sin(self) -> Self
[src]
Sine.
pub fn sin_pi(self) -> Self
[src]
Sine of self * PI
.
pub fn sin_cos_pi(self) -> (Self, Self)
[src]
Sine and cosine of self * PI
.
impl f32x4
[src]
impl f32x4
[src]
pub fn sqrte(self) -> Self
[src]
Square-root estimate.
FIXME: The precision of the estimate is currently unspecified.
impl f32x4
[src]
impl f32x4
[src]
pub fn eq(self, other: Self) -> m32x4
[src]
Lane-wise equality comparison.
pub fn ne(self, other: Self) -> m32x4
[src]
Lane-wise inequality comparison.
pub fn lt(self, other: Self) -> m32x4
[src]
Lane-wise less-than comparison.
pub fn le(self, other: Self) -> m32x4
[src]
Lane-wise less-than-or-equals comparison.
pub fn gt(self, other: Self) -> m32x4
[src]
Lane-wise greater-than comparison.
pub fn ge(self, other: Self) -> m32x4
[src]
Lane-wise greater-than-or-equals comparison.
Trait Implementations
impl Add<Simd<[f32; 4]>> for f32x4
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Add<f32> for f32x4
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: f32) -> Self
[src]
impl AddAssign<Simd<[f32; 4]>> for f32x4
[src]
fn add_assign(&mut self, other: Self)
[src]
impl AddAssign<f32> for f32x4
[src]
fn add_assign(&mut self, other: f32)
[src]
impl Debug for f32x4
[src]
impl Default for f32x4
[src]
impl Div<Simd<[f32; 4]>> for f32x4
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl Div<f32> for f32x4
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: f32) -> Self
[src]
impl DivAssign<Simd<[f32; 4]>> for f32x4
[src]
fn div_assign(&mut self, other: Self)
[src]
impl DivAssign<f32> for f32x4
[src]
fn div_assign(&mut self, other: f32)
[src]
impl From<[f32; 4]> for f32x4
[src]
impl From<Simd<[i16; 4]>> for f32x4
[src]
impl From<Simd<[i8; 4]>> for f32x4
[src]
impl From<Simd<[u16; 4]>> for f32x4
[src]
impl From<Simd<[u8; 4]>> for f32x4
[src]
impl FromCast<Simd<[f64; 4]>> for f32x4
[src]
impl FromCast<Simd<[i128; 4]>> for f32x4
[src]
impl FromCast<Simd<[i16; 4]>> for f32x4
[src]
impl FromCast<Simd<[i32; 4]>> for f32x4
[src]
impl FromCast<Simd<[i64; 4]>> for f32x4
[src]
impl FromCast<Simd<[i8; 4]>> for f32x4
[src]
impl FromCast<Simd<[isize; 4]>> for f32x4
[src]
impl FromCast<Simd<[m128; 4]>> for f32x4
[src]
impl FromCast<Simd<[m16; 4]>> for f32x4
[src]
impl FromCast<Simd<[m32; 4]>> for f32x4
[src]
impl FromCast<Simd<[m64; 4]>> for f32x4
[src]
impl FromCast<Simd<[m8; 4]>> for f32x4
[src]
impl FromCast<Simd<[msize; 4]>> for f32x4
[src]
impl FromCast<Simd<[u128; 4]>> for f32x4
[src]
impl FromCast<Simd<[u16; 4]>> for f32x4
[src]
impl FromCast<Simd<[u32; 4]>> for f32x4
[src]
impl FromCast<Simd<[u64; 4]>> for f32x4
[src]
impl FromCast<Simd<[u8; 4]>> for f32x4
[src]
impl FromCast<Simd<[usize; 4]>> for f32x4
[src]
impl Mul<Simd<[f32; 4]>> for f32x4
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl Mul<f32> for f32x4
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: f32) -> Self
[src]
impl MulAssign<Simd<[f32; 4]>> for f32x4
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl MulAssign<f32> for f32x4
[src]
fn mul_assign(&mut self, other: f32)
[src]
impl Neg for f32x4
[src]
impl PartialEq<Simd<[f32; 4]>> for f32x4
[src]
impl<'a> Product<&'a Simd<[f32; 4]>> for f32x4
[src]
impl Product<Simd<[f32; 4]>> for f32x4
[src]
impl Rem<Simd<[f32; 4]>> for f32x4
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
[src]
impl Rem<f32> for f32x4
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: f32) -> Self
[src]
impl RemAssign<Simd<[f32; 4]>> for f32x4
[src]
fn rem_assign(&mut self, other: Self)
[src]
impl RemAssign<f32> for f32x4
[src]
fn rem_assign(&mut self, other: f32)
[src]
impl Simd for f32x4
[src]
type Element = f32
Element type of the SIMD vector
const LANES: usize
[src]
type LanesType = [u32; 4]
The type: [u32; Self::N]
.
impl Sub<Simd<[f32; 4]>> for f32x4
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl Sub<f32> for f32x4
[src]
type Output = Self
The resulting type after applying the -
operator.