Skip to main content

Ieee32Array

Struct Ieee32Array 

Source
pub struct Ieee32Array { /* private fields */ }
Expand description

Contiguous binary32 lanes (u32 bits), row-major.

Implementations§

Source§

impl Ieee32Array

Source

pub fn new() -> Self

Empty 0×0 array.

Source

pub fn filled(n: usize, fill: Ieee32) -> Self

Row vector: n copies of fill (shape (1, n)).

Source

pub fn filled_2d(rows: usize, cols: usize, fill: Ieee32) -> Option<Self>

rows×cols filled with fill.

Source

pub fn from_bits(bits: &[u32]) -> Self

From a slice of IEEE bit patterns as a row vector.

Source

pub fn from_shape(rows: usize, cols: usize, vals: &[Ieee32]) -> Option<Self>

Row-major rows×cols. Length must be rows*cols.

Source

pub fn from_values(vals: &[Ieee32]) -> Self

From scalars as a row vector (shape (1, n)).

Source

pub fn shape(&self) -> (usize, usize)

(rows, cols).

Source

pub fn reshape(&self, rows: usize, cols: usize) -> Option<Self>

Reinterpret the same buffer as rows×cols when the product matches.

Source

pub fn len(&self) -> usize

Number of lanes.

Source

pub fn is_empty(&self) -> bool

True if there are no lanes.

Source

pub fn as_bits(&self) -> &[u32]

IEEE bit patterns.

Source

pub fn get(&self, i: usize) -> Option<Ieee32>

Lane i in storage order, or None if out of range.

Source

pub fn get2(&self, i: usize, j: usize) -> Option<Ieee32>

Entry (i, j), or None if out of range.

Source

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).

Source

pub fn add_scalar(&self, s: Ieee32) -> Self

Add a scalar to every lane.

Source

pub fn sub(&self, rhs: &Self) -> Option<Self>

Elementwise sub. Shapes must match. Integer SIMD via sign-bit flip then add.

Source

pub fn mul(&self, rhs: &Self) -> Option<Self>

Elementwise mul. Shapes must match. Integer SIMD significand products on the all-normal path.

Source

pub fn mul_scalar(&self, s: Ieee32) -> Self

Multiply every lane by a scalar.

Source

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.

Source

pub fn sqrt(&self) -> Self

Elementwise sqrt. Integer SIMD unpack on non-negative normals.

Source

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.

Source

pub fn sum(&self) -> Ieee32

Sequential IEEE sum (one rounding per add).

Source

pub fn dot(&self, rhs: &Self) -> Option<Ieee32>

Sequential dot product (mul then add, two rounds per term).

Source

pub fn matmul(&self, rhs: &Self) -> Option<Self>

Software matmul: (m×k)(k×n) → (m×n). Sequential IEEE mul-then-add per term.

Source

pub fn map_exact<F>(&self, p: usize, op: F) -> Self
where F: FnMut(&ExactNum) -> ExactNum,

Widen each lane, apply op, IEEE-round back.

Source§

impl Ieee32Array

Source

pub fn exp(&self, cc: &mut Consts) -> Self

Elementwise exp via ExactNum.

Source

pub fn exp2(&self, cc: &mut Consts) -> Self

Elementwise exp2 via ExactNum.

Source

pub fn exp10(&self, cc: &mut Consts) -> Self

Elementwise exp10 via ExactNum.

Source

pub fn expm1(&self, cc: &mut Consts) -> Self

Elementwise expm1 via ExactNum.

Source

pub fn ln(&self, cc: &mut Consts) -> Self

Elementwise ln via ExactNum.

Source

pub fn log2(&self, cc: &mut Consts) -> Self

Elementwise log2 via ExactNum.

Source

pub fn log10(&self, cc: &mut Consts) -> Self

Elementwise log10 via ExactNum.

Source

pub fn log1p(&self, cc: &mut Consts) -> Self

Elementwise log1p via ExactNum.

Source

pub fn sin(&self, cc: &mut Consts) -> Self

Elementwise sin via ExactNum.

Source

pub fn cos(&self, cc: &mut Consts) -> Self

Elementwise cos via ExactNum.

Source

pub fn tan(&self, cc: &mut Consts) -> Self

Elementwise tan via ExactNum.

Source

pub fn asin(&self, cc: &mut Consts) -> Self

Elementwise asin via ExactNum.

Source

pub fn acos(&self, cc: &mut Consts) -> Self

Elementwise acos via ExactNum.

Source

pub fn atan(&self, cc: &mut Consts) -> Self

Elementwise atan via ExactNum.

Source

pub fn sinh(&self, cc: &mut Consts) -> Self

Elementwise sinh via ExactNum.

Source

pub fn cosh(&self, cc: &mut Consts) -> Self

Elementwise cosh via ExactNum.

Source

pub fn tanh(&self, cc: &mut Consts) -> Self

Elementwise tanh via ExactNum.

Source

pub fn asinh(&self, cc: &mut Consts) -> Self

Elementwise asinh via ExactNum.

Source

pub fn acosh(&self, cc: &mut Consts) -> Self

Elementwise acosh via ExactNum.

Source

pub fn atanh(&self, cc: &mut Consts) -> Self

Elementwise atanh via ExactNum.

Source

pub fn erf(&self, cc: &mut Consts) -> Self

Elementwise erf via ExactNum.

Source

pub fn erfc(&self, cc: &mut Consts) -> Self

Elementwise erfc via ExactNum.

Source

pub fn gamma(&self, cc: &mut Consts) -> Self

Elementwise gamma via ExactNum.

Source

pub fn ln_gamma(&self, cc: &mut Consts) -> Self

Elementwise ln_gamma via ExactNum.

Source

pub fn digamma(&self, cc: &mut Consts) -> Self

Elementwise digamma via ExactNum.

Source

pub fn ei(&self, cc: &mut Consts) -> Self

Elementwise ei via ExactNum.

Source

pub fn si(&self, cc: &mut Consts) -> Self

Elementwise si via ExactNum.

Source

pub fn ci(&self, cc: &mut Consts) -> Self

Elementwise ci via ExactNum.

Source

pub fn li(&self, cc: &mut Consts) -> Self

Elementwise li via ExactNum.

Source

pub fn fresnel_s(&self, cc: &mut Consts) -> Self

Elementwise fresnel_s via ExactNum.

Source

pub fn fresnel_c(&self, cc: &mut Consts) -> Self

Elementwise fresnel_c via ExactNum.

Source

pub fn ai(&self, cc: &mut Consts) -> Self

Elementwise ai via ExactNum.

Source

pub fn bi(&self, cc: &mut Consts) -> Self

Elementwise bi via ExactNum.

Source

pub fn elliptic_k(&self, cc: &mut Consts) -> Self

Elementwise elliptic_k via ExactNum.

Source

pub fn rem_pi(&self, cc: &mut Consts) -> Self

Elementwise rem_pi via ExactNum.

Source

pub fn elliptic_e_complete(&self, cc: &mut Consts) -> Self

Elementwise complete E(m) via ExactNum.

Source

pub fn cbrt(&self) -> Self

Elementwise cbrt via ExactNum.

Source

pub fn atan2(&self, x: Ieee32, cc: &mut Consts) -> Self

Elementwise atan2(self, x) via ExactNum.

Source

pub fn hypot(&self, other: Ieee32) -> Self

Elementwise hypot(self, other) via ExactNum.

Source

pub fn pow(&self, n: Ieee32, cc: &mut Consts) -> Self

Elementwise pow(self, n) via ExactNum.

Source

pub fn log(&self, base: Ieee32, cc: &mut Consts) -> Self

Elementwise log(self, base) via ExactNum.

Source

pub fn gammainc(&self, x: Ieee32, cc: &mut Consts) -> Self

Elementwise γ(self, x) via ExactNum.

Source

pub fn gammainc_upper(&self, x: Ieee32, cc: &mut Consts) -> Self

Elementwise Γ(self, x) via ExactNum.

Source

pub fn bessel_j(&self, n: usize, cc: &mut Consts) -> Self

Elementwise integer-order J_n(self).

Source

pub fn bessel_j_nu(&self, nu: Ieee32, cc: &mut Consts) -> Self

Elementwise J_ν(self) for a shared real order.

Source

pub fn bessel_y(&self, nu: Ieee32, cc: &mut Consts) -> Self

Elementwise Y_ν(self).

Source

pub fn bessel_i(&self, nu: Ieee32, cc: &mut Consts) -> Self

Elementwise I_ν(self).

Source

pub fn bessel_k(&self, nu: Ieee32, cc: &mut Consts) -> Self

Elementwise K_ν(self).

Source

pub fn legendre_p(&self, n: u32) -> Self

Elementwise P_n(self).

Source

pub fn assoc_legendre_p(&self, n: u32, m: i32) -> Self

Elementwise P_n^m(self).

Source

pub fn elliptic_f(&self, m: Ieee32, cc: &mut Consts) -> Self

Elementwise F(self | m).

Source

pub fn elliptic_e(&self, m: Ieee32, cc: &mut Consts) -> Self

Elementwise incomplete E(self | m).

Source

pub fn elliptic_pi_complete(&self, m: Ieee32, cc: &mut Consts) -> Self

Elementwise complete Π(n, m) with self = n.

Source

pub fn elliptic_pi(&self, x: Ieee32, m: Ieee32, cc: &mut Consts) -> Self

Elementwise Π(self; x | m).

Source

pub fn hypergeom_2f1( &self, b: Ieee32, c: Ieee32, z: Ieee32, cc: &mut Consts, ) -> Self

Elementwise {}_2F_1(self, b; c; z).

Source

pub fn betainc(&self, b: Ieee32, x: Ieee32, cc: &mut Consts) -> Self

Elementwise I_x(self, b).

Trait Implementations§

Source§

impl Clone for Ieee32Array

Source§

fn clone(&self) -> Ieee32Array

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ieee32Array

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Ieee32Array

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.