pub struct f64x8<S: Simd> {
pub simd: S,
/* private fields */
}Expand description
A SIMD vector of 8 f64 elements.
This type’s memory layout is identical to that of [f64; 8], except that it is aligned to 64 bytes.
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: STrait Implementations§
Source§impl<S: Simd> AddAssign for f64x8<S>
impl<S: Simd> AddAssign for f64x8<S>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Add two vectors element-wise.
Source§impl<S: Simd> AddAssign<f64> for f64x8<S>
impl<S: Simd> AddAssign<f64> for f64x8<S>
Source§fn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
+= operation. Read moreSource§impl<S: Simd> Bytes for f64x8<S>
impl<S: Simd> Bytes for f64x8<S>
impl<S: Copy + Simd> Copy for f64x8<S>where
S::f64x8: Copy,
Source§impl<S: Simd> DivAssign for f64x8<S>
impl<S: Simd> DivAssign for f64x8<S>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Divide two vectors element-wise.
Source§impl<S: Simd> DivAssign<f64> for f64x8<S>
impl<S: Simd> DivAssign<f64> for f64x8<S>
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
/= operation. Read moreSource§impl<S: Simd> ExtractToken for f64x8<S>
impl<S: Simd> ExtractToken for f64x8<S>
Source§impl<S: Simd> MulAssign for f64x8<S>
impl<S: Simd> MulAssign for f64x8<S>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Multiply two vectors element-wise.
Source§impl<S: Simd> MulAssign<f64> for f64x8<S>
impl<S: Simd> MulAssign<f64> for f64x8<S>
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
*= operation. Read moreSource§impl<S: Simd> SimdBase<S> for f64x8<S>
impl<S: Simd> SimdBase<S> for f64x8<S>
Source§const LEN: usize = 8
const LEN: usize = 8
Simd::f32s) and
want to process data in native-width chunks.Source§type ByteVector = u8x64<S>
type ByteVector = u8x64<S>
u8 lanes used as the byte representation. Read moreSource§type Array = [f64; 8]
type Array = [f64; 8]
[Self::Element; Self::LEN]. It has the same layout as
this vector type, but likely has a lower alignment.fn as_slice(&self) -> &[f64]
fn as_mut_slice(&mut self) -> &mut [f64]
Source§fn from_slice(simd: S, slice: &[f64]) -> Self
fn from_slice(simd: S, slice: &[f64]) -> Self
Source§fn store_slice(&self, slice: &mut [f64])
fn store_slice(&self, slice: &mut [f64])
Source§fn splat(simd: S, val: f64) -> Self
fn splat(simd: S, val: f64) -> Self
Source§fn block_splat(block: Self::Block) -> Self
fn block_splat(block: Self::Block) -> Self
Source§fn from_fn(simd: S, f: impl FnMut(usize) -> f64) -> Self
fn from_fn(simd: S, f: impl FnMut(usize) -> f64) -> Self
f with that element’s lane index (from 0 to
SimdBase::LEN - 1).Source§fn slide_within_blocks<const SHIFT: usize>(
self,
rhs: impl SimdInto<Self, S>,
) -> Self
fn slide_within_blocks<const SHIFT: usize>( self, rhs: impl SimdInto<Self, S>, ) -> Self
slide, but operates independently on each 128-bit block.Source§fn swizzle_dyn_within_blocks(
self,
indices: impl SimdInto<Self::Bytes, S>,
) -> Self
fn swizzle_dyn_within_blocks( self, indices: impl SimdInto<Self::Bytes, S>, ) -> Self
Source§fn swizzle_dyn(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn swizzle_dyn(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
Source§fn swizzle_dyn_precise(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn swizzle_dyn_precise(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
Source§fn reduce_max(self) -> Self::Element
fn reduce_max(self) -> Self::Element
Source§fn reduce_min(self) -> Self::Element
fn reduce_min(self) -> Self::Element
Source§fn reduce_max_precise(self) -> Self::Element
fn reduce_max_precise(self) -> Self::Element
Source§fn reduce_min_precise(self) -> Self::Element
fn reduce_min_precise(self) -> Self::Element
Source§fn reduce_sum(self) -> Self::Element
fn reduce_sum(self) -> Self::Element
Source§fn reduce_product(self) -> Self::Element
fn reduce_product(self) -> Self::Element
Source§fn max(self, rhs: impl SimdInto<Self, S>) -> Self
fn max(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn min(self, rhs: impl SimdInto<Self, S>) -> Self
fn min(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn max_precise(self, rhs: impl SimdInto<Self, S>) -> Self
fn max_precise(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn min_precise(self, rhs: impl SimdInto<Self, S>) -> Self
fn min_precise(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
Source§fn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
Source§fn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
Source§fn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
Source§fn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
Source§fn zip_low(self, rhs: impl SimdInto<Self, S>) -> Self
fn zip_low(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn zip_high(self, rhs: impl SimdInto<Self, S>) -> Self
fn zip_high(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Self
fn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Self
fn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Self
Source§fn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
fn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
Source§fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
Source§fn load_array(simd: S, val: Self::Array) -> Self
fn load_array(simd: S, val: Self::Array) -> Self
Source§fn load_array_ref(simd: S, val: &Self::Array) -> Self
fn load_array_ref(simd: S, val: &Self::Array) -> Self
Source§fn as_array(&self) -> &Self::Array
fn as_array(&self) -> &Self::Array
Source§fn as_mut_array(&mut self) -> &mut Self::Array
fn as_mut_array(&mut self) -> &mut Self::Array
Source§fn store_array(self, dest: &mut Self::Array)
fn store_array(self, dest: &mut Self::Array)
Source§fn rotate_elements_left<const OFFSET: usize>(self) -> Self
fn rotate_elements_left<const OFFSET: usize>(self) -> Self
OFFSET. Read moreSource§fn rotate_elements_right<const OFFSET: usize>(self) -> Self
fn rotate_elements_right<const OFFSET: usize>(self) -> Self
OFFSET. Read moreSource§fn shift_elements_left<const OFFSET: usize>(
self,
padding: Self::Element,
) -> Self
fn shift_elements_left<const OFFSET: usize>( self, padding: Self::Element, ) -> Self
Source§impl<S: Simd> SimdCvtFloat<i64x8<S>> for f64x8<S>
impl<S: Simd> SimdCvtFloat<i64x8<S>> for f64x8<S>
Source§fn float_from(x: i64x8<S>) -> Self
fn float_from(x: i64x8<S>) -> Self
Convert each signed 64-bit integer element to a floating-point value.
Values that cannot be exactly represented are rounded to the nearest representable value.
Source§impl<S: Simd> SimdCvtFloat<u64x8<S>> for f64x8<S>
impl<S: Simd> SimdCvtFloat<u64x8<S>> for f64x8<S>
Source§fn float_from(x: u64x8<S>) -> Self
fn float_from(x: u64x8<S>) -> Self
Convert each unsigned 64-bit integer element to a floating-point value.
Values that cannot be exactly represented are rounded to the nearest representable value.
Source§impl<S: Simd> SimdCvtTruncate<f64x8<S>> for i64x8<S>
impl<S: Simd> SimdCvtTruncate<f64x8<S>> for i64x8<S>
Source§fn truncate_from(x: f64x8<S>) -> Self
fn truncate_from(x: f64x8<S>) -> Self
Convert each floating-point element to a signed 64-bit integer, truncating towards zero.
Out-of-range values or NaN will produce implementation-defined results.
Source§fn truncate_from_precise(x: f64x8<S>) -> Self
fn truncate_from_precise(x: f64x8<S>) -> Self
Convert each floating-point element to a signed 64-bit integer, truncating towards zero.
Out-of-range values are saturated to the closest in-range value. NaN becomes 0.
Source§impl<S: Simd> SimdCvtTruncate<f64x8<S>> for u64x8<S>
impl<S: Simd> SimdCvtTruncate<f64x8<S>> for u64x8<S>
Source§fn truncate_from(x: f64x8<S>) -> Self
fn truncate_from(x: f64x8<S>) -> Self
Convert each floating-point element to an unsigned 64-bit integer, truncating towards zero.
Out-of-range values or NaN will produce implementation-defined results.
Source§fn truncate_from_precise(x: f64x8<S>) -> Self
fn truncate_from_precise(x: f64x8<S>) -> Self
Convert each floating-point element to an unsigned 64-bit integer, truncating towards zero.
Out-of-range values are saturated to the closest in-range value. NaN becomes 0.
Source§impl<S: Simd> SimdFloat<S> for f64x8<S>
impl<S: Simd> SimdFloat<S> for f64x8<S>
Source§fn approximate_recip(self) -> Self
fn approximate_recip(self) -> Self
1. / x) for each element. Read moreSource§fn mul_add(
self,
op1: impl SimdInto<Self, S>,
op2: impl SimdInto<Self, S>,
) -> Self
fn mul_add( self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>, ) -> Self
(self * op1) + op2 (fused multiply-add) for each element. Read moreSource§fn mul_add_precise(
self,
op1: impl SimdInto<Self, S>,
op2: impl SimdInto<Self, S>,
) -> Self
fn mul_add_precise( self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>, ) -> Self
(self * op1) + op2 for each element, with a single rounding at the end. Read moreSource§fn mul_sub(
self,
op1: impl SimdInto<Self, S>,
op2: impl SimdInto<Self, S>,
) -> Self
fn mul_sub( self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>, ) -> Self
(self * op1) - op2 (fused multiply-subtract) for each element. Read moreSource§fn mul_sub_precise(
self,
op1: impl SimdInto<Self, S>,
op2: impl SimdInto<Self, S>,
) -> Self
fn mul_sub_precise( self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>, ) -> Self
(self * op1) - op2 for each element, with a single rounding at the end. Read moreSource§fn floor(self) -> Self
fn floor(self) -> Self
Source§fn ceil(self) -> Self
fn ceil(self) -> Self
Source§fn round_ties_even(self) -> Self
fn round_ties_even(self) -> Self
Source§fn to_int<T: SimdCvtTruncate<Self>>(self) -> T
fn to_int<T: SimdCvtTruncate<Self>>(self) -> T
SimdCvtTruncate::truncate_from, and can only be called if there
actually exists a target type of the same bit width (u32/i32 for f32, or
u64/i64 for f64). Read moreSource§fn to_int_precise<T: SimdCvtTruncate<Self>>(self) -> T
fn to_int_precise<T: SimdCvtTruncate<Self>>(self) -> T
SimdCvtTruncate::truncate_from_precise, and can only be called if there actually
exists a target type of the same bit width (u32/i32 for f32, or u64/i64
for f64). Read more