pub struct Portable;Expand description
Lanes as [f64; 4] in ordinary Rust arithmetic.
Available everywhere; on aarch64 the compiler maps the lane loops onto
NEON registers. Each method performs exactly the IEEE-754 operation the
Simd contract names, lane by lane.
Trait Implementations§
impl Copy for Portable
Source§impl Simd for Portable
impl Simd for Portable
Source§type W = [f64; 8]
type W = [f64; 8]
Eight
f64 lanes for element-wise work: one 512-bit register where the
CPU has AVX-512 and the kernel opts in (Kernel::WIDE), two
four-lane vectors otherwise. Every operation on them is exact per lane,
so the width never changes a result.Source§fn mul_add(self, a: [f64; 4], b: [f64; 4], c: [f64; 4]) -> [f64; 4]
fn mul_add(self, a: [f64; 4], b: [f64; 4], c: [f64; 4]) -> [f64; 4]
Lane-wise
a * b + c with a single rounding.Source§fn select_positive(
self,
test: [f64; 4],
yes: [f64; 4],
no: [f64; 4],
) -> [f64; 4]
fn select_positive( self, test: [f64; 4], yes: [f64; 4], no: [f64; 4], ) -> [f64; 4]
Lane-wise
if test > 0 { yes } else { no } (NaN takes no).Source§fn shift1(self, v: [f64; 4]) -> [f64; 4]
fn shift1(self, v: [f64; 4]) -> [f64; 4]
[0, v0, v1, v2]: lanes moved up by one, +0.0 shifted in.Source§fn shift2(self, v: [f64; 4]) -> [f64; 4]
fn shift2(self, v: [f64; 4]) -> [f64; 4]
[0, 0, v0, v1]: lanes moved up by two, +0.0 shifted in.Source§fn transpose4(
self,
a: [f64; 4],
b: [f64; 4],
c: [f64; 4],
d: [f64; 4],
) -> [[f64; 4]; 4]
fn transpose4( self, a: [f64; 4], b: [f64; 4], c: [f64; 4], d: [f64; 4], ) -> [[f64; 4]; 4]
The 4×4 transpose of the rows
a, b, c, d: result j is
[a_j, b_j, c_j, d_j]. Pure data movement, so no value changes.Auto Trait Implementations§
impl Freeze for Portable
impl RefUnwindSafe for Portable
impl Send for Portable
impl Sync for Portable
impl Unpin for Portable
impl UnsafeUnpin for Portable
impl UnwindSafe for Portable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more