[][src]Struct ultraviolet::f32x4

#[repr(C)]
pub struct f32x4 { /* fields omitted */ }

Four f32 values packed together.

Methods

impl f32x4[src]

Wide Methods

pub fn andnot(self, rhs: f32x4) -> f32x4[src]

Bitwise (!self) & rhs

pub fn is_nan(self) -> f32x4[src]

Lanewise "is the value a NaN value?"

pub fn is_ordinary(self) -> f32x4[src]

Lanewise "is the value a non-NaN value?"

pub fn merge(self, a: f32x4, b: f32x4) -> f32x4[src]

Use self (a boolish value) to merge a and b.

For each lane index, if the self lane is "true" then the a value will be used in the output, otherwise the b value will be used in the output.

If sse4.1 is enabled, then "true" only checks the sign bit. With less features enabled the entire bit pattern of the lane will matter. This is not normally a problem, because the comparison methods naturally return all 1s or all 0s anyway.

pub fn move_mask(self) -> i32[src]

use wide::f32x4;
let a = f32x4::new(1.0, 2.0, 3.0, 4.0);
let b = f32x4::from(2.5);
assert_eq!(a.cmp_lt(b).move_mask(), 0b0011);

pub fn cmp_eq(self, rhs: f32x4) -> f32x4[src]

Lanewise ==

pub fn cmp_ge(self, rhs: f32x4) -> f32x4[src]

Lanewise >=

pub fn cmp_gt(self, rhs: f32x4) -> f32x4[src]

Lanewise >

pub fn cmp_le(self, rhs: f32x4) -> f32x4[src]

Lanewise <=

pub fn cmp_lt(self, rhs: f32x4) -> f32x4[src]

Lanewise <

pub fn cmp_nan(self, rhs: f32x4) -> f32x4[src]

Lanewise "self.is_nan() | other.is_nan()"

pub fn cmp_ne(self, rhs: f32x4) -> f32x4[src]

Lanewise !=

pub fn cmp_nge(self, rhs: f32x4) -> f32x4[src]

Lanewise !(a >= b)

If you call this method it triggers Third Impact

pub fn cmp_ngt(self, rhs: f32x4) -> f32x4[src]

Lanewise !(a > b)

pub fn cmp_nle(self, rhs: f32x4) -> f32x4[src]

Lanewise !(a <= b)

pub fn cmp_nlt(self, rhs: f32x4) -> f32x4[src]

Lanewise !(a < b)

pub fn ceil(self) -> f32x4[src]

Lanewise ceiling (next larger whole number)

pub fn floor(self) -> f32x4[src]

Lanewise floor (next smaller whole number)

pub fn abs(self) -> f32x4[src]

Lanewise absolute value

pub fn cos(self) -> f32x4[src]

Lanewise cosine

pub fn round(self) -> f32x4[src]

Lanewise round to nearest whole number.

pub fn sin(self) -> f32x4[src]

Lanewise sine.

"We called it 'Sin'."

pub fn mul_add(self, b: f32x4, c: f32x4) -> f32x4[src]

Performs a "fused multiply-add", (self * b) + c

This is only different from a normal mul and then add if the fma target_feature is enabled during the build. This is not on by default, you must enable it yourself. To be clear, this is not a cargo feature, this is a CPU feature. Read the guide for info on how to enable CPU features if you haven't done that before.

pub fn negated_mul_add(self, b: f32x4, c: f32x4) -> f32x4[src]

Negated "mul_add", c - (self * b).

Fused if fma feature is enabled, see (mul_add)f32x4::mul_add.

pub fn recip(self) -> f32x4[src]

Lanewise reciprocal, 1.0/lane

pub fn max(self, b: f32x4) -> f32x4[src]

Lanewise maximum

pub fn min(self, b: f32x4) -> f32x4[src]

Lanewise minimum

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

Lanewise round and get i32x4 output

pub fn is_finite(self) -> f32x4[src]

If it's some finite value.

  • True for normal, denormal, and zero.
  • False for +/- INF, NaN
  • boolish

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

Cast directly to i32x4 (no change in bit pattern).

pub fn copysign(self, b: f32x4) -> f32x4[src]

Copy the sign of b onto the value of self.

pub fn clamp(self, min: f32x4, max: f32x4) -> f32x4[src]

Lanewise clamp to a per-lane min and max.

pub fn signum(self) -> f32x4[src]

Lanewise sign-number (-1.0 if < 0.0, otherwise 1.0)

pub fn tan(self) -> f32x4[src]

Lanewise tangent

pub fn sin_cos(self) -> (f32x4, f32x4)[src]

Sine and Cosine as a single operation.

pub fn to_degrees(self) -> f32x4[src]

Lanewise radians -> degrees.

pub fn to_radians(self) -> f32x4[src]

Lanewise degrees -> radians.

pub fn fract(self) -> f32x4[src]

Lanewise fractional part.

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

Lanewise sqrt

impl f32x4[src]

pub const EPSILON: f32x4[src]

Machine epsilon value for f32.

pub const INFINITY: f32x4[src]

Positive Infinity (∞).

pub const MAX: f32x4[src]

Largest finite f32 value.

pub const MIN: f32x4[src]

Smallest finite f32 value.

pub const MIN_POSITIVE: f32x4[src]

Smallest positive normal f32 value.

pub const NAN: f32x4[src]

Not a Number (NaN).

Reminder: This is one possible NaN value, but there are many NaN bit patterns within the f32 space.

pub const NEG_INFINITY: f32x4[src]

Negative infinity (-∞).

pub const E: f32x4[src]

Euler's number (e)

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 FRAC_1_SQRT_2: f32x4[src]

1/sqrt(2)

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 LN_2: f32x4[src]

ln(2)

pub const LN_10: f32x4[src]

ln(10)

pub const LOG2_E: f32x4[src]

log2(e)

pub const LOG10_E: f32x4[src]

log10(e)

pub const PI: f32x4[src]

Archimedes' constant (π)

pub const SQRT_2: f32x4[src]

sqrt(2)

pub const ALL_BITS_ACTIVE: f32x4[src]

All bits active.

pub const ALL_EXCEPT_SIGN: f32x4[src]

All bits active.

pub const ZERO: f32x4[src]

0.0

pub const NEGATIVE_ZERO: f32x4[src]

-0.0

pub const HALF: f32x4[src]

0.5

pub const ONE: f32x4[src]

1.0

pub const NEGATIVE_ONE: f32x4[src]

1.0

pub const TWO_PI: f32x4[src]

2.0 * π, the number of radians in a circle.

impl f32x4[src]

pub fn new(a: f32, b: f32, c: f32, d: f32) -> f32x4[src]

Makes a new f32x4.

impl f32x4[src]

pub fn trunc(self) -> f32x4[src]

Truncate the fractional part.

pub fn classify(self) -> [FpCategory; 4][src]

Trait Implementations

impl LowerHex for f32x4[src]

impl RemAssign<f32x4> for f32x4[src]

impl<'_> RemAssign<&'_ f32x4> for f32x4[src]

impl Product<f32x4> for f32x4[src]

impl<'a> Product<&'a f32x4> for f32x4[src]

impl<'_> SubAssign<&'_ f32x4> for f32x4[src]

impl SubAssign<f32x4> for f32x4[src]

impl Copy for f32x4[src]

impl Clone for f32x4[src]

impl Pod for f32x4[src]

impl Div<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the / operator.

impl<'_> Div<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the / operator.

impl IndexMut<usize> for f32x4[src]

impl<'_> BitAnd<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the & operator.

impl BitAnd<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the & operator.

impl<'_> Add<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the + operator.

impl Add<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the + operator.

impl AsMut<[f32; 4]> for f32x4[src]

impl Neg for f32x4[src]

type Output = f32x4

The resulting type after applying the - operator.

impl<'_> Neg for &'_ f32x4[src]

type Output = f32x4

The resulting type after applying the - operator.

impl<'_> BitOrAssign<&'_ f32x4> for f32x4[src]

impl BitOrAssign<f32x4> for f32x4[src]

impl Debug for f32x4[src]

impl<'_> Mul<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the * operator.

impl Mul<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the * operator.

impl AsRef<[f32; 4]> for f32x4[src]

impl LowerExp for f32x4[src]

impl BitXor<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the ^ operator.

impl<'_> BitXor<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the ^ operator.

impl Sub<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the - operator.

impl<'_> Sub<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the - operator.

impl Display for f32x4[src]

impl<'_> MulAssign<&'_ f32x4> for f32x4[src]

impl MulAssign<f32x4> for f32x4[src]

impl Zeroable for f32x4[src]

impl Binary for f32x4[src]

impl Not for f32x4[src]

type Output = f32x4

The resulting type after applying the ! operator.

fn not(self) -> f32x4[src]

Bitwise negation

impl BitXorAssign<f32x4> for f32x4[src]

impl<'_> BitXorAssign<&'_ f32x4> for f32x4[src]

impl Sum<f32x4> for f32x4[src]

impl<'a> Sum<&'a f32x4> for f32x4[src]

impl Default for f32x4[src]

impl AddAssign<f32x4> for f32x4[src]

impl<'_> AddAssign<&'_ f32x4> for f32x4[src]

impl From<[u16; 4]> for f32x4[src]

impl From<(f32, f32, f32, f32)> for f32x4[src]

impl From<[u8; 4]> for f32x4[src]

impl From<f32> for f32x4[src]

impl From<[f32; 4]> for f32x4[src]

impl From<[i16; 4]> for f32x4[src]

impl From<[i8; 4]> for f32x4[src]

impl BitAndAssign<f32x4> for f32x4[src]

impl<'_> BitAndAssign<&'_ f32x4> for f32x4[src]

impl<'_> Rem<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the % operator.

impl Rem<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the % operator.

impl Index<usize> for f32x4[src]

type Output = f32

The returned type after indexing.

impl UpperExp for f32x4[src]

impl BitOr<f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the | operator.

impl<'_> BitOr<&'_ f32x4> for f32x4[src]

type Output = f32x4

The resulting type after applying the | operator.

impl DivAssign<f32x4> for f32x4[src]

impl<'_> DivAssign<&'_ f32x4> for f32x4[src]

impl Octal for f32x4[src]

impl UpperHex for f32x4[src]

impl Lerp<f32x4> for Wec2[src]

impl Lerp<f32x4> for Wec3[src]

impl Lerp<f32x4> for Wec4[src]

impl Lerp<f32x4> for WBivec2[src]

impl Lerp<f32x4> for WBivec3[src]

impl Lerp<f32x4> for WRotor2[src]

impl Lerp<f32x4> for WRotor3[src]

impl Div<f32x4> for WBivec2[src]

type Output = WBivec2

The resulting type after applying the / operator.

impl Div<f32x4> for WBivec3[src]

type Output = WBivec3

The resulting type after applying the / operator.

impl Div<f32x4> for Wec2[src]

type Output = Wec2

The resulting type after applying the / operator.

impl Div<f32x4> for Wec3[src]

type Output = Wec3

The resulting type after applying the / operator.

impl Div<f32x4> for Wec4[src]

type Output = Wec4

The resulting type after applying the / operator.

impl Mul<WBivec2> for f32x4[src]

type Output = WBivec2

The resulting type after applying the * operator.

impl Mul<f32x4> for WBivec2[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<WBivec3> for f32x4[src]

type Output = WBivec3

The resulting type after applying the * operator.

impl Mul<f32x4> for WBivec3[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f32x4> for Wat4[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f32x4> for WRotor2[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<WRotor2> for f32x4[src]

type Output = WRotor2

The resulting type after applying the * operator.

impl Mul<f32x4> for WRotor3[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<WRotor3> for f32x4[src]

type Output = WRotor3

The resulting type after applying the * operator.

impl Mul<Wec2> for f32x4[src]

type Output = Wec2

The resulting type after applying the * operator.

impl Mul<f32x4> for Wec2[src]

type Output = Wec2

The resulting type after applying the * operator.

impl Mul<Wec3> for f32x4[src]

type Output = Wec3

The resulting type after applying the * operator.

impl Mul<f32x4> for Wec3[src]

type Output = Wec3

The resulting type after applying the * operator.

impl Mul<Wec4> for f32x4[src]

type Output = Wec4

The resulting type after applying the * operator.

impl Mul<f32x4> for Wec4[src]

type Output = Wec4

The resulting type after applying the * operator.

impl MulAssign<f32x4> for WBivec2[src]

impl MulAssign<f32x4> for WBivec3[src]

impl MulAssign<f32x4> for WRotor2[src]

impl MulAssign<f32x4> for WRotor3[src]

impl MulAssign<f32x4> for Wec2[src]

impl MulAssign<f32x4> for Wec3[src]

impl MulAssign<f32x4> for Wec4[src]

impl DivAssign<f32x4> for WBivec2[src]

impl DivAssign<f32x4> for WBivec3[src]

impl DivAssign<f32x4> for Wec2[src]

impl DivAssign<f32x4> for Wec3[src]

impl DivAssign<f32x4> for Wec4[src]

Auto Trait Implementations

impl Send for f32x4

impl Sync for f32x4

impl Unpin for f32x4

impl UnwindSafe for f32x4

impl RefUnwindSafe for f32x4

Blanket Implementations

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = !

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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