Type Definition packed_simd::f64x4

source ·
pub type f64x4 = Simd<[f64; 4]>;
Expand description

A 256-bit vector with 4 f64 lanes.

Implementations§

source§

impl f64x4

source

pub const fn new(x0: f64, x1: f64, x2: f64, x3: f64) -> Self

Creates a new instance with each vector elements initialized with the provided values.

source

pub const fn lanes() -> usize

Returns the number of vector lanes.

source

pub const fn splat(value: f64) -> Self

Constructs a new instance with each element initialized to value.

source

pub fn extract(self, index: usize) -> f64

Extracts the value at index.

Panics

If index >= Self::lanes().

source

pub unsafe fn extract_unchecked(self, index: usize) -> f64

Extracts the value at index.

Safety

If index >= Self::lanes() the behavior is undefined.

source

pub fn replace(self, index: usize, new_value: f64) -> Self

Returns a new vector where the value at index is replaced by new_value.

Panics

If index >= Self::lanes().

source

pub unsafe fn replace_unchecked(self, index: usize, new_value: f64) -> Self

Returns a new vector where the value at index is replaced by new_value.

Safety

If index >= Self::lanes() the behavior is undefined.

source§

impl f64x4

source

pub fn min(self, x: Self) -> Self

Minimum of two vectors.

Returns a new vector containing the minimum value of each of the input vector lanes.

source

pub fn max(self, x: Self) -> Self

Maximum of two vectors.

Returns a new vector containing the maximum value of each of the input vector lanes.

source§

impl f64x4

source

pub fn sum(self) -> f64

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 NaNs in the vector.

source

pub fn product(self) -> f64

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 NaNs in the vector.

source§

impl f64x4

source

pub fn max_element(self) -> f64

Largest vector element value.

source

pub fn min_element(self) -> f64

Smallest vector element value.

source§

impl f64x4

source

pub fn from_slice_aligned(slice: &[f64]) -> Self

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.

source

pub fn from_slice_unaligned(slice: &[f64]) -> Self

Instantiates a new vector with the values of the slice.

Panics

If slice.len() < Self::lanes().

source

pub unsafe fn from_slice_aligned_unchecked(slice: &[f64]) -> Self

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.

source

pub unsafe fn from_slice_unaligned_unchecked(slice: &[f64]) -> Self

Instantiates a new vector with the values of the slice.

Safety

If slice.len() < Self::lanes() the behavior is undefined.

source§

impl f64x4

source

pub fn write_to_slice_aligned(self, slice: &mut [f64])

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.

source

pub fn write_to_slice_unaligned(self, slice: &mut [f64])

Writes the values of the vector to the slice.

Panics

If slice.len() < Self::lanes().

source

pub unsafe fn write_to_slice_aligned_unchecked(self, slice: &mut [f64])

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.

source

pub unsafe fn write_to_slice_unaligned_unchecked(self, slice: &mut [f64])

Writes the values of the vector to the slice.

Safety

If slice.len() < Self::lanes() the behavior is undefined.

source§

impl f64x4

source

pub fn shuffle1_dyn<I>(self, indices: I) -> Selfwhere Self: Shuffle1Dyn<Indices = I>,

Shuffle vector elements according to indices.

source§

impl f64x4

source

pub const EPSILON: f64x4 = _

Machine epsilon value.

source

pub const MIN: f64x4 = _

Smallest finite value.

source

pub const MIN_POSITIVE: f64x4 = _

Smallest positive normal value.

source

pub const MAX: f64x4 = _

Largest finite value.

source

pub const NAN: f64x4 = _

Not a Number (NaN).

source

pub const INFINITY: f64x4 = _

Infinity (∞).

source

pub const NEG_INFINITY: f64x4 = _

Negative infinity (-∞).

source

pub const PI: f64x4 = _

Archimedes’ constant (π)

source

pub const FRAC_PI_2: f64x4 = _

π/2

source

pub const FRAC_PI_3: f64x4 = _

π/3

source

pub const FRAC_PI_4: f64x4 = _

π/4

source

pub const FRAC_PI_6: f64x4 = _

π/6

source

pub const FRAC_PI_8: f64x4 = _

π/8

source

pub const FRAC_1_PI: f64x4 = _

1/π

source

pub const FRAC_2_PI: f64x4 = _

2/π

source

pub const FRAC_2_SQRT_PI: f64x4 = _

2/sqrt(π)

source

pub const SQRT_2: f64x4 = _

sqrt(2)

source

pub const FRAC_1_SQRT_2: f64x4 = _

1/sqrt(2)

source

pub const E: f64x4 = _

Euler’s number (e)

source

pub const LOG2_E: f64x4 = _

log2(e)

source

pub const LOG10_E: f64x4 = _

log10(e)

source

pub const LN_2: f64x4 = _

ln(2)

source

pub const LN_10: f64x4 = _

ln(10)

source§

impl f64x4

source

pub fn is_nan(self) -> m64x4

source

pub fn is_infinite(self) -> m64x4

source

pub fn is_finite(self) -> m64x4

source§

impl f64x4

source

pub fn abs(self) -> Self

Absolute value.

source§

impl f64x4

source

pub fn cos(self) -> Self

Cosine.

source

pub fn cos_pi(self) -> Self

Cosine of self * PI.

source§

impl f64x4

source

pub fn exp(self) -> Self

Returns the exponential function of self: e^(self).

source§

impl f64x4

source

pub fn ln(self) -> Self

Returns the natural logarithm of self.

source§

impl f64x4

source

pub fn mul_add(self, y: Self, z: Self) -> Self

Fused multiply add: self * y + z

source§

impl f64x4

source

pub fn mul_adde(self, y: Self, z: Self) -> Self

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.

source§

impl f64x4

source

pub fn powf(self, x: Self) -> Self

Raises self number to the floating point power of x.

source§

impl f64x4

source

pub fn recpre(self) -> Self

Reciprocal estimate: ~= 1. / self.

FIXME: The precision of the estimate is currently unspecified.

source§

impl f64x4

source

pub fn rsqrte(self) -> Self

Reciprocal square-root estimate: ~= 1. / self.sqrt().

FIXME: The precision of the estimate is currently unspecified.

source§

impl f64x4

source

pub fn sin(self) -> Self

Sine.

source

pub fn sin_pi(self) -> Self

Sine of self * PI.

source

pub fn sin_cos_pi(self) -> (Self, Self)

Sine and cosine of self * PI.

source§

impl f64x4

source

pub fn sqrt(self) -> Self

source§

impl f64x4

source

pub fn sqrte(self) -> Self

Square-root estimate.

FIXME: The precision of the estimate is currently unspecified.

source§

impl f64x4

source

pub fn tanh(self) -> Self

Tanh.

source§

impl f64x4

source

pub fn eq(self, other: Self) -> m64x4

Lane-wise equality comparison.

source

pub fn ne(self, other: Self) -> m64x4

Lane-wise inequality comparison.

source

pub fn lt(self, other: Self) -> m64x4

Lane-wise less-than comparison.

source

pub fn le(self, other: Self) -> m64x4

Lane-wise less-than-or-equals comparison.

source

pub fn gt(self, other: Self) -> m64x4

Lane-wise greater-than comparison.

source

pub fn ge(self, other: Self) -> m64x4

Lane-wise greater-than-or-equals comparison.

Trait Implementations§

source§

impl Add<Simd<[f64; 4]>> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the + operator.
source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
source§

impl Add<f64> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the + operator.
source§

fn add(self, other: f64) -> Self

Performs the + operation. Read more
source§

impl AddAssign<Simd<[f64; 4]>> for f64x4

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl AddAssign<f64> for f64x4

source§

fn add_assign(&mut self, other: f64)

Performs the += operation. Read more
source§

impl Debug for f64x4

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for f64x4

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Div<Simd<[f64; 4]>> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the / operator.
source§

fn div(self, other: Self) -> Self

Performs the / operation. Read more
source§

impl Div<f64> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the / operator.
source§

fn div(self, other: f64) -> Self

Performs the / operation. Read more
source§

impl DivAssign<Simd<[f64; 4]>> for f64x4

source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
source§

impl DivAssign<f64> for f64x4

source§

fn div_assign(&mut self, other: f64)

Performs the /= operation. Read more
source§

impl From<[f64; 4]> for f64x4

source§

fn from(array: [f64; 4]) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[f32; 4]>> for f64x4

source§

fn from(source: f32x4) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[i16; 4]>> for f64x4

source§

fn from(source: i16x4) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[i32; 4]>> for f64x4

source§

fn from(source: i32x4) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[i8; 4]>> for f64x4

source§

fn from(source: i8x4) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[u16; 4]>> for f64x4

source§

fn from(source: u16x4) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[u32; 4]>> for f64x4

source§

fn from(source: u32x4) -> Self

Converts to this type from the input type.
source§

impl From<Simd<[u8; 4]>> for f64x4

source§

fn from(source: u8x4) -> Self

Converts to this type from the input type.
source§

impl FromBits<Simd<[f32; 8]>> for f64x4

source§

fn from_bits(x: f32x8) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[i128; 2]>> for f64x4

source§

fn from_bits(x: i128x2) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[i16; 16]>> for f64x4

source§

fn from_bits(x: i16x16) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[i32; 8]>> for f64x4

source§

fn from_bits(x: i32x8) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[i64; 4]>> for f64x4

source§

fn from_bits(x: i64x4) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[i8; 32]>> for f64x4

source§

fn from_bits(x: i8x32) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[m128; 2]>> for f64x4

source§

fn from_bits(x: m128x2) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[m16; 16]>> for f64x4

source§

fn from_bits(x: m16x16) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[m32; 8]>> for f64x4

source§

fn from_bits(x: m32x8) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[m64; 4]>> for f64x4

source§

fn from_bits(x: m64x4) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[m8; 32]>> for f64x4

source§

fn from_bits(x: m8x32) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[u128; 2]>> for f64x4

source§

fn from_bits(x: u128x2) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[u16; 16]>> for f64x4

source§

fn from_bits(x: u16x16) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[u32; 8]>> for f64x4

source§

fn from_bits(x: u32x8) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[u64; 4]>> for f64x4

source§

fn from_bits(x: u64x4) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<Simd<[u8; 32]>> for f64x4

source§

fn from_bits(x: u8x32) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<__m256> for f64x4

source§

fn from_bits(x: __m256) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<__m256d> for f64x4

source§

fn from_bits(x: __m256d) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromBits<__m256i> for f64x4

source§

fn from_bits(x: __m256i) -> Self

Available on crate feature into_bits only.
Safe lossless bitwise transmute from T to Self.
source§

impl FromCast<Simd<[f32; 4]>> for f64x4

source§

fn from_cast(x: f32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i128; 4]>> for f64x4

source§

fn from_cast(x: i128x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i16; 4]>> for f64x4

source§

fn from_cast(x: i16x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i32; 4]>> for f64x4

source§

fn from_cast(x: i32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i64; 4]>> for f64x4

source§

fn from_cast(x: i64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i8; 4]>> for f64x4

source§

fn from_cast(x: i8x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[isize; 4]>> for f64x4

source§

fn from_cast(x: isizex4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m128; 4]>> for f64x4

source§

fn from_cast(x: m128x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m16; 4]>> for f64x4

source§

fn from_cast(x: m16x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m32; 4]>> for f64x4

source§

fn from_cast(x: m32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m64; 4]>> for f64x4

source§

fn from_cast(x: m64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m8; 4]>> for f64x4

source§

fn from_cast(x: m8x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[msize; 4]>> for f64x4

source§

fn from_cast(x: msizex4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u128; 4]>> for f64x4

source§

fn from_cast(x: u128x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u16; 4]>> for f64x4

source§

fn from_cast(x: u16x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u32; 4]>> for f64x4

source§

fn from_cast(x: u32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u64; 4]>> for f64x4

source§

fn from_cast(x: u64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u8; 4]>> for f64x4

source§

fn from_cast(x: u8x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[usize; 4]>> for f64x4

source§

fn from_cast(x: usizex4) -> Self

Numeric cast from T to Self.
source§

impl Mul<Simd<[f64; 4]>> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the * operator.
source§

fn mul(self, other: Self) -> Self

Performs the * operation. Read more
source§

impl Mul<f64> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the * operator.
source§

fn mul(self, other: f64) -> Self

Performs the * operation. Read more
source§

impl MulAssign<Simd<[f64; 4]>> for f64x4

source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
source§

impl MulAssign<f64> for f64x4

source§

fn mul_assign(&mut self, other: f64)

Performs the *= operation. Read more
source§

impl Neg for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl PartialEq<Simd<[f64; 4]>> for f64x4

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

fn ne(&self, other: &Self) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Product<&'a Simd<[f64; 4]>> for f64x4

source§

fn product<I: Iterator<Item = &'a f64x4>>(iter: I) -> f64x4

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Product<Simd<[f64; 4]>> for f64x4

source§

fn product<I: Iterator<Item = f64x4>>(iter: I) -> f64x4

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Rem<Simd<[f64; 4]>> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the % operator.
source§

fn rem(self, other: Self) -> Self

Performs the % operation. Read more
source§

impl Rem<f64> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the % operator.
source§

fn rem(self, other: f64) -> Self

Performs the % operation. Read more
source§

impl RemAssign<Simd<[f64; 4]>> for f64x4

source§

fn rem_assign(&mut self, other: Self)

Performs the %= operation. Read more
source§

impl RemAssign<f64> for f64x4

source§

fn rem_assign(&mut self, other: f64)

Performs the %= operation. Read more
source§

impl Simd for f64x4

§

type Element = f64

Element type of the SIMD vector
source§

const LANES: usize = 4usize

The number of elements in the SIMD vector.
§

type LanesType = [u32; 4]

The type: [u32; Self::N].
source§

impl Sub<Simd<[f64; 4]>> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the - operator.
source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
source§

impl Sub<f64> for f64x4

§

type Output = Simd<[f64; 4]>

The resulting type after applying the - operator.
source§

fn sub(self, other: f64) -> Self

Performs the - operation. Read more
source§

impl SubAssign<Simd<[f64; 4]>> for f64x4

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

impl SubAssign<f64> for f64x4

source§

fn sub_assign(&mut self, other: f64)

Performs the -= operation. Read more
source§

impl<'a> Sum<&'a Simd<[f64; 4]>> for f64x4

source§

fn sum<I: Iterator<Item = &'a f64x4>>(iter: I) -> f64x4

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl Sum<Simd<[f64; 4]>> for f64x4

source§

fn sum<I: Iterator<Item = f64x4>>(iter: I) -> f64x4

Method which takes an iterator and generates Self from the elements by “summing up” the items.