Struct f64x2
#[repr(C, align(16))]
pub struct f64x2<S: Simd> { pub simd: S, /* private fields */ }
A SIMD vector of 2 f64 elements.
This type's memory layout is identical to that of [f64; 2], except that it is aligned to 16 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.
# use fearless_simd::{prelude::*, f64x2};
fn construct_simd<S: Simd>(simd: S) {
// From a single scalar value:
let a = f64x2::splat(simd, 1.0);
let b = f64x2::simd_from(simd, 1.0);
// From a slice:
let c = f64x2::from_slice(simd, &[1.0, 2.0]);
// From an array:
let d = f64x2::simd_from(simd, [1.0, 2.0]);
// From an element-wise function:
let e = f64x2::from_fn(simd, |i| i as f64);
}
Fields
simd: S
Trait Implementations
impl<S: Clone + Simd> Clone for f64x2<S>
where
S::f64x2: Clone,
fn clone(&self) -> Self
impl<S: Copy + Simd> Copy for f64x2<S>
where
S::f64x2: Copy,
impl<S: Simd + Debug> Debug for f64x2<S>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S: Simd> Add for f64x2<S>
type Output = f64x2<S>;fn add(self, rhs: Self) -> Self::OutputAdd two vectors element-wise.
impl<S: Simd> Add<f64> for f64x2<S>
type Output = f64x2<S>;fn add(self, rhs: f64) -> Self::Output
impl<S: Simd> AddAssign for f64x2<S>
fn add_assign(&mut self, rhs: Self)Add two vectors element-wise.
impl<S: Simd> AddAssign<f64> for f64x2<S>
fn add_assign(&mut self, rhs: f64)
impl<S: Simd> Bytes for f64x2<S>
type Bytes = u8x16<S>;fn to_bytes(self) -> Self::Bytesfn from_bytes(value: Self::Bytes) -> Self
impl<S: Simd> Deref for f64x2<S>
type Target = [f64; 2];fn deref(&self) -> &Self::Target
impl<S: Simd> DerefMut for f64x2<S>
fn deref_mut(&mut self) -> &mut Self::Target
impl<S: Simd> Div for f64x2<S>
type Output = f64x2<S>;fn div(self, rhs: Self) -> Self::OutputDivide two vectors element-wise.
impl<S: Simd> Div<f64> for f64x2<S>
type Output = f64x2<S>;fn div(self, rhs: f64) -> Self::Output
impl<S: Simd> DivAssign for f64x2<S>
fn div_assign(&mut self, rhs: Self)Divide two vectors element-wise.
impl<S: Simd> DivAssign<f64> for f64x2<S>
fn div_assign(&mut self, rhs: f64)
impl<S: Simd> ExtractToken for f64x2<S>
type S = S;fn token(&self) -> S
impl<S: Simd> Index<usize> for f64x2<S>
type Output = f64;fn index(&self, i: usize) -> &Self::Output
impl<S: Simd> IndexMut<usize> for f64x2<S>
fn index_mut(&mut self, i: usize) -> &mut Self::Output
impl<S: Simd> Mul for f64x2<S>
type Output = f64x2<S>;fn mul(self, rhs: Self) -> Self::OutputMultiply two vectors element-wise.
impl<S: Simd> Mul<f64> for f64x2<S>
type Output = f64x2<S>;fn mul(self, rhs: f64) -> Self::Output
impl<S: Simd> MulAssign for f64x2<S>
fn mul_assign(&mut self, rhs: Self)Multiply two vectors element-wise.
impl<S: Simd> MulAssign<f64> for f64x2<S>
fn mul_assign(&mut self, rhs: f64)
impl<S: Simd> Neg for f64x2<S>
type Output = f64x2<S>;fn neg(self) -> Self::OutputNegate each element of the vector.
impl<S: Simd> SimdBase<S> for f64x2<S>
type Element = f64;type ByteVector = u8x16<S>;const LEN: usize = 2;type Mask = mask64x2<S>;type Block = f64x2<S>;type Array = [f64; 2];fn as_slice(&self) -> &[f64]fn as_mut_slice(&mut self) -> &mut [f64]fn from_slice(simd: S, slice: &[f64]) -> Selffn store_slice(&self, slice: &mut [f64])fn splat(simd: S, val: f64) -> Selffn block_splat(block: Self::Block) -> Selffn from_fn(simd: S, f: impl FnMut(usize) -> f64) -> Selffn slide<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Selffn slide_within_blocks<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Selffn swizzle_dyn_within_blocks(self, indices: impl SimdInto<Self::Bytes, S>) -> Selffn swizzle_dyn(self, indices: impl SimdInto<Self::Bytes, S>) -> Selffn swizzle_dyn_precise(self, indices: impl SimdInto<Self::Bytes, S>) -> Selffn abs(self) -> Selffn reverse(self) -> Selffn concat_swizzle_dyn(self, rhs: impl SimdInto<Self, S>, indices: impl SimdInto<Self::Bytes, S>) -> Selffn concat_swizzle_dyn_precise(self, rhs: impl SimdInto<Self, S>, indices: impl SimdInto<Self::Bytes, S>) -> Selffn compress(self, mask: Self::Mask) -> Selffn compress_merge(self, mask: Self::Mask, merge: impl SimdInto<Self, S>) -> Selffn expand(self, mask: Self::Mask) -> Selffn expand_merge(self, mask: Self::Mask, merge: impl SimdInto<Self, S>) -> Selffn reduce_max(self) -> Self::Elementfn reduce_min(self) -> Self::Elementfn reduce_max_precise(self) -> Self::Elementfn reduce_min_precise(self) -> Self::Elementfn reduce_sum(self) -> Self::Elementfn reduce_product(self) -> Self::Elementfn max(self, rhs: impl SimdInto<Self, S>) -> Selffn min(self, rhs: impl SimdInto<Self, S>) -> Selffn max_precise(self, rhs: impl SimdInto<Self, S>) -> Selffn min_precise(self, rhs: impl SimdInto<Self, S>) -> Selffn clamp(self, min: impl SimdInto<Self, S>, max: impl SimdInto<Self, S>) -> Selffn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_ne(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn zip_low(self, rhs: impl SimdInto<Self, S>) -> Selffn zip_high(self, rhs: impl SimdInto<Self, S>) -> Selffn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Selffn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Selffn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
impl<S: Simd> SimdCombine<S> for f64x2<S>
type Combined = f64x4<S>;fn combine(self, rhs: impl SimdInto<Self, S>) -> Self::Combined
impl<S: Simd> SimdCvtFloat<i64x2<S>> for f64x2<S>
fn float_from(x: i64x2<S>) -> SelfConvert each signed 64-bit integer element to a floating-point value.
Values that cannot be exactly represented are rounded to the nearest representable value.
impl<S: Simd> SimdCvtFloat<u64x2<S>> for f64x2<S>
fn float_from(x: u64x2<S>) -> SelfConvert each unsigned 64-bit integer element to a floating-point value.
Values that cannot be exactly represented are rounded to the nearest representable value.
impl<S: Simd> SimdFloat<S> for f64x2<S>
type Bits = u64x2<S>;fn sqrt(self) -> Selffn approximate_recip(self) -> Selffn copysign(self, rhs: impl SimdInto<Self, S>) -> Selffn mul_add(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn mul_add_precise(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn mul_sub(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn mul_sub_precise(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn floor(self) -> Selffn ceil(self) -> Selffn round_ties_even(self) -> Selffn round(self) -> Selffn fract(self) -> Selffn trunc(self) -> Selffn to_degrees(self) -> Selffn to_radians(self) -> Selffn is_nan(self) -> Self::Maskfn is_infinite(self) -> Self::Maskfn is_finite(self) -> Self::Maskfn is_subnormal(self) -> Self::Maskfn is_normal(self) -> Self::Maskfn is_sign_positive(self) -> Self::Maskfn is_sign_negative(self) -> Self::Mask
impl<S: Simd> SimdFrom<[f64; 2], S> for f64x2<S>
fn simd_from(simd: S, val: [f64; 2]) -> Self
impl<S: Simd> SimdFrom<__m128d, S> for f64x2<S>
fn simd_from(simd: S, arch: __m128d) -> Self
impl<S: Simd> SimdFrom<f64, S> for f64x2<S>
fn simd_from(simd: S, value: f64) -> Self
impl<S: Simd> SimdInterleaved<S> for f64x2<S>
fn load_four_interleaved(simd: S, src: &[Self::Element]) -> [Self; 4]fn store_four_interleaved(vectors: [Self; 4], dest: &mut [Self::Element])
impl<S: Simd> SimdNarrow<S> for f64x2<S>
type Narrowed = f32x4<S>;fn narrow(self, high: Self) -> Self::Narrowedfn saturating_narrow(self, high: Self) -> Self::Narrowedfn relaxed_narrow(self, high: Self) -> Self::Narrowed
impl<S: Simd> Sub for f64x2<S>
type Output = f64x2<S>;fn sub(self, rhs: Self) -> Self::OutputSubtract two vectors element-wise.
impl<S: Simd> Sub<f64> for f64x2<S>
type Output = f64x2<S>;fn sub(self, rhs: f64) -> Self::Output
impl<S: Simd> SubAssign for f64x2<S>
fn sub_assign(&mut self, rhs: Self)Subtract two vectors element-wise.
impl<S: Simd> SubAssign<f64> for f64x2<S>
fn sub_assign(&mut self, rhs: f64)