pub struct Ieee32Array { /* private fields */ }Expand description
Contiguous binary32 lanes (u32 bits), row-major.
Implementations§
Source§impl Ieee32Array
impl Ieee32Array
Sourcepub fn filled_2d(rows: usize, cols: usize, fill: Ieee32) -> Option<Self>
pub fn filled_2d(rows: usize, cols: usize, fill: Ieee32) -> Option<Self>
rows×cols filled with fill.
Sourcepub fn from_shape(rows: usize, cols: usize, vals: &[Ieee32]) -> Option<Self>
pub fn from_shape(rows: usize, cols: usize, vals: &[Ieee32]) -> Option<Self>
Row-major rows×cols. Length must be rows*cols.
Sourcepub fn from_values(vals: &[Ieee32]) -> Self
pub fn from_values(vals: &[Ieee32]) -> Self
From scalars as a row vector (shape (1, n)).
Sourcepub fn reshape(&self, rows: usize, cols: usize) -> Option<Self>
pub fn reshape(&self, rows: usize, cols: usize) -> Option<Self>
Reinterpret the same buffer as rows×cols when the product matches.
Sourcepub fn get(&self, i: usize) -> Option<Ieee32>
pub fn get(&self, i: usize) -> Option<Ieee32>
Lane i in storage order, or None if out of range.
Sourcepub fn get2(&self, i: usize, j: usize) -> Option<Ieee32>
pub fn get2(&self, i: usize, j: usize) -> Option<Ieee32>
Entry (i, j), or None if out of range.
Sourcepub fn add(&self, rhs: &Self) -> Option<Self>
pub fn add(&self, rhs: &Self) -> Option<Self>
Elementwise add. Shapes must match. Uses integer SIMD when the architecture provides it (still the software IEEE kernel).
Sourcepub fn add_scalar(&self, s: Ieee32) -> Self
pub fn add_scalar(&self, s: Ieee32) -> Self
Add a scalar to every lane.
Sourcepub fn sub(&self, rhs: &Self) -> Option<Self>
pub fn sub(&self, rhs: &Self) -> Option<Self>
Elementwise sub. Shapes must match. Integer SIMD via sign-bit flip then add.
Sourcepub fn mul(&self, rhs: &Self) -> Option<Self>
pub fn mul(&self, rhs: &Self) -> Option<Self>
Elementwise mul. Shapes must match. Integer SIMD significand products on the all-normal path.
Sourcepub fn mul_scalar(&self, s: Ieee32) -> Self
pub fn mul_scalar(&self, s: Ieee32) -> Self
Multiply every lane by a scalar.
Sourcepub fn div(&self, rhs: &Self) -> Option<Self>
pub fn div(&self, rhs: &Self) -> Option<Self>
Elementwise div. Shapes must match. Integer SIMD unpack on the
all-normal path; significand quotient is integer / per lane.
Sourcepub fn fma(&self, b: &Self, c: &Self) -> Option<Self>
pub fn fma(&self, b: &Self, c: &Self) -> Option<Self>
Elementwise fused multiply-add (a\cdot b + c). Shapes must match. Integer SIMD significand products on the all-normal path.
Sourcepub fn dot(&self, rhs: &Self) -> Option<Ieee32>
pub fn dot(&self, rhs: &Self) -> Option<Ieee32>
Sequential dot product (mul then add, two rounds per term).
Source§impl Ieee32Array
impl Ieee32Array
Sourcepub fn elliptic_k(&self, cc: &mut Consts) -> Self
pub fn elliptic_k(&self, cc: &mut Consts) -> Self
Elementwise elliptic_k via ExactNum.
Sourcepub fn elliptic_e_complete(&self, cc: &mut Consts) -> Self
pub fn elliptic_e_complete(&self, cc: &mut Consts) -> Self
Elementwise complete E(m) via ExactNum.
Sourcepub fn atan2(&self, x: Ieee32, cc: &mut Consts) -> Self
pub fn atan2(&self, x: Ieee32, cc: &mut Consts) -> Self
Elementwise atan2(self, x) via ExactNum.
Sourcepub fn log(&self, base: Ieee32, cc: &mut Consts) -> Self
pub fn log(&self, base: Ieee32, cc: &mut Consts) -> Self
Elementwise log(self, base) via ExactNum.
Sourcepub fn gammainc(&self, x: Ieee32, cc: &mut Consts) -> Self
pub fn gammainc(&self, x: Ieee32, cc: &mut Consts) -> Self
Elementwise γ(self, x) via ExactNum.
Sourcepub fn gammainc_upper(&self, x: Ieee32, cc: &mut Consts) -> Self
pub fn gammainc_upper(&self, x: Ieee32, cc: &mut Consts) -> Self
Elementwise Γ(self, x) via ExactNum.
Sourcepub fn bessel_j_nu(&self, nu: Ieee32, cc: &mut Consts) -> Self
pub fn bessel_j_nu(&self, nu: Ieee32, cc: &mut Consts) -> Self
Elementwise J_ν(self) for a shared real order.
Sourcepub fn legendre_p(&self, n: u32) -> Self
pub fn legendre_p(&self, n: u32) -> Self
Elementwise P_n(self).
Sourcepub fn assoc_legendre_p(&self, n: u32, m: i32) -> Self
pub fn assoc_legendre_p(&self, n: u32, m: i32) -> Self
Elementwise P_n^m(self).
Sourcepub fn elliptic_f(&self, m: Ieee32, cc: &mut Consts) -> Self
pub fn elliptic_f(&self, m: Ieee32, cc: &mut Consts) -> Self
Elementwise F(self | m).
Sourcepub fn elliptic_e(&self, m: Ieee32, cc: &mut Consts) -> Self
pub fn elliptic_e(&self, m: Ieee32, cc: &mut Consts) -> Self
Elementwise incomplete E(self | m).
Sourcepub fn elliptic_pi_complete(&self, m: Ieee32, cc: &mut Consts) -> Self
pub fn elliptic_pi_complete(&self, m: Ieee32, cc: &mut Consts) -> Self
Elementwise complete Π(n, m) with self = n.
Sourcepub fn elliptic_pi(&self, x: Ieee32, m: Ieee32, cc: &mut Consts) -> Self
pub fn elliptic_pi(&self, x: Ieee32, m: Ieee32, cc: &mut Consts) -> Self
Elementwise Π(self; x | m).
Trait Implementations§
Source§impl Clone for Ieee32Array
impl Clone for Ieee32Array
Source§fn clone(&self) -> Ieee32Array
fn clone(&self) -> Ieee32Array
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Ieee32Array
impl Debug for Ieee32Array
Auto Trait Implementations§
impl Freeze for Ieee32Array
impl RefUnwindSafe for Ieee32Array
impl Send for Ieee32Array
impl Sync for Ieee32Array
impl Unpin for Ieee32Array
impl UnsafeUnpin for Ieee32Array
impl UnwindSafe for Ieee32Array
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more