Struct F64x2
pub struct F64x2 { /* private fields */ }Expand description
Fixed lanes with selected packed arithmetic. No register-residency, alignment/ABI, compiler-expression or automatic CPU-policy promise. Arithmetic obeys actual backend instructions; scalar sqrt uses libm.
Implementations§
§impl F64x2
impl F64x2
pub fn new(backend: VectorBackend, lanes: [f64; 2]) -> Result<Self, VectorError>
pub fn broadcast( backend: VectorBackend, value: f64, ) -> Result<Self, VectorError>
pub fn load(backend: VectorBackend, input: &[f64]) -> Result<Self, VectorError>
pub fn store(self, output: &mut [f64]) -> Result<(), VectorError>
pub fn backend(self) -> VectorBackend
pub fn to_array(self) -> [f64; 2]
pub fn lane(self, lane: usize) -> Result<f64, VectorError>
pub fn replace_lane(self, lane: usize, value: f64) -> Result<Self, VectorError>
pub fn add(self, rhs: Self) -> Result<Self, VectorError>
pub fn subtract(self, rhs: Self) -> Result<Self, VectorError>
pub fn multiply(self, rhs: Self) -> Result<Self, VectorError>
pub fn divide(self, rhs: Self) -> Result<Self, VectorError>
pub fn multiply_add(
self,
multiplier: Self,
addend: Self,
) -> Result<Self, VectorError>
pub fn multiply_add( self, multiplier: Self, addend: Self, ) -> Result<Self, VectorError>
Separate multiplication then addition; deliberately not fused.
pub fn absolute(self) -> Self
pub fn absolute(self) -> Self
Clear sign bits, preserving all remaining NaN/subnormal payload bits.
pub fn negate(self) -> Self
pub fn negate(self) -> Self
Toggle sign bits without arithmetic or quieting NaNs.
pub fn sqrt(self) -> Self
pub fn equal(self, rhs: Self) -> Result<LaneMask2, VectorError>
pub fn not_equal(self, rhs: Self) -> Result<LaneMask2, VectorError>
pub fn not_equal(self, rhs: Self) -> Result<LaneMask2, VectorError>
Unordered !=: a NaN operand produces a true lane.
pub fn less(self, rhs: Self) -> Result<LaneMask2, VectorError>
pub fn less_equal(self, rhs: Self) -> Result<LaneMask2, VectorError>
pub fn greater(self, rhs: Self) -> Result<LaneMask2, VectorError>
pub fn greater_equal(self, rhs: Self) -> Result<LaneMask2, VectorError>
pub fn select(
mask: LaneMask2,
left: Self,
right: Self,
) -> Result<Self, VectorError>
pub fn select( mask: LaneMask2, left: Self, right: Self, ) -> Result<Self, VectorError>
True lanes choose the left operand; selection preserves exact bits.
pub fn minimum(self, rhs: Self) -> Result<Self, VectorError>
pub fn minimum(self, rhs: Self) -> Result<Self, VectorError>
Select left only for ordered <; otherwise right bits (ties/NaN included).
pub fn maximum(self, rhs: Self) -> Result<Self, VectorError>
pub fn maximum(self, rhs: Self) -> Result<Self, VectorError>
Select left only for ordered >; otherwise right bits (ties/NaN included).
pub fn permute(self, indices: [usize; 2]) -> Result<Self, VectorError>
pub fn interleave(self, rhs: Self) -> Result<(Self, Self), VectorError>
pub fn interleave(self, rhs: Self) -> Result<(Self, Self), VectorError>
Interleaved full-width pair, lower half followed by upper half.
pub fn deinterleave(self, rhs: Self) -> Result<(Self, Self), VectorError>
pub fn from_i32( backend: VectorBackend, input: [i32; 2], ) -> Result<Self, VectorError>
§impl F64x2
impl F64x2
pub fn dot(self, rhs: Self) -> Result<f64, VectorError>
pub fn dot(self, rhs: Self) -> Result<f64, VectorError>
Unfused: lane products are rounded first, then summed as
F64x2::sum (lane0+lane1).