pub struct f64x8 { /* private fields */ }Implementations§
Source§impl f64x8
impl f64x8
pub const ONE: f64x8
pub const ZERO: f64x8
pub const HALF: f64x8
pub const EPSILON: f64x8
pub const MIN: f64x8
pub const MIN_POSITIVE: f64x8
pub const MAX: f64x8
pub const NAN: f64x8
pub const INFINITY: f64x8
pub const NEG_INFINITY: f64x8
pub const E: f64x8
pub const FRAC_1_PI: f64x8
pub const FRAC_2_PI: f64x8
pub const FRAC_2_SQRT_PI: f64x8
pub const FRAC_1_SQRT_2: f64x8
pub const FRAC_PI_2: f64x8
pub const FRAC_PI_3: f64x8
pub const FRAC_PI_4: f64x8
pub const FRAC_PI_6: f64x8
pub const FRAC_PI_8: f64x8
pub const LN_2: f64x8
pub const LN_10: f64x8
pub const LOG2_E: f64x8
pub const LOG10_E: f64x8
pub const LOG10_2: f64x8
pub const LOG2_10: f64x8
pub const PI: f64x8
pub const SQRT_2: f64x8
pub const TAU: f64x8
pub const fn new(array: [f64; 8]) -> Self
Sourcepub fn simd_eq<Rhs>(self, other: Rhs) -> <Self as CmpEq<Rhs>>::Outputwhere
Self: CmpEq<Rhs>,
pub fn simd_eq<Rhs>(self, other: Rhs) -> <Self as CmpEq<Rhs>>::Outputwhere
Self: CmpEq<Rhs>,
Test if each element is equal to the corresponding element in other.
Sourcepub fn simd_ne<Rhs>(self, other: Rhs) -> <Self as CmpNe<Rhs>>::Outputwhere
Self: CmpNe<Rhs>,
pub fn simd_ne<Rhs>(self, other: Rhs) -> <Self as CmpNe<Rhs>>::Outputwhere
Self: CmpNe<Rhs>,
Test if each element is not equal to the corresponding element in
other.
Sourcepub fn simd_lt<Rhs>(self, other: Rhs) -> <Self as CmpLt<Rhs>>::Outputwhere
Self: CmpLt<Rhs>,
pub fn simd_lt<Rhs>(self, other: Rhs) -> <Self as CmpLt<Rhs>>::Outputwhere
Self: CmpLt<Rhs>,
Test if each element is less than the corresponding element in other.
Sourcepub fn simd_gt<Rhs>(self, other: Rhs) -> <Self as CmpGt<Rhs>>::Outputwhere
Self: CmpGt<Rhs>,
pub fn simd_gt<Rhs>(self, other: Rhs) -> <Self as CmpGt<Rhs>>::Outputwhere
Self: CmpGt<Rhs>,
Test if each element is greater than the corresponding element in
other.
Sourcepub fn simd_le<Rhs>(self, other: Rhs) -> <Self as CmpLe<Rhs>>::Outputwhere
Self: CmpLe<Rhs>,
pub fn simd_le<Rhs>(self, other: Rhs) -> <Self as CmpLe<Rhs>>::Outputwhere
Self: CmpLe<Rhs>,
Test if each element is less than or equal to the corresponding element
in other.
Sourcepub fn simd_ge<Rhs>(self, other: Rhs) -> <Self as CmpGe<Rhs>>::Outputwhere
Self: CmpGe<Rhs>,
pub fn simd_ge<Rhs>(self, other: Rhs) -> <Self as CmpGe<Rhs>>::Outputwhere
Self: CmpGe<Rhs>,
Test if each element is greater than or equal to the corresponding
element in other.
pub fn blend(self, t: Self, f: Self) -> Self
pub fn abs(self) -> Self
pub fn signum(self) -> Self
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn fast_max(self, rhs: Self) -> Self
pub fn max(self, rhs: Self) -> Self
pub fn fast_min(self, rhs: Self) -> Self
pub fn min(self, rhs: Self) -> Self
Sourcepub fn clamp(self, min: Self, max: Self) -> Self
pub fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval unless it is NaN.
If self is NaN, or min is NaN, or max is NaN, the result is NaN.
If min > max, the result is min, since fast_max(min) dominates.
Sourcepub fn fast_clamp(self, min: Self, max: Self) -> Self
pub fn fast_clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval unless it is NaN.
Avoids NaN detection; same speed as the old clamp prior to IEEE 754-2019
compliance. Does not specify any
behavior if NaNs are involved, and if min > max the result is
unspecified.
pub fn midpoint(self, other: Self) -> Self
pub fn is_nan(self) -> Self
pub fn is_finite(self) -> Self
pub fn is_inf(self) -> Self
pub fn round(self) -> Self
pub fn fast_round_int(self) -> i64x8
pub fn round_int(self) -> i64x8
pub fn trunc(self) -> Self
Sourcepub fn fast_trunc_int(self) -> i64x8
pub fn fast_trunc_int(self) -> i64x8
Truncates each lane into an integer. This is a faster implementation than
trunc_int, but it doesn’t handle out of range values or NaNs. For those
values you get implementation defined behavior.
Sourcepub fn trunc_int(self) -> i64x8
pub fn trunc_int(self) -> i64x8
Truncates each lane into an integer. This saturates out of range values
and turns NaNs into 0. Use fast_trunc_int for a faster implementation
that doesn’t handle out of range values or NaNs.
pub fn fract(self) -> Self
Sourcepub fn mul_add(self, m: Self, a: Self) -> Self
pub fn mul_add(self, m: Self, a: Self) -> Self
Performs a multiply-add operation: self * m + a
When hardware FMA support is available, this computes the result with a single rounding operation. Without FMA support, it falls back to separate multiply and add operations with two roundings.
§Platform-specific behavior
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfmadd(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Uses(self * m) + a(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
§Examples
let a = f64x8::from([1.0; 8]);
let b = f64x8::from([2.0; 8]);
let c = f64x8::from([10.0; 8]);
let result = a.mul_add(b, c);
let expected = f64x8::from([12.0; 8]);
assert_eq!(result, expected);Sourcepub fn mul_sub(self, m: Self, s: Self) -> Self
pub fn mul_sub(self, m: Self, s: Self) -> Self
Performs a multiply-subtract operation: self * m - s
When hardware FMA support is available, this computes the result with a single rounding operation. Without FMA support, it falls back to separate multiply and subtract operations with two roundings.
§Platform-specific behavior
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfmsub(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Uses(self * m) - s(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
§Examples
let a = f64x8::from([10.0; 8]);
let b = f64x8::from([3.0; 8]);
let c = f64x8::from([5.0; 8]);
let result = a.mul_sub(b, c);
let expected = f64x8::from([25.0; 8]);
assert_eq!(result, expected);Sourcepub fn mul_neg_add(self, m: Self, a: Self) -> Self
pub fn mul_neg_add(self, m: Self, a: Self) -> Self
Performs a negative multiply-add operation: a - (self * m)
When hardware FMA support is available, this computes the result with a single rounding operation. Without FMA support, it falls back to separate operations with two roundings.
§Platform-specific behavior
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfnmadd(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Usesa - (self * m)(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
§Examples
let a = f64x8::from([4.0; 8]);
let b = f64x8::from([2.0; 8]);
let c = f64x8::from([10.0; 8]);
let result = a.mul_neg_add(b, c);
let expected = f64x8::from([2.0; 8]);
assert_eq!(result, expected);Sourcepub fn mul_neg_sub(self, m: Self, s: Self) -> Self
pub fn mul_neg_sub(self, m: Self, s: Self) -> Self
Performs a negative multiply-subtract operation: -(self * m) - s
When hardware FMA support is available, this computes the result with a single rounding operation. Without FMA support, it falls back to separate operations with two roundings.
§Platform-specific behavior
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfnmsub(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Uses-(self * m) - s(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
§Examples
let a = f64x8::from([4.0; 8]);
let b = f64x8::from([2.0; 8]);
let c = f64x8::from([1.0; 8]);
let result = a.mul_neg_sub(b, c);
let expected = f64x8::from([-9.0; 8]);
assert_eq!(result, expected);pub fn div_euclid(self, rhs: Self) -> Self
pub fn rem_euclid(self, rhs: Self) -> Self
pub fn flip_signs(self, signs: Self) -> Self
pub fn copysign(self, sign: Self) -> Self
pub fn asin_acos(self) -> (Self, Self)
pub fn acos(self) -> Self
pub fn asin(self) -> Self
pub fn atan(self) -> Self
pub fn atan2(self, x: Self) -> Self
pub fn sin_cos(self) -> (Self, Self)
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn to_degrees(self) -> Self
pub fn to_radians(self) -> Self
pub fn recip(self) -> Self
pub fn recip_sqrt(self) -> Self
pub fn sqrt(self) -> Self
pub fn to_bitmask(self) -> u32
pub fn any(self) -> bool
pub fn all(self) -> bool
pub fn none(self) -> bool
Sourcepub fn exp_m1(self) -> Self
pub fn exp_m1(self) -> Self
Calculate e^self - 1 for each lane.
Accurate even for very small values.
Sourcepub fn is_sign_positive(self) -> Self
pub fn is_sign_positive(self) -> Self
Returns true for each element if it has a positive sign, including +0.0,
NaNs with positive sign bit and positive infinity.
Sourcepub fn is_sign_negative(self) -> Self
pub fn is_sign_negative(self) -> Self
Returns true for each element if it has a negative sign, including -0.0,
NaNs with negative sign bit and negative infinity.
pub fn reduce_add(self) -> f64
pub fn reduce_mul(self) -> f64
Sourcepub fn ln_1p(self) -> Self
pub fn ln_1p(self) -> Self
Calculate ln(1 + self) for each lane.
Accurate even for very small values.
pub fn log2(self) -> Self
pub fn log10(self) -> Self
pub fn pow_f64x8(self, y: Self) -> Self
pub fn powf(self, y: f64) -> Self
Sourcepub fn transpose(data: [f64x8; 8]) -> [f64x8; 8]
pub fn transpose(data: [f64x8; 8]) -> [f64x8; 8]
Transpose matrix of 8x8 f64 matrix. Currently not accelerated.
pub fn to_array(self) -> [f64; 8]
pub fn as_array(&self) -> &[f64; 8]
pub fn as_mut_array(&mut self) -> &mut [f64; 8]
pub fn from_i32x8(v: i32x8) -> Self
Trait Implementations§
Source§impl AddAssign for f64x8
impl AddAssign for f64x8
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl AddAssign<&f64x8> for f64x8
impl AddAssign<&f64x8> for f64x8
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+= operation. Read moreSource§impl BitAndAssign for f64x8
impl BitAndAssign for f64x8
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitAndAssign<&f64x8> for f64x8
impl BitAndAssign<&f64x8> for f64x8
Source§fn bitand_assign(&mut self, rhs: &Self)
fn bitand_assign(&mut self, rhs: &Self)
&= operation. Read moreSource§impl BitOrAssign for f64x8
impl BitOrAssign for f64x8
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitOrAssign<&f64x8> for f64x8
impl BitOrAssign<&f64x8> for f64x8
Source§fn bitor_assign(&mut self, rhs: &Self)
fn bitor_assign(&mut self, rhs: &Self)
|= operation. Read moreSource§impl BitXorAssign for f64x8
impl BitXorAssign for f64x8
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl BitXorAssign<&f64x8> for f64x8
impl BitXorAssign<&f64x8> for f64x8
Source§fn bitxor_assign(&mut self, rhs: &Self)
fn bitxor_assign(&mut self, rhs: &Self)
^= operation. Read moreimpl Copy for f64x8
Source§impl DivAssign for f64x8
impl DivAssign for f64x8
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
/= operation. Read moreSource§impl DivAssign<&f64x8> for f64x8
impl DivAssign<&f64x8> for f64x8
Source§fn div_assign(&mut self, rhs: &Self)
fn div_assign(&mut self, rhs: &Self)
/= operation. Read moreSource§impl MulAssign for f64x8
impl MulAssign for f64x8
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl MulAssign<&f64x8> for f64x8
impl MulAssign<&f64x8> for f64x8
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
*= operation. Read moreimpl Pod for f64x8
impl StructuralPartialEq for f64x8
Source§impl SubAssign for f64x8
impl SubAssign for f64x8
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreSource§impl SubAssign<&f64x8> for f64x8
impl SubAssign<&f64x8> for f64x8
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
-= operation. Read moreAuto Trait Implementations§
impl Freeze for f64x8
impl RefUnwindSafe for f64x8
impl Send for f64x8
impl Sync for f64x8
impl Unpin for f64x8
impl UnsafeUnpin for f64x8
impl UnwindSafe for f64x8
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.