Skip to main content

f64x8

Struct f64x8 

Source
pub struct f64x8<S: Simd> {
    pub simd: S,
    /* private fields */
}
Expand description

A SIMD vector of 8 f64 elements.

You may construct this vector type using the Self::splat, Self::from_slice, Self::simd_from, Self::from_fn, and Self::block_splat methods.

fn construct_simd<S: Simd>(simd: S) {
    // From a single scalar value:
    let a = f64x8::splat(simd, 1.0);
    let b = f64x8::simd_from(simd, 1.0);

    // From a slice:
    let c = f64x8::from_slice(simd, &[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]);

    // From an array:
    let d = f64x8::simd_from(simd, [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]);

    // From an element-wise function:
    let e = f64x8::from_fn(simd, |i| i as f64);
    // From `Self::Block`:
    let f = f64x8::block_splat(f64x2::simd_from(simd, [1.0, 2.0]));
}

Fields§

§simd: S

Trait Implementations§

Source§

impl<S: Simd> Add for f64x8<S>

Source§

fn add(self, rhs: Self) -> Self::Output

Add two vectors element-wise.

Source§

type Output = f64x8<S>

The resulting type after applying the + operator.
Source§

impl<S: Simd> Add<f64> for f64x8<S>

Source§

type Output = f64x8<S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f64) -> Self::Output

Performs the + operation. Read more
Source§

impl<S: Simd> Add<f64x8<S>> for f64

Source§

type Output = f64x8<S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f64x8<S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S: Simd> AddAssign for f64x8<S>

Source§

fn add_assign(&mut self, rhs: Self)

Add two vectors element-wise.

Source§

impl<S: Simd> AddAssign<f64> for f64x8<S>

Source§

fn add_assign(&mut self, rhs: f64)

Performs the += operation. Read more
Source§

impl<S: Simd> Bytes for f64x8<S>

Source§

type Bytes = u8x64<S>

Source§

fn to_bytes(self) -> Self::Bytes

Convert this type to an array of bytes.
Source§

fn from_bytes(value: Self::Bytes) -> Self

Create an instance of this type from an array of bytes.
Source§

fn bitcast<U: Bytes<Bytes = Self::Bytes>>(self) -> U

Bitcast directly from this type to another one of the same size.
Source§

impl<S: Clone + Simd> Clone for f64x8<S>
where S::f64x8: Clone,

Source§

fn clone(&self) -> f64x8<S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Copy + Simd> Copy for f64x8<S>
where S::f64x8: Copy,

Source§

impl<S: Simd + Debug> Debug for f64x8<S>

Source§

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

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

impl<S: Simd> Deref for f64x8<S>

Source§

type Target = [f64; 8]

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<S: Simd> DerefMut for f64x8<S>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<S: Simd> Div for f64x8<S>

Source§

fn div(self, rhs: Self) -> Self::Output

Divide two vectors element-wise.

Source§

type Output = f64x8<S>

The resulting type after applying the / operator.
Source§

impl<S: Simd> Div<f64> for f64x8<S>

Source§

type Output = f64x8<S>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f64) -> Self::Output

Performs the / operation. Read more
Source§

impl<S: Simd> Div<f64x8<S>> for f64

Source§

type Output = f64x8<S>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f64x8<S>) -> Self::Output

Performs the / operation. Read more
Source§

impl<S: Simd> DivAssign for f64x8<S>

Source§

fn div_assign(&mut self, rhs: Self)

Divide two vectors element-wise.

Source§

impl<S: Simd> DivAssign<f64> for f64x8<S>

Source§

fn div_assign(&mut self, rhs: f64)

Performs the /= operation. Read more
Source§

impl<S: Simd> From<f64x8<S>> for __m512d

Available on x86 or x86-64 only.
Source§

fn from(value: f64x8<S>) -> Self

Converts to this type from the input type.
Source§

impl<S: Simd> From<f64x8<S>> for [f64; 8]

Source§

fn from(value: f64x8<S>) -> Self

Converts to this type from the input type.
Source§

impl<S: Simd> Index<usize> for f64x8<S>

Source§

type Output = f64

The returned type after indexing.
Source§

fn index(&self, i: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<S: Simd> IndexMut<usize> for f64x8<S>

Source§

fn index_mut(&mut self, i: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<S: Simd> Mul for f64x8<S>

Source§

fn mul(self, rhs: Self) -> Self::Output

Multiply two vectors element-wise.

Source§

type Output = f64x8<S>

The resulting type after applying the * operator.
Source§

impl<S: Simd> Mul<f64> for f64x8<S>

Source§

type Output = f64x8<S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64) -> Self::Output

Performs the * operation. Read more
Source§

impl<S: Simd> Mul<f64x8<S>> for f64

Source§

type Output = f64x8<S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64x8<S>) -> Self::Output

Performs the * operation. Read more
Source§

impl<S: Simd> MulAssign for f64x8<S>

Source§

fn mul_assign(&mut self, rhs: Self)

Multiply two vectors element-wise.

Source§

impl<S: Simd> MulAssign<f64> for f64x8<S>

Source§

fn mul_assign(&mut self, rhs: f64)

Performs the *= operation. Read more
Source§

impl<S: Simd> Neg for f64x8<S>

Source§

fn neg(self) -> Self::Output

Negate each element of the vector.

Source§

type Output = f64x8<S>

The resulting type after applying the - operator.
Source§

impl<S: Simd> Select<f64x8<S>> for mask64x8<S>

Source§

fn select(self, if_true: f64x8<S>, if_false: f64x8<S>) -> f64x8<S>

For each logical lane of this mask, select the first operand if the lane is true, and select the second operand if the lane is false. Read more
Source§

impl<S: Simd> SimdBase<S> for f64x8<S>

Source§

const N: usize = 8

This vector type’s lane count. This is useful when you’re working with a native-width vector (e.g. Simd::f32s) and want to process data in native-width chunks.
Source§

type Element = f64

The type of this vector’s elements.
Source§

type Mask = mask64x8<S>

A SIMD vector mask with the same number of logical lanes. Read more
Source§

type Block = f64x2<S>

A 128-bit SIMD vector of the same scalar type.
Source§

type Array = [f64; 8]

The array type that this vector type corresponds to, which will always be [Self::Element; Self::N]. It has the same layout as this vector type, but likely has a lower alignment.
Source§

fn witness(&self) -> S

Get the Simd implementation associated with this type.
Source§

fn as_slice(&self) -> &[f64]

Source§

fn as_mut_slice(&mut self) -> &mut [f64]

Source§

fn from_slice(simd: S, slice: &[f64]) -> Self

Create a SIMD vector from a slice. Read more
Source§

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

Store a SIMD vector into a slice. Read more
Source§

fn splat(simd: S, val: f64) -> Self

Create a SIMD vector with all elements set to the given value.
Source§

fn block_splat(block: Self::Block) -> Self

Create a SIMD vector from a 128-bit vector of the same scalar type, repeated.
Source§

fn from_fn(simd: S, f: impl FnMut(usize) -> f64) -> Self

Create a SIMD vector where each element is produced by calling f with that element’s lane index (from 0 to SimdBase::N - 1).
Source§

fn slide<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Self

Concatenate [self, rhs] and extract Self::N elements starting at index SHIFT. Read more
Source§

fn slide_within_blocks<const SHIFT: usize>( self, rhs: impl SimdInto<Self, S>, ) -> Self

Like slide, but operates independently on each 128-bit block.
Source§

fn swizzle_dyn_within_blocks( self, indices: impl SimdInto<Self::Bytes, S>, ) -> Self

Dynamically swizzle this vector’s bytes independently within each 128-bit block. Read more
Source§

impl<S: Simd> SimdFloat<S> for f64x8<S>

Source§

fn abs(self) -> Self

Compute the absolute value of each element.
Source§

fn sqrt(self) -> Self

Compute the square root of each element. Read more
Source§

fn approximate_recip(self) -> Self

Compute an approximate reciprocal (1. / x) for each element. Read more
Source§

fn copysign(self, rhs: impl SimdInto<Self, S>) -> Self

Return a vector with the magnitude of self and the sign of rhs for each element. Read more
Source§

fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for equality. Read more
Source§

fn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for less than. Read more
Source§

fn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for less than or equal. Read more
Source§

fn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for greater than or equal. Read more
Source§

fn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for greater than. Read more
Source§

fn zip_low(self, rhs: impl SimdInto<Self, S>) -> Self

Interleave the lower half elements of two vectors. Read more
Source§

fn zip_high(self, rhs: impl SimdInto<Self, S>) -> Self

Interleave the upper half elements of two vectors. Read more
Source§

fn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Self

Extract even-indexed elements from two vectors. Read more
Source§

fn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Self

Extract odd-indexed elements from two vectors. Read more
Source§

fn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)

Interleave two vectors. Read more
Source§

fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)

Deinterleave two vectors. Read more
Source§

fn max(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise maximum of two vectors. Read more
Source§

fn min(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise minimum of two vectors. Read more
Source§

fn max_precise(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise maximum of two vectors. Read more
Source§

fn min_precise(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise minimum of two vectors. Read more
Source§

fn mul_add( self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>, ) -> Self

Compute (self * op1) + op2 (fused multiply-add) for each element. Read more
Source§

fn mul_sub( self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>, ) -> Self

Compute (self * op1) - op2 (fused multiply-subtract) for each element. Read more
Source§

fn floor(self) -> Self

Return the largest integer less than or equal to each element, that is, round towards negative infinity.
Source§

fn ceil(self) -> Self

Return the smallest integer greater than or equal to each element, that is, round towards positive infinity.
Source§

fn round_ties_even(self) -> Self

Round each element to the nearest integer, with ties rounding to the nearest even integer. Read more
Source§

fn fract(self) -> Self

Return the fractional part of each element. Read more
Source§

fn trunc(self) -> Self

Return the integer part of each element, rounding towards zero.
Source§

fn to_int<T: SimdCvtTruncate<Self>>(self) -> T

Convert this floating-point type to an integer. This is a convenience method that delegates to SimdCvtTruncate::truncate_from, and can only be called if there actually exists a target type of the same bit width (currently, only u32 and i32). Read more
Source§

fn to_int_precise<T: SimdCvtTruncate<Self>>(self) -> T

Convert this floating-point type to an integer, saturating on overflow and returning 0 for NaN. This is a convenience method that delegates to SimdCvtTruncate::truncate_from_precise, and can only be called if there actually exists a target type of the same bit width (currently, only u32 and i32). Read more
Source§

impl<S: Simd> SimdFrom<[f64; 8], S> for f64x8<S>

Source§

fn simd_from(simd: S, val: [f64; 8]) -> Self

Source§

impl<S: Simd> SimdFrom<__m512d, S> for f64x8<S>

Available on x86 or x86-64 only.
Source§

fn simd_from(simd: S, arch: __m512d) -> Self

Source§

impl<S: Simd> SimdFrom<f64, S> for f64x8<S>

Source§

fn simd_from(simd: S, value: f64) -> Self

Source§

impl<S: Simd> SimdSplit<S> for f64x8<S>

Source§

type Split = f64x4<S>

Source§

fn split(self) -> (Self::Split, Self::Split)

Split this vector into left and right halves.
Source§

impl<S: Simd> Sub for f64x8<S>

Source§

fn sub(self, rhs: Self) -> Self::Output

Subtract two vectors element-wise.

Source§

type Output = f64x8<S>

The resulting type after applying the - operator.
Source§

impl<S: Simd> Sub<f64> for f64x8<S>

Source§

type Output = f64x8<S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f64) -> Self::Output

Performs the - operation. Read more
Source§

impl<S: Simd> Sub<f64x8<S>> for f64

Source§

type Output = f64x8<S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f64x8<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S: Simd> SubAssign for f64x8<S>

Source§

fn sub_assign(&mut self, rhs: Self)

Subtract two vectors element-wise.

Source§

impl<S: Simd> SubAssign<f64> for f64x8<S>

Source§

fn sub_assign(&mut self, rhs: f64)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<S> Freeze for f64x8<S>
where <S as ArchTypes>::f64x8: Freeze, S: Freeze,

§

impl<S> RefUnwindSafe for f64x8<S>
where <S as ArchTypes>::f64x8: RefUnwindSafe, S: RefUnwindSafe,

§

impl<S> Send for f64x8<S>

§

impl<S> Sync for f64x8<S>

§

impl<S> Unpin for f64x8<S>
where <S as ArchTypes>::f64x8: Unpin, S: Unpin,

§

impl<S> UnsafeUnpin for f64x8<S>
where <S as ArchTypes>::f64x8: UnsafeUnpin, S: UnsafeUnpin,

§

impl<S> UnwindSafe for f64x8<S>
where <S as ArchTypes>::f64x8: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.