pub struct Vector<R: Register>(/* private fields */);Expand description
SIMD Vector type.
This wraps a low-level register type and provides a vector-like interface, including operator overloading and element-wise operations.
Implementations§
Trait Implementations§
Source§impl<R: NumericRegister + Register> AddAssign for Vector<R>
impl<R: NumericRegister + Register> AddAssign for Vector<R>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl<R: NumericRegister + Register> AddAssignMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> AddAssignMasked<Mask<R>> for Vector<R>
Source§fn add_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn add_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn add_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn add_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn add_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn add_assign_z(&mut self, mask: Mask<R>, rhs: Self)
AddAssign masked (zeroed where mask is false).Source§impl<R: NumericRegister + Register> AddMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> AddMasked<Mask<R>> for Vector<R>
Source§impl<R: FloatRegister> AddSubExt for Vector<R>
impl<R: FloatRegister> AddSubExt for Vector<R>
Source§impl<R: FloatRegister> AddSubExtMasked<Mask<R>> for Vector<R>
impl<R: FloatRegister> AddSubExtMasked<Mask<R>> for Vector<R>
Source§fn fmaddsub_c(self, mask: Mask<R>, b: Self, c: Self) -> Self
fn fmaddsub_c(self, mask: Mask<R>, b: Self, c: Self) -> Self
Source§fn fmaddsub_m(self, src: Self, mask: Mask<R>, b: Self, c: Self) -> Self
fn fmaddsub_m(self, src: Self, mask: Mask<R>, b: Self, c: Self) -> Self
Source§fn fmaddsub_z(self, mask: Mask<R>, b: Self, c: Self) -> Self
fn fmaddsub_z(self, mask: Mask<R>, b: Self, c: Self) -> Self
fmaddsub where mask is true, else zero.Source§fn fmsubadd_c(self, mask: Mask<R>, b: Self, c: Self) -> Self
fn fmsubadd_c(self, mask: Mask<R>, b: Self, c: Self) -> Self
Source§fn fmsubadd_m(self, src: Self, mask: Mask<R>, b: Self, c: Self) -> Self
fn fmsubadd_m(self, src: Self, mask: Mask<R>, b: Self, c: Self) -> Self
Source§fn fmsubadd_z(self, mask: Mask<R>, b: Self, c: Self) -> Self
fn fmsubadd_z(self, mask: Mask<R>, b: Self, c: Self) -> Self
fmsubadd where mask is true, else zero.Source§impl<R: BitwiseRegister + Register> BitAndAssign for Vector<R>
impl<R: BitwiseRegister + Register> BitAndAssign for Vector<R>
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl<R: BitwiseRegister + Register> BitAndAssignMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitAndAssignMasked<Mask<R>> for Vector<R>
Source§fn bitand_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn bitand_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn bitand_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn bitand_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn bitand_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn bitand_assign_z(&mut self, mask: Mask<R>, rhs: Self)
BitAndAssign masked (zeroed where mask is false).Source§impl<R: BitwiseRegister + Register> BitAndMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitAndMasked<Mask<R>> for Vector<R>
Source§impl<R: BitwiseRegister + Register> BitAndNotAssign for Vector<R>
impl<R: BitwiseRegister + Register> BitAndNotAssign for Vector<R>
Source§fn bitandnot_assign(&mut self, rhs: Self)
fn bitandnot_assign(&mut self, rhs: Self)
self & !rhs into self.Source§impl<R: BitwiseRegister + Register> BitAndNotAssignMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitAndNotAssignMasked<Mask<R>> for Vector<R>
Source§fn bitandnot_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn bitandnot_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn bitandnot_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn bitandnot_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn bitandnot_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn bitandnot_assign_z(&mut self, mask: Mask<R>, rhs: Self)
BitAndNotAssign masked (zeroed where mask is false).Source§impl<R: BitwiseRegister + Register> BitAndNotMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitAndNotMasked<Mask<R>> for Vector<R>
Source§fn bitandnot_c(self, mask: Mask<R>, rhs: Self) -> Self::Output
fn bitandnot_c(self, mask: Mask<R>, rhs: Self) -> Self::Output
Source§fn bitandnot_m(self, src: Self, mask: Mask<R>, rhs: Self) -> Self::Output
fn bitandnot_m(self, src: Self, mask: Mask<R>, rhs: Self) -> Self::Output
Source§impl<FROM, INTO> BitCastVector<Vector<FROM>> for Vector<INTO>
impl<FROM, INTO> BitCastVector<Vector<FROM>> for Vector<INTO>
Source§impl<R: BitwiseRegister + Register> BitOrAssign for Vector<R>
impl<R: BitwiseRegister + Register> BitOrAssign for Vector<R>
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl<R: BitwiseRegister + Register> BitOrAssignMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitOrAssignMasked<Mask<R>> for Vector<R>
Source§fn bitor_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn bitor_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn bitor_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn bitor_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn bitor_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn bitor_assign_z(&mut self, mask: Mask<R>, rhs: Self)
BitOrAssign masked (zeroed where mask is false).Source§impl<R: BitwiseRegister + Register> BitOrMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitOrMasked<Mask<R>> for Vector<R>
Source§impl<R: BitwiseRegister + Register> BitXorAssign for Vector<R>
impl<R: BitwiseRegister + Register> BitXorAssign for Vector<R>
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl<R: BitwiseRegister + Register> BitXorAssignMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitXorAssignMasked<Mask<R>> for Vector<R>
Source§fn bitxor_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn bitxor_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn bitxor_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn bitxor_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn bitxor_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn bitxor_assign_z(&mut self, mask: Mask<R>, rhs: Self)
BitXorAssign masked (zeroed where mask is false).Source§impl<R: BitwiseRegister + Register> BitXorMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> BitXorMasked<Mask<R>> for Vector<R>
Source§impl<R: BitshiftRegister> BitshiftVector for Vector<R>
impl<R: BitshiftRegister> BitshiftVector for Vector<R>
Source§const HAS_TRUE_SHIFTV: bool = R::HAS_TRUE_SHIFTV
const HAS_TRUE_SHIFTV: bool = R::HAS_TRUE_SHIFTV
Source§const HAS_WIDE_BYTE_SHIFTS: bool = R::HAS_WIDE_BYTE_SHIFTS
const HAS_WIDE_BYTE_SHIFTS: bool = R::HAS_WIDE_BYTE_SHIFTS
Source§fn bshli<const I: i32>(self) -> Self
fn bshli<const I: i32>(self) -> Self
Source§fn bshri<const I: i32>(self) -> Self
fn bshri<const I: i32>(self) -> Self
Source§fn shli<const I: i32>(self) -> Self
fn shli<const I: i32>(self) -> Self
Source§fn shri<const I: i32>(self) -> Self
fn shri<const I: i32>(self) -> Self
Source§fn shlv(self, shifts: Self::Unsigned) -> Self
fn shlv(self, shifts: Self::Unsigned) -> Self
Source§fn shrv(self, shifts: Self::Unsigned) -> Self
fn shrv(self, shifts: Self::Unsigned) -> Self
Source§fn rol(self, shift: u32) -> Self
fn rol(self, shift: u32) -> Self
Source§fn ror(self, shift: u32) -> Self
fn ror(self, shift: u32) -> Self
Source§fn roli<const I: i32>(self) -> Self
fn roli<const I: i32>(self) -> Self
Source§fn rori<const I: i32>(self) -> Self
fn rori<const I: i32>(self) -> Self
Source§fn rolv(self, counts: Self::Unsigned) -> Self
fn rolv(self, counts: Self::Unsigned) -> Self
counts.Source§fn rorv(self, counts: Self::Unsigned) -> Self
fn rorv(self, counts: Self::Unsigned) -> Self
counts.Source§fn reverse_bits(self) -> Self
fn reverse_bits(self) -> Self
Source§fn bshli_c<const I: i32>(self, mask: Mask<R>) -> Self
fn bshli_c<const I: i32>(self, mask: Mask<R>) -> Self
Source§fn bshli_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
fn bshli_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
Source§fn bshli_z<const I: i32>(self, mask: Mask<R>) -> Self
fn bshli_z<const I: i32>(self, mask: Mask<R>) -> Self
Source§fn bshri_c<const I: i32>(self, mask: Mask<R>) -> Self
fn bshri_c<const I: i32>(self, mask: Mask<R>) -> Self
Source§fn bshri_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
fn bshri_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
Source§fn bshri_z<const I: i32>(self, mask: Mask<R>) -> Self
fn bshri_z<const I: i32>(self, mask: Mask<R>) -> Self
Source§fn shli_c<const I: i32>(self, mask: Mask<R>) -> Self
fn shli_c<const I: i32>(self, mask: Mask<R>) -> Self
shli when mask is true, returns self where false.Source§fn shli_z<const I: i32>(self, mask: Mask<R>) -> Self
fn shli_z<const I: i32>(self, mask: Mask<R>) -> Self
shli masked (zeroed where mask is false).Source§fn shri_c<const I: i32>(self, mask: Mask<R>) -> Self
fn shri_c<const I: i32>(self, mask: Mask<R>) -> Self
shri when mask is true, returns self where false.Source§fn shri_z<const I: i32>(self, mask: Mask<R>) -> Self
fn shri_z<const I: i32>(self, mask: Mask<R>) -> Self
shri masked (zeroed where mask is false).Source§fn shlv_c(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
fn shlv_c(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
shlv when mask is true, returns self where false.Source§fn shlv_z(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
fn shlv_z(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
shlv masked (zeroed where mask is false).Source§fn shrv_c(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
fn shrv_c(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
shrv when mask is true, returns self where false.Source§fn shrv_z(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
fn shrv_z(self, mask: Mask<R>, shifts: Self::Unsigned) -> Self
shrv masked (zeroed where mask is false).Source§fn rol_c(self, mask: Mask<R>, shift: u32) -> Self
fn rol_c(self, mask: Mask<R>, shift: u32) -> Self
rol when mask is true, returns self where false.Source§fn rol_m(self, src: Self, mask: Mask<R>, shift: u32) -> Self
fn rol_m(self, src: Self, mask: Mask<R>, shift: u32) -> Self
rol with src using mask.Source§fn rol_z(self, mask: Mask<R>, shift: u32) -> Self
fn rol_z(self, mask: Mask<R>, shift: u32) -> Self
rol masked (zeroed where mask is false).Source§fn ror_c(self, mask: Mask<R>, shift: u32) -> Self
fn ror_c(self, mask: Mask<R>, shift: u32) -> Self
ror when mask is true, returns self where false.Source§fn ror_m(self, src: Self, mask: Mask<R>, shift: u32) -> Self
fn ror_m(self, src: Self, mask: Mask<R>, shift: u32) -> Self
ror with src using mask.Source§fn ror_z(self, mask: Mask<R>, shift: u32) -> Self
fn ror_z(self, mask: Mask<R>, shift: u32) -> Self
ror masked (zeroed where mask is false).Source§fn roli_c<const I: i32>(self, mask: Mask<R>) -> Self
fn roli_c<const I: i32>(self, mask: Mask<R>) -> Self
roli when mask is true, returns self where false.Source§fn roli_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
fn roli_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
roli with src using mask.Source§fn roli_z<const I: i32>(self, mask: Mask<R>) -> Self
fn roli_z<const I: i32>(self, mask: Mask<R>) -> Self
roli masked (zeroed where mask is false).Source§fn rori_c<const I: i32>(self, mask: Mask<R>) -> Self
fn rori_c<const I: i32>(self, mask: Mask<R>) -> Self
rori when mask is true, returns self where false.Source§fn rori_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
fn rori_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
rori with src using mask.Source§fn rori_z<const I: i32>(self, mask: Mask<R>) -> Self
fn rori_z<const I: i32>(self, mask: Mask<R>) -> Self
rori masked (zeroed where mask is false).Source§fn rolv_c(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn rolv_c(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
counts.
Computes rolv when mask is true, returns self where false.Source§fn rolv_m(self, src: Self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn rolv_m(self, src: Self, mask: Mask<R>, counts: Self::Unsigned) -> Self
counts.
Merges rolv with src using mask.Source§fn rolv_z(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn rolv_z(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
counts.
Computes rolv masked (zeroed where mask is false).Source§fn rorv_c(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn rorv_c(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
counts.
Computes rorv when mask is true, returns self where false.Source§fn rorv_m(self, src: Self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn rorv_m(self, src: Self, mask: Mask<R>, counts: Self::Unsigned) -> Self
counts.
Merges rorv with src using mask.Source§fn rorv_z(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn rorv_z(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
counts.
Computes rorv masked (zeroed where mask is false).Source§fn reverse_bits_c(self, mask: Mask<R>) -> Self
fn reverse_bits_c(self, mask: Mask<R>) -> Self
reverse_bits when mask is true, returns self where false.Source§fn reverse_bits_m(self, src: Self, mask: Mask<R>) -> Self
fn reverse_bits_m(self, src: Self, mask: Mask<R>) -> Self
reverse_bits with src using mask.Source§fn reverse_bits_z(self, mask: Mask<R>) -> Self
fn reverse_bits_z(self, mask: Mask<R>) -> Self
reverse_bits masked (zeroed where mask is false).Source§impl<R: BitwiseRegister + Register> BitwiseVector for Vector<R>
impl<R: BitwiseRegister + Register> BitwiseVector for Vector<R>
Source§const HAS_NATIVE_TERNLOG: bool = R::HAS_NATIVE_TERNLOG
const HAS_NATIVE_TERNLOG: bool = R::HAS_NATIVE_TERNLOG
ternlog is a single native instruction
(AVX-512 vpternlog{d,q}), forwarded from
BitwiseRegister::HAS_NATIVE_TERNLOG. Read moreSource§fn ternlog<const IMM: i32>(a: Self, b: Self, c: Self) -> Self
fn ternlog<const IMM: i32>(a: Self, b: Self, c: Self) -> Self
a, b, c)
based on the truth table specified by IMM. Read moreSource§fn ternlog_c<const IMM: i32>(mask: Mask<R>, a: Self, b: Self, c: Self) -> Self
fn ternlog_c<const IMM: i32>(mask: Mask<R>, a: Self, b: Self, c: Self) -> Self
a, b, c)
based on the truth table specified by IMM. Read moreSource§fn ternlog_m<const IMM: i32>(
src: Self,
mask: Mask<R>,
a: Self,
b: Self,
c: Self,
) -> Self
fn ternlog_m<const IMM: i32>( src: Self, mask: Mask<R>, a: Self, b: Self, c: Self, ) -> Self
a, b, c)
based on the truth table specified by IMM. Read moreSource§fn ternlog_z<const IMM: i32>(mask: Mask<R>, a: Self, b: Self, c: Self) -> Self
fn ternlog_z<const IMM: i32>(mask: Mask<R>, a: Self, b: Self, c: Self) -> Self
a, b, c)
based on the truth table specified by IMM. Read moreSource§impl<R: NumericRegister> Bounded for Vector<R>
impl<R: NumericRegister> Bounded for Vector<R>
Source§impl<FROM, INTO> CastVector<Vector<FROM>> for Vector<INTO>
impl<FROM, INTO> CastVector<Vector<FROM>> for Vector<INTO>
Source§fn cast_from(from: Vector<FROM>) -> Self
fn cast_from(from: Vector<FROM>) -> Self
FROM into Self, lane-by-lane, using as
semantics on each element. See the trait docs for what float-to-int
does with NaN and out-of-range lanes.Source§fn cast_into(self) -> Vector<FROM>
fn cast_into(self) -> Vector<FROM>
FROM, lane-by-lane.Source§fn fast_cast_into(self) -> Vector<FROM>
fn fast_cast_into(self) -> Vector<FROM>
cast_into, but may take a faster path that
relaxes IEEE corner cases. See GenericVector::fast_cast.Source§fn saturating_cast_from(from: Vector<FROM>) -> Self
fn saturating_cast_from(from: Vector<FROM>) -> Self
Self’s element
range rather than wrapping (integers) or producing a backend-defined
value (float to int). Read moreSource§fn fast_cast_from(from: Vector<FROM>) -> Self
fn fast_cast_from(from: Vector<FROM>) -> Self
cast_from, but may take a faster path that
relaxes IEEE corner cases. See GenericVector::fast_cast. Read moreSource§impl<R: Register> ConstDefault for Vector<R>
impl<R: Register> ConstDefault for Vector<R>
impl<R: Register> Copy for Vector<R>
Source§impl<R: IntegerRegister> Div<BranchfreeDivider<<R as Register>::Element>> for Vector<R>
impl<R: IntegerRegister> Div<BranchfreeDivider<<R as Register>::Element>> for Vector<R>
Source§impl<R: IntegerRegister> Div<VectorDivider<R>> for Vector<R>
impl<R: IntegerRegister> Div<VectorDivider<R>> for Vector<R>
Source§impl<R: NumericRegister + Register> DivAssign for Vector<R>
impl<R: NumericRegister + Register> DivAssign for Vector<R>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
/= operation. Read moreSource§impl<R: NumericRegister + Register> DivAssignMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> DivAssignMasked<Mask<R>> for Vector<R>
Source§fn div_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn div_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn div_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn div_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn div_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn div_assign_z(&mut self, mask: Mask<R>, rhs: Self)
DivAssign masked (zeroed where mask is false).Source§impl<R: IntegerRegister> DivMasked<Mask<R>, BranchfreeDivider<<R as Register>::Element>> for Vector<R>where
R::Element: Denominator,
impl<R: IntegerRegister> DivMasked<Mask<R>, BranchfreeDivider<<R as Register>::Element>> for Vector<R>where
R::Element: Denominator,
Source§impl<R: IntegerRegister> DivMasked<Mask<R>, Divider<<R as Register>::Element>> for Vector<R>where
R::Element: Denominator,
impl<R: IntegerRegister> DivMasked<Mask<R>, Divider<<R as Register>::Element>> for Vector<R>where
R::Element: Denominator,
Source§impl<R: IntegerRegister> DivMasked<Mask<R>, VectorDivider<R>> for Vector<R>where
R::Element: Denominator,
impl<R: IntegerRegister> DivMasked<Mask<R>, VectorDivider<R>> for Vector<R>where
R::Element: Denominator,
Source§impl<R: NumericRegister + Register> DivMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> DivMasked<Mask<R>> for Vector<R>
Source§impl<R: FloatRegister<Element: FloatConsts>> FloatConsts for Vector<R>
impl<R: FloatRegister<Element: FloatConsts>> FloatConsts for Vector<R>
Source§const EULER_GAMMA: Self
const EULER_GAMMA: Self
Source§const PI_SQUARED: Self
const PI_SQUARED: Self
$\pi^2$Source§const FRAC_1_SQRT_2: Self
const FRAC_1_SQRT_2: Self
$1/\sqrt{2}$Source§const FRAC_1_SQRT_3: Self
const FRAC_1_SQRT_3: Self
$1/\sqrt{3}$Source§const FRAC_1_SQRT_PI: Self
const FRAC_1_SQRT_PI: Self
$1/\sqrt{\pi}$Source§const FRAC_2_SQRT_PI: Self
const FRAC_2_SQRT_PI: Self
$2/\sqrt{\pi}$Source§const FRAC_SQRT_PI_2: Self
const FRAC_SQRT_PI_2: Self
$\sqrt{\pi}/2$Source§const FRAC_1_SQRT_TAU: Self
const FRAC_1_SQRT_TAU: Self
$1/\sqrt{2\pi}$Source§const FRAC_PI_180: Self
const FRAC_PI_180: Self
$\pi/180$Source§const FRAC_180_PI: Self
const FRAC_180_PI: Self
$180/\pi$Source§const FRAC_LN_PI_2: Self
const FRAC_LN_PI_2: Self
$frac{1}{2}\ln \pi$Source§const SQRT_EPSILON: Self
const SQRT_EPSILON: Self
$\sqrt{arepsilon}$)Source§const FOURTH_ROOT_EPSILON: Self
const FOURTH_ROOT_EPSILON: Self
$\sqrt[4]{arepsilon}$)Source§const SQRT_FRAC_PI_2: Self
const SQRT_FRAC_PI_2: Self
$\sqrt{\pi/2}$Source§const FRAC_NEG_1_E: Self
const FRAC_NEG_1_E: Self
Source§impl<R: FloatRegister> FloatVector for Vector<R>
impl<R: FloatRegister> FloatVector for Vector<R>
Source§const NEG_INFINITY: Self
const NEG_INFINITY: Self
-infinity represented in this vector type.Source§const HAS_APPROX_RCP: bool = R::HAS_APPROX_RCP
const HAS_APPROX_RCP: bool = R::HAS_APPROX_RCP
true if the backend has a hardware approximate-reciprocal
instruction (e.g. rcpps on x86). When false, rcp
falls back to a full IEEE division and provides no speed advantage
over Self::ONE / self.Source§const HAS_APPROX_RSQRT: bool = R::HAS_APPROX_RSQRT
const HAS_APPROX_RSQRT: bool = R::HAS_APPROX_RSQRT
true if the backend has a hardware approximate-reciprocal-square-root
instruction (e.g. rsqrtps on x86). When false, rsqrt
falls back to Self::ONE / self.sqrt().Source§type ExtendedPrecision = Vector<<R as FloatRegister>::ExtendedPrecision>
type ExtendedPrecision = Vector<<R as FloatRegister>::ExtendedPrecision>
f32 vectors, this
would be an f64 vector type. Read moreSource§fn is_infinite(self) -> Self::Mask
fn is_infinite(self) -> Self::Mask
Source§fn is_finite(self) -> Self::Mask
fn is_finite(self) -> Self::Mask
Source§fn is_zero_or_subnormal(self) -> Self::Mask
fn is_zero_or_subnormal(self) -> Self::Mask
Source§fn is_normal(self) -> Self::Mask
fn is_normal(self) -> Self::Mask
Source§fn is_subnormal(self) -> Self::Mask
fn is_subnormal(self) -> Self::Mask
Source§fn floor(self) -> Self
fn floor(self) -> Self
Source§fn ceil(self) -> Self
fn ceil(self) -> Self
Source§fn trunc(self) -> Self
fn trunc(self) -> Self
Source§fn mul_sign(self, sign: Self) -> Self
fn mul_sign(self, sign: Self) -> Self
self * sign.signum(), multiplying the sign bits.Source§fn signed_zero(self) -> Self
fn signed_zero(self) -> Self
self, i.e.: only the sign bit is set.Source§fn next_up(self) -> Self
fn next_up(self) -> Self
Source§fn next_down(self) -> Self
fn next_down(self) -> Self
Source§fn mix(self, a: Self, b: Self) -> Self
fn mix(self, a: Self, b: Self) -> Self
a and b by self, where self is typically in the range [0, 1]. Read moreSource§unsafe fn block_autovectorization(&mut self)
unsafe fn block_autovectorization(&mut self)
Source§fn with_bits<const N: usize, K: AsFloatVectorWithBitsKernel<Self, N>>(
values: [Self; N],
kernel: K,
) -> Option<<K as AsFloatVectorWithBitsKernel<Self, N>>::Output>
fn with_bits<const N: usize, K: AsFloatVectorWithBitsKernel<Self, N>>( values: [Self; N], kernel: K, ) -> Option<<K as AsFloatVectorWithBitsKernel<Self, N>>::Output>
Source§fn rsqrt_c(self, mask: Mask<R>) -> Self
fn rsqrt_c(self, mask: Mask<R>) -> Self
Source§fn rsqrt_m(self, src: Self, mask: Mask<R>) -> Self
fn rsqrt_m(self, src: Self, mask: Mask<R>) -> Self
Source§fn rsqrt_z(self, mask: Mask<R>) -> Self
fn rsqrt_z(self, mask: Mask<R>) -> Self
Source§fn rcp_m(self, src: Self, mask: Mask<R>) -> Self
fn rcp_m(self, src: Self, mask: Mask<R>) -> Self
1 / self. Read moreSource§fn floor_c(self, mask: Mask<R>) -> Self
fn floor_c(self, mask: Mask<R>) -> Self
Source§fn floor_m(self, src: Self, mask: Mask<R>) -> Self
fn floor_m(self, src: Self, mask: Mask<R>) -> Self
Source§fn floor_z(self, mask: Mask<R>) -> Self
fn floor_z(self, mask: Mask<R>) -> Self
Source§fn ceil_c(self, mask: Mask<R>) -> Self
fn ceil_c(self, mask: Mask<R>) -> Self
ceil when mask is true, returns self where false.Source§fn ceil_m(self, src: Self, mask: Mask<R>) -> Self
fn ceil_m(self, src: Self, mask: Mask<R>) -> Self
ceil with src using mask.Source§fn ceil_z(self, mask: Mask<R>) -> Self
fn ceil_z(self, mask: Mask<R>) -> Self
ceil masked (zeroed where mask is false).Source§fn trunc_c(self, mask: Mask<R>) -> Self
fn trunc_c(self, mask: Mask<R>) -> Self
trunc when mask is true, returns self where false.Source§fn trunc_m(self, src: Self, mask: Mask<R>) -> Self
fn trunc_m(self, src: Self, mask: Mask<R>) -> Self
trunc with src using mask.Source§fn trunc_z(self, mask: Mask<R>) -> Self
fn trunc_z(self, mask: Mask<R>) -> Self
trunc masked (zeroed where mask is false).Source§fn fract_c(self, mask: Mask<R>) -> Self
fn fract_c(self, mask: Mask<R>) -> Self
self - self.trunc(). Read moreSource§fn fract_m(self, src: Self, mask: Mask<R>) -> Self
fn fract_m(self, src: Self, mask: Mask<R>) -> Self
self - self.trunc(). Read moreSource§fn fract_z(self, mask: Mask<R>) -> Self
fn fract_z(self, mask: Mask<R>) -> Self
self - self.trunc(). Read moreSource§fn mul_sign_c(self, mask: Mask<R>, sign: Self) -> Self
fn mul_sign_c(self, mask: Mask<R>, sign: Self) -> Self
self * sign.signum(), multiplying the sign bits.
Computes mul_sign when mask is true, returns self where false.Source§fn mul_sign_m(self, src: Self, mask: Mask<R>, sign: Self) -> Self
fn mul_sign_m(self, src: Self, mask: Mask<R>, sign: Self) -> Self
Source§fn mul_sign_z(self, mask: Mask<R>, sign: Self) -> Self
fn mul_sign_z(self, mask: Mask<R>, sign: Self) -> Self
self * sign.signum(), multiplying the sign bits.
Computes mul_sign masked (zeroed where mask is false).Source§fn signed_zero_c(self, mask: Mask<R>) -> Self
fn signed_zero_c(self, mask: Mask<R>) -> Self
self, i.e.: only the sign bit is set.
Computes signed_zero when mask is true, returns self where false.Source§fn signed_zero_m(self, src: Self, mask: Mask<R>) -> Self
fn signed_zero_m(self, src: Self, mask: Mask<R>) -> Self
self, i.e.: only the sign bit is set.
Merges signed_zero with src using mask.Source§fn signed_zero_z(self, mask: Mask<R>) -> Self
fn signed_zero_z(self, mask: Mask<R>) -> Self
self, i.e.: only the sign bit is set.
Computes signed_zero masked (zeroed where mask is false).Source§fn next_up_c(self, mask: Mask<R>) -> Self
fn next_up_c(self, mask: Mask<R>) -> Self
next_up when mask is true, returns self where false.Source§fn next_up_m(self, src: Self, mask: Mask<R>) -> Self
fn next_up_m(self, src: Self, mask: Mask<R>) -> Self
next_up with src using mask.Source§fn next_up_z(self, mask: Mask<R>) -> Self
fn next_up_z(self, mask: Mask<R>) -> Self
next_up masked (zeroed where mask is false).Source§fn next_down_c(self, mask: Mask<R>) -> Self
fn next_down_c(self, mask: Mask<R>) -> Self
next_down when mask is true, returns self where false.Source§fn next_down_m(self, src: Self, mask: Mask<R>) -> Self
fn next_down_m(self, src: Self, mask: Mask<R>) -> Self
next_down with src using mask.Source§fn next_down_z(self, mask: Mask<R>) -> Self
fn next_down_z(self, mask: Mask<R>) -> Self
next_down masked (zeroed where mask is false).Source§fn one_minus_sq(self) -> Self
fn one_minus_sq(self) -> Self
$1 - x^2$ accurately, avoiding the cancellation a naive 1 - self * self
suffers as self approaches ±1 (where the result is small but self * self is near 1). Read moreSource§impl<R: FloatRegister> FloatVectorWithBits for Vector<R>
impl<R: FloatRegister> FloatVectorWithBits for Vector<R>
Source§const NATIVE_CAP: NativeCapability = R::NATIVE_CAP
const NATIVE_CAP: NativeCapability = R::NATIVE_CAP
native_* methods on this trait have a
real hardware implementation on the current backend. Read moreSource§type SignedBits = Vector<<R as FloatRegister>::SignedBits>
type SignedBits = Vector<<R as FloatRegister>::SignedBits>
Source§type Bits = Vector<<R as FloatRegister>::Bits>
type Bits = Vector<<R as FloatRegister>::Bits>
Source§unsafe fn native_ldexp(self, exp: Self::SignedBits) -> Self
unsafe fn native_ldexp(self, exp: Self::SignedBits) -> Self
Source§unsafe fn native_frexp(self) -> (Self, Self::SignedBits)
unsafe fn native_frexp(self) -> (Self, Self::SignedBits)
frexp: split each lane into a normalized
mantissa in [0.5, 1.0) and an integer exponent. Read moreSource§unsafe fn native_sin_cos<P: Policy>(self) -> (Self, Self)
unsafe fn native_sin_cos<P: Policy>(self) -> (Self, Self)
Source§unsafe fn native_sin<P: Policy>(self) -> Self
unsafe fn native_sin<P: Policy>(self) -> Self
Source§unsafe fn native_cos<P: Policy>(self) -> Self
unsafe fn native_cos<P: Policy>(self) -> Self
Source§unsafe fn native_tan<P: Policy>(self) -> Self
unsafe fn native_tan<P: Policy>(self) -> Self
Source§unsafe fn native_exp2<P: Policy>(self) -> Self
unsafe fn native_exp2<P: Policy>(self) -> Self
2^self, lane-wise. Read moreSource§unsafe fn native_log2<P: Policy>(self) -> Self
unsafe fn native_log2<P: Policy>(self) -> Self
log2(self), lane-wise. Read moreSource§unsafe fn native_exp<P: Policy>(self) -> Self
unsafe fn native_exp<P: Policy>(self) -> Self
e^self, lane-wise. Read moreSource§unsafe fn native_ln<P: Policy>(self) -> Self
unsafe fn native_ln<P: Policy>(self) -> Self
Source§unsafe fn native_powf<P: Policy>(self, exp: Self) -> Self
unsafe fn native_powf<P: Policy>(self, exp: Self) -> Self
self^exp, lane-wise. Read moreSource§fn total_order(self) -> Self::SignedBits
fn total_order(self) -> Self::SignedBits
Source§fn linear_order(self) -> Self::SignedBits
fn linear_order(self) -> Self::SignedBits
total_order, but positive zero and negative zero are
the same value. This can be used for calculating ULP differences by simply subtracting one from another.Source§impl<R> FloatVectorWithRegister for Vector<R>where
R: FloatRegister,
impl<R> FloatVectorWithRegister for Vector<R>where
R: FloatRegister,
Source§impl<R> GenericSelectable for Vector<R>where
R: Register,
impl<R> GenericSelectable for Vector<R>where
R: Register,
Source§impl<R: Register> GenericVector for Vector<R>
impl<R: Register> GenericVector for Vector<R>
Source§const LANES: usize = <R::Lanes as generic_array::typenum::Unsigned>::USIZE
const LANES: usize = <R::Lanes as generic_array::typenum::Unsigned>::USIZE
Source§const HAS_NATIVE_ALIGN: bool = R::HAS_NATIVE_ALIGN
const HAS_NATIVE_ALIGN: bool = R::HAS_NATIVE_ALIGN
align is a native cross-register instruction rather
than the generic shuffle-and-blend fallback, forwarded from
Register::HAS_NATIVE_ALIGN. Read moreSource§type Lanes = <R as CoreRegister>::Lanes
type Lanes = <R as CoreRegister>::Lanes
Source§type Unsigned = Vector<<R as Register>::Unsigned>
type Unsigned = Vector<<R as Register>::Unsigned>
Source§type Signed = Vector<<R as Register>::Signed>
type Signed = Vector<<R as Register>::Signed>
Source§type Mask = Mask<R>
type Mask = Mask<R>
Source§fn new<const N: usize>(values: [R::Element; N]) -> Self
fn new<const N: usize>(values: [R::Element; N]) -> Self
Source§fn into_array(self) -> GenericArray<R::Element, R::Lanes>
fn into_array(self) -> GenericArray<R::Element, R::Lanes>
GenericArray. Read moreSource§fn splat(value: Self::Element) -> Self
fn splat(value: Self::Element) -> Self
Source§fn single(value: Self::Element) -> Self
fn single(value: Self::Element) -> Self
Source§fn broadcast<const I: usize>(self) -> Self
fn broadcast<const I: usize>(self) -> Self
Source§fn broadcastv(self, idx: usize) -> Self
fn broadcastv(self, idx: usize) -> Self
Source§fn extract<const I: usize>(self) -> Self::Element
fn extract<const I: usize>(self) -> Self::Element
I. Read moreSource§fn extractv(self, idx: usize) -> Self::Element
fn extractv(self, idx: usize) -> Self::Element
idx. Read moreSource§fn insert<const I: usize>(self, value: Self::Element) -> Self
fn insert<const I: usize>(self, value: Self::Element) -> Self
I. Read moreSource§fn insertv(self, idx: usize, value: Self::Element) -> Self
fn insertv(self, idx: usize, value: Self::Element) -> Self
idx. Read moreSource§unsafe fn lookup_unchecked(
values: &[Self::Element],
indices: Self::Unsigned,
) -> Self
unsafe fn lookup_unchecked( values: &[Self::Element], indices: Self::Unsigned, ) -> Self
Source§fn swap_bytes(self) -> Self
fn swap_bytes(self) -> Self
Source§fn compress(self, mask: Self::Mask) -> Self
fn compress(self, mask: Self::Mask) -> Self
compress): gather the lanes where mask is true
into the low lanes, preserving their relative order. The unselected lanes
are kept (not zeroed) and packed into the high lanes, also in order - a
stable partition of the vector by mask. Read moreSource§fn compress_z(self, mask: Self::Mask) -> Self
fn compress_z(self, mask: Self::Mask) -> Self
Source§fn compress_m(self, src: Self, mask: Self::Mask) -> Self
fn compress_m(self, src: Self, mask: Self::Mask) -> Self
Source§fn align<const OFFSET: usize>(self, other: Self) -> Self
fn align<const OFFSET: usize>(self, other: Self) -> Self
palignr family): the window of LANES
lanes starting at lane OFFSET of the concatenation [self, other]
(self’s lanes first, then other’s). OFFSET == 0 returns self,
OFFSET == LANES returns other; in between, lanes spill from the tail
of self into the head of other. Read moreSource§fn zz(self, mask: Self::Mask) -> Self
fn zz(self, mask: Self::Mask) -> Self
Source§fn nz(self, mask: Self::Mask) -> Self
fn nz(self, mask: Self::Mask) -> Self
Source§fn map<F>(self, f: F) -> Self
fn map<F>(self, f: F) -> Self
Source§fn fold<F>(self, init: Self::Element, f: F) -> Self::Element
fn fold<F>(self, init: Self::Element, f: F) -> Self::Element
Source§fn reduce<F>(self, f: F) -> Self::Element
fn reduce<F>(self, f: F) -> Self::Element
Source§unsafe fn load(ptr: *const Self::Element) -> Self
unsafe fn load(ptr: *const Self::Element) -> Self
Source§unsafe fn load_unaligned(ptr: *const Self::Element) -> Self
unsafe fn load_unaligned(ptr: *const Self::Element) -> Self
Source§unsafe fn load_streaming(ptr: *const Self::Element) -> Self
unsafe fn load_streaming(ptr: *const Self::Element) -> Self
Source§unsafe fn store(self, ptr: *mut Self::Element)
unsafe fn store(self, ptr: *mut Self::Element)
Source§unsafe fn store_masked(self, mask: Self::Mask, ptr: *mut Self::Element)
unsafe fn store_masked(self, mask: Self::Mask, ptr: *mut Self::Element)
true.
For lanes where the mask is false, the store is suppressed without panicking. Read moreSource§unsafe fn store_unaligned(self, ptr: *mut Self::Element)
unsafe fn store_unaligned(self, ptr: *mut Self::Element)
Source§unsafe fn store_streaming(self, ptr: *mut Self::Element)
unsafe fn store_streaming(self, ptr: *mut Self::Element)
Source§fn interleave_by<const GROUP: usize>(self, other: Self) -> (Self, Self)
fn interleave_by<const GROUP: usize>(self, other: Self) -> (Self, Self)
GROUP consecutive elements move
as a unit and are never split. GROUP == 1 is interleave; GROUP == 2
is the complex interleave - lo == [a.c0, b.c0, a.c1, b.c1, ...] over the low half of the
groups, hi over the high half - which lowers to the doubled-element unpack (unpacklo_pd +
permute2f128 on AVX2, zip on NEON) rather than a general permute. The primitive for
complex FFT transposes and any group-structured SIMD. GROUP must divide LANES. Read moreSource§fn deinterleave_by<const GROUP: usize>(self, other: Self) -> (Self, Self)
fn deinterleave_by<const GROUP: usize>(self, other: Self) -> (Self, Self)
interleave_by - group-granularity de-interleave.Source§fn interleave_radix<const N: usize>(inputs: [Self; N]) -> [Self; N]
fn interleave_radix<const N: usize>(inputs: [Self; N]) -> [Self; N]
N interleave: the generic sibling of interleave
(N == 2). Treats the N inputs as one contiguous N * LANES span and
gives out with concat(out)[q * N + r] == inputs[r].extract(q). Read moreSource§fn deinterleave_radix<const N: usize>(inputs: [Self; N]) -> [Self; N]
fn deinterleave_radix<const N: usize>(inputs: [Self; N]) -> [Self; N]
interleave_radix - radix-N
de-interleave: out[r].extract(q) == concat(inputs)[q * N + r].Source§fn deinterleave_radix_by<const N: usize, const GROUP: usize>(
inputs: [Self; N],
) -> [Self; N]
fn deinterleave_radix_by<const N: usize, const GROUP: usize>( inputs: [Self; N], ) -> [Self; N]
N de-interleave: the two-axis unification of
deinterleave_radix (GROUP == 1) and
deinterleave_by (N == 2). Each vector is viewed
as LANES / GROUP groups of GROUP consecutive elements; out[r] group q
is the (q * N + r)-th group of the concatenated input sequence, each group
moving as a unit. Read moreSource§fn interleave_radix_by<const N: usize, const GROUP: usize>(
inputs: [Self; N],
) -> [Self; N]
fn interleave_radix_by<const N: usize, const GROUP: usize>( inputs: [Self; N], ) -> [Self; N]
deinterleave_radix_by -
group-granularity radix-N interleave. For the square case it is the same
(self-inverse) register-array transpose.Source§unsafe fn load_deinterleaved<const N: usize>(
ptr: *const Self::Element,
) -> [Self; N]
unsafe fn load_deinterleaved<const N: usize>( ptr: *const Self::Element, ) -> [Self; N]
N interleaved (array-of-structures) streams and de-interleave them
into N vectors: reads N * LANES contiguous elements from ptr and
returns out with out[j].extract(lane) == ptr[lane * N + j]. Read moreSource§unsafe fn store_interleaved<const N: usize>(
ptr: *mut Self::Element,
values: [Self; N],
)
unsafe fn store_interleaved<const N: usize>( ptr: *mut Self::Element, values: [Self; N], )
N vectors and store them contiguously as an
array-of-structures: writes N * LANES elements such that
ptr[lane * N + j] == values[j].extract(lane). Read moreSource§unsafe fn load_deinterleaved_arrays<const M: usize, const C: usize>(
ptr: *const Self::Element,
) -> [[Self; C]; M]
unsafe fn load_deinterleaved_arrays<const M: usize, const C: usize>( ptr: *const Self::Element, ) -> [[Self; C]; M]
M interleaved AoS records of C components each and de-interleave
them: reads M * C * LANES contiguous elements, and out[j][c] holds
component c of record j
(out[j][c].extract(lane) == ptr[lane * M * C + j * C + c]). Read moreSource§unsafe fn store_interleaved_arrays<const M: usize, const C: usize>(
ptr: *mut Self::Element,
values: [[Self; C]; M],
)
unsafe fn store_interleaved_arrays<const M: usize, const C: usize>( ptr: *mut Self::Element, values: [[Self; C]; M], )
M records of C components and store them contiguously - the
exact inverse of
load_deinterleaved_arrays, with the
same lane-wise default. Read moreSource§unsafe fn load_deinterleaved_grouped<const M: usize, const TAIL: usize>(
ptr: *const Self::Element,
) -> [StreamGroup<Self, TAIL>; M]
unsafe fn load_deinterleaved_grouped<const M: usize, const TAIL: usize>( ptr: *const Self::Element, ) -> [StreamGroup<Self, TAIL>; M]
M interleaved composite streams of 1 + TAIL components each and
de-interleave them into M StreamGroups: reads
M * (TAIL + 1) * LANES contiguous elements, and group j’s
head/tail[c - 1] hold the de-interleaved components of composite
stream j. See StreamGroup for why the component count is a
separate const generic, and
Register::load_deinterleaved_grouped
for the register-level strategy. Read moreSource§unsafe fn store_interleaved_grouped<const M: usize, const TAIL: usize>(
ptr: *mut Self::Element,
values: [StreamGroup<Self, TAIL>; M],
)
unsafe fn store_interleaved_grouped<const M: usize, const TAIL: usize>( ptr: *mut Self::Element, values: [StreamGroup<Self, TAIL>; M], )
M StreamGroups and store them as a contiguous
array-of-structures - the exact inverse of
load_deinterleaved_grouped, with
the same lane-wise default and the same override expectations. Read moreSource§fn splat_m(src: Self, mask: Mask<R>, value: Self::Element) -> Self
fn splat_m(src: Self, mask: Mask<R>, value: Self::Element) -> Self
splat with src using mask.Source§fn splat_z(mask: Mask<R>, value: Self::Element) -> Self
fn splat_z(mask: Mask<R>, value: Self::Element) -> Self
splat masked (zeroed where mask is false).Source§fn broadcast_c<const I: usize>(self, mask: Mask<R>) -> Self
fn broadcast_c<const I: usize>(self, mask: Mask<R>) -> Self
broadcast when mask is true, returns self where false.Source§fn broadcast_m<const I: usize>(self, src: Self, mask: Mask<R>) -> Self
fn broadcast_m<const I: usize>(self, src: Self, mask: Mask<R>) -> Self
broadcast with src using mask.Source§fn broadcast_z<const I: usize>(self, mask: Mask<R>) -> Self
fn broadcast_z<const I: usize>(self, mask: Mask<R>) -> Self
broadcast masked (zeroed where mask is false).Source§fn broadcastv_c(self, mask: Mask<R>, idx: usize) -> Self
fn broadcastv_c(self, mask: Mask<R>, idx: usize) -> Self
Source§fn broadcastv_m(self, src: Self, mask: Mask<R>, idx: usize) -> Self
fn broadcastv_m(self, src: Self, mask: Mask<R>, idx: usize) -> Self
Source§fn broadcastv_z(self, mask: Mask<R>, idx: usize) -> Self
fn broadcastv_z(self, mask: Mask<R>, idx: usize) -> Self
Source§fn reverse_c(self, mask: Mask<R>) -> Self
fn reverse_c(self, mask: Mask<R>) -> Self
Source§fn reverse_m(self, src: Self, mask: Mask<R>) -> Self
fn reverse_m(self, src: Self, mask: Mask<R>) -> Self
Source§fn reverse_z(self, mask: Mask<R>) -> Self
fn reverse_z(self, mask: Mask<R>) -> Self
Source§fn swap_bytes_c(self, mask: Mask<R>) -> Self
fn swap_bytes_c(self, mask: Mask<R>) -> Self
Source§fn swap_bytes_m(self, src: Self, mask: Mask<R>) -> Self
fn swap_bytes_m(self, src: Self, mask: Mask<R>) -> Self
Source§fn swap_bytes_z(self, mask: Mask<R>) -> Self
fn swap_bytes_z(self, mask: Mask<R>) -> Self
Source§unsafe fn load_m(src: Self, mask: Mask<R>, ptr: *const Self::Element) -> Self
unsafe fn load_m(src: Self, mask: Mask<R>, ptr: *const Self::Element) -> Self
Source§unsafe fn load_z(mask: Mask<R>, ptr: *const Self::Element) -> Self
unsafe fn load_z(mask: Mask<R>, ptr: *const Self::Element) -> Self
Source§fn concat<INTO>(self, hi: Self) -> INTOwhere
INTO: ConcatVector<Self, Element = Self::Element>,
fn concat<INTO>(self, hi: Self) -> INTOwhere
INTO: ConcatVector<Self, Element = Self::Element>,
self as the lower half and hi as the upper half.Source§fn split<INTO: GenericVector>(self) -> (INTO, INTO)where
Self: ConcatVector<INTO, Element = INTO::Element>,
fn split<INTO: GenericVector>(self) -> (INTO, INTO)where
Self: ConcatVector<INTO, Element = INTO::Element>,
Source§fn extend<INTO>(self) -> INTOwhere
INTO: ExtendVector<Self, Element = Self::Element>,
fn extend<INTO>(self) -> INTOwhere
INTO: ExtendVector<Self, Element = Self::Element>,
Source§fn narrow<INTO: GenericVector>(self) -> INTOwhere
Self: ExtendVector<INTO, Element = INTO::Element>,
fn narrow<INTO: GenericVector>(self) -> INTOwhere
Self: ExtendVector<INTO, Element = INTO::Element>,
Source§fn align_slice(
slice: &[Self::Element],
) -> (&[Self::Element], &[Self], &[Self::Element])
fn align_slice( slice: &[Self::Element], ) -> (&[Self::Element], &[Self], &[Self::Element])
Source§fn align_slice_mut(
slice: &mut [Self::Element],
) -> (&mut [Self::Element], &mut [Self], &mut [Self::Element])
fn align_slice_mut( slice: &mut [Self::Element], ) -> (&mut [Self::Element], &mut [Self], &mut [Self::Element])
Source§fn from_slice(slice: &[Self::Element]) -> Self
fn from_slice(slice: &[Self::Element]) -> Self
Source§fn copy_to_slice(self, slice: &mut [Self::Element])
fn copy_to_slice(self, slice: &mut [Self::Element])
Source§fn iter_unaligned<'a>(
values: &'a [Self::Element],
) -> (Unaligned<'a, Self>, &'a [Self::Element])
fn iter_unaligned<'a>( values: &'a [Self::Element], ) -> (Unaligned<'a, Self>, &'a [Self::Element])
Source§fn iter_mut_unaligned<'a>(
values: &'a mut [Self::Element],
) -> (UnalignedMut<'a, Self>, &'a mut [Self::Element])
fn iter_mut_unaligned<'a>( values: &'a mut [Self::Element], ) -> (UnalignedMut<'a, Self>, &'a mut [Self::Element])
Source§fn stream_aligned_slice<'a>(
values: &'a [Self::Element],
) -> impl DoubleEndedIterator<Item = StreamingVector<'a, Self>>
fn stream_aligned_slice<'a>( values: &'a [Self::Element], ) -> impl DoubleEndedIterator<Item = StreamingVector<'a, Self>>
Source§fn stream_aligned_slice_mut<'a>(
values: &'a mut [Self::Element],
) -> impl DoubleEndedIterator<Item = StreamingVectorMut<'a, Self>>
fn stream_aligned_slice_mut<'a>( values: &'a mut [Self::Element], ) -> impl DoubleEndedIterator<Item = StreamingVectorMut<'a, Self>>
Source§fn gather<I: VectorIndices<Self>>(slice: &[Self::Element], indices: I) -> Self
fn gather<I: VectorIndices<Self>>(slice: &[Self::Element], indices: I) -> Self
Source§fn gather_or<I: VectorIndices<Self>>(
slice: &[Self::Element],
indices: I,
or: Self,
) -> Self
fn gather_or<I: VectorIndices<Self>>( slice: &[Self::Element], indices: I, or: Self, ) -> Self
or if the index is out of bounds. Read moreSource§fn gather_or_zero<I: VectorIndices<Self>>(
slice: &[Self::Element],
indices: I,
) -> Self
fn gather_or_zero<I: VectorIndices<Self>>( slice: &[Self::Element], indices: I, ) -> Self
Source§fn gather_if<I: VectorIndices<Self>>(
slice: &[Self::Element],
enable: Self::Mask,
indices: I,
or: Self,
) -> Self
fn gather_if<I: VectorIndices<Self>>( slice: &[Self::Element], enable: Self::Mask, indices: I, or: Self, ) -> Self
or if the enable mask is
false OR if any index is out of bounds. Read moreSource§fn scatter<I: VectorIndices<Self>>(
self,
slice: &mut [Self::Element],
indices: I,
)
fn scatter<I: VectorIndices<Self>>( self, slice: &mut [Self::Element], indices: I, )
Source§fn scatter_if<I: VectorIndices<Self>>(
self,
slice: &mut [Self::Element],
enable: Self::Mask,
indices: I,
)
fn scatter_if<I: VectorIndices<Self>>( self, slice: &mut [Self::Element], enable: Self::Mask, indices: I, )
enable mask is true.
If the index is outside of the bounds of the provided slice, the write is suppressed without panicking.Source§fn lookup(values: &[Self::Element], indices: Self::Unsigned) -> Self
fn lookup(values: &[Self::Element], indices: Self::Unsigned) -> Self
Source§fn prefix_mask(n: usize) -> Self::Mask
fn prefix_mask(n: usize) -> Self::Mask
Source§fn suffix_mask(n: usize) -> Self::Mask
fn suffix_mask(n: usize) -> Self::Mask
Source§fn cast<INTO>(self) -> INTOwhere
INTO: CastVector<Self>,
fn cast<INTO>(self) -> INTOwhere
INTO: CastVector<Self>,
as operator on the underlying scalar elements for in-range, finite
inputs. Read moreSource§fn fast_cast<INTO>(self) -> INTOwhere
INTO: CastVector<Self>,
fn fast_cast<INTO>(self) -> INTOwhere
INTO: CastVector<Self>,
Source§fn into_bits<INTO>(self) -> INTOwhere
INTO: BitCastVector<Self>,
fn into_bits<INTO>(self) -> INTOwhere
INTO: BitCastVector<Self>,
Source§fn saturating_cast<INTO>(self) -> INTOwhere
INTO: CastVector<Self>,
fn saturating_cast<INTO>(self) -> INTOwhere
INTO: CastVector<Self>,
Source§impl<R, I> IndexableVector<Vector<I>> for Vector<R>
impl<R, I> IndexableVector<Vector<I>> for Vector<R>
Source§unsafe fn gather_ptr(ptr: *const Self::Element, indices: Vector<I>) -> Self
unsafe fn gather_ptr(ptr: *const Self::Element, indices: Vector<I>) -> Self
ptr[indices[lane]]. Read moreSource§unsafe fn gather_ptr_m(
src: Self,
mask: Self::Mask,
ptr: *const Self::Element,
indices: Vector<I>,
) -> Self
unsafe fn gather_ptr_m( src: Self, mask: Self::Mask, ptr: *const Self::Element, indices: Vector<I>, ) -> Self
gather_ptr, but only lanes where mask is
true are loaded; the rest are taken from src. Read moreSource§unsafe fn gather_ptr_z(
mask: Self::Mask,
ptr: *const Self::Element,
indices: Vector<I>,
) -> Self
unsafe fn gather_ptr_z( mask: Self::Mask, ptr: *const Self::Element, indices: Vector<I>, ) -> Self
gather_ptr_m, but masked-off lanes are
zeroed instead of taken from a source vector. Read moreSource§impl<R: IntegerRegister> IntegerVector for Vector<R>where
R::Element: Denominator,
impl<R: IntegerRegister> IntegerVector for Vector<R>where
R::Element: Denominator,
Source§type Divider = Divider<<R as Register>::Element>
type Divider = Divider<<R as Register>::Element>
crate::Divider.Source§type BranchfreeDivider = BranchfreeDivider<<R as Register>::Element>
type BranchfreeDivider = BranchfreeDivider<<R as Register>::Element>
Divider. Slightly slower for
some divisors but always emits straight-line code with no conditional
branches, which is what you want inside a hot SIMD loop.Source§type VectorizedDivider = VectorDivider<R>
type VectorizedDivider = VectorDivider<R>
to_divider.
Used when each lane needs a different (but loop-invariant) divisor.Source§fn mulhi(self, other: Self) -> Self
fn mulhi(self, other: Self) -> Self
Source§fn mullo(self, other: Self) -> Self
fn mullo(self, other: Self) -> Self
Source§fn saturating_add(self, other: Self) -> Self
fn saturating_add(self, other: Self) -> Self
MIN..=MAX) on overflow.Source§fn saturating_sub(self, other: Self) -> Self
fn saturating_sub(self, other: Self) -> Self
MIN..=MAX) on overflow.Source§fn wrapping_sum(self) -> Self::Element
fn wrapping_sum(self) -> Self::Element
Source§fn wrapping_prod(self) -> Self::Element
fn wrapping_prod(self) -> Self::Element
Source§fn create_divider(d: Self::Element) -> Self::Divider
fn create_divider(d: Self::Element) -> Self::Divider
Source§fn create_branchfree_divider(d: Self::Element) -> Self::BranchfreeDivider
fn create_branchfree_divider(d: Self::Element) -> Self::BranchfreeDivider
BranchfreeDivider for a single
scalar divisor d. Prefer this over create_divider
inside tight SIMD loops where conditional branches would hurt
throughput.Source§fn to_divider(self) -> Self::VectorizedDivider
fn to_divider(self) -> Self::VectorizedDivider
Source§fn count_ones(self) -> Self
fn count_ones(self) -> Self
Source§fn count_zeros(self) -> Self
fn count_zeros(self) -> Self
Source§fn leading_ones(self) -> Self
fn leading_ones(self) -> Self
Source§fn leading_zeros(self) -> Self
fn leading_zeros(self) -> Self
Source§fn trailing_ones(self) -> Self
fn trailing_ones(self) -> Self
Source§fn trailing_zeros(self) -> Self
fn trailing_zeros(self) -> Self
Source§fn count_conflicts(self) -> Self
fn count_conflicts(self) -> Self
out[i] == |{ j < i : self[j] == self[i] }|. Read moreSource§fn mulhi_c(self, mask: Mask<R>, other: Self) -> Self
fn mulhi_c(self, mask: Mask<R>, other: Self) -> Self
Source§fn mulhi_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn mulhi_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
Source§fn mulhi_z(self, mask: Mask<R>, other: Self) -> Self
fn mulhi_z(self, mask: Mask<R>, other: Self) -> Self
Source§fn mullo_c(self, mask: Mask<R>, other: Self) -> Self
fn mullo_c(self, mask: Mask<R>, other: Self) -> Self
Source§fn mullo_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn mullo_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
Source§fn mullo_z(self, mask: Mask<R>, other: Self) -> Self
fn mullo_z(self, mask: Mask<R>, other: Self) -> Self
Source§fn saturating_add_c(self, mask: Mask<R>, other: Self) -> Self
fn saturating_add_c(self, mask: Mask<R>, other: Self) -> Self
MIN..=MAX) on overflow.
Computes saturating_add when mask is true, returns self where false.Source§fn saturating_add_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn saturating_add_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
MIN..=MAX) on overflow.
Merges saturating_add with src using mask.Source§fn saturating_add_z(self, mask: Mask<R>, other: Self) -> Self
fn saturating_add_z(self, mask: Mask<R>, other: Self) -> Self
MIN..=MAX) on overflow.
Computes saturating_add masked (zeroed where mask is false).Source§fn saturating_sub_c(self, mask: Mask<R>, other: Self) -> Self
fn saturating_sub_c(self, mask: Mask<R>, other: Self) -> Self
MIN..=MAX) on overflow.
Computes saturating_sub when mask is true, returns self where false.Source§fn saturating_sub_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn saturating_sub_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
MIN..=MAX) on overflow.
Merges saturating_sub with src using mask.Source§fn saturating_sub_z(self, mask: Mask<R>, other: Self) -> Self
fn saturating_sub_z(self, mask: Mask<R>, other: Self) -> Self
MIN..=MAX) on overflow.
Computes saturating_sub masked (zeroed where mask is false).Source§fn count_ones_c(self, mask: Mask<R>) -> Self
fn count_ones_c(self, mask: Mask<R>) -> Self
count_ones when mask is true, returns self where false.Source§fn count_ones_m(self, src: Self, mask: Mask<R>) -> Self
fn count_ones_m(self, src: Self, mask: Mask<R>) -> Self
count_ones with src using mask.Source§fn count_ones_z(self, mask: Mask<R>) -> Self
fn count_ones_z(self, mask: Mask<R>) -> Self
count_ones masked (zeroed where mask is false).Source§fn count_zeros_c(self, mask: Mask<R>) -> Self
fn count_zeros_c(self, mask: Mask<R>) -> Self
count_zeros when mask is true, returns self where false.Source§fn count_zeros_m(self, src: Self, mask: Mask<R>) -> Self
fn count_zeros_m(self, src: Self, mask: Mask<R>) -> Self
count_zeros with src using mask.Source§fn count_zeros_z(self, mask: Mask<R>) -> Self
fn count_zeros_z(self, mask: Mask<R>) -> Self
count_zeros masked (zeroed where mask is false).Source§fn leading_ones_c(self, mask: Mask<R>) -> Self
fn leading_ones_c(self, mask: Mask<R>) -> Self
leading_ones when mask is true, returns self where false.Source§fn leading_ones_m(self, src: Self, mask: Mask<R>) -> Self
fn leading_ones_m(self, src: Self, mask: Mask<R>) -> Self
leading_ones with src using mask.Source§fn leading_ones_z(self, mask: Mask<R>) -> Self
fn leading_ones_z(self, mask: Mask<R>) -> Self
leading_ones masked (zeroed where mask is false).Source§fn leading_zeros_c(self, mask: Mask<R>) -> Self
fn leading_zeros_c(self, mask: Mask<R>) -> Self
leading_zeros when mask is true, returns self where false.Source§fn leading_zeros_m(self, src: Self, mask: Mask<R>) -> Self
fn leading_zeros_m(self, src: Self, mask: Mask<R>) -> Self
leading_zeros with src using mask.Source§fn leading_zeros_z(self, mask: Mask<R>) -> Self
fn leading_zeros_z(self, mask: Mask<R>) -> Self
leading_zeros masked (zeroed where mask is false).Source§fn trailing_ones_c(self, mask: Mask<R>) -> Self
fn trailing_ones_c(self, mask: Mask<R>) -> Self
trailing_ones when mask is true, returns self where false.Source§fn trailing_ones_m(self, src: Self, mask: Mask<R>) -> Self
fn trailing_ones_m(self, src: Self, mask: Mask<R>) -> Self
trailing_ones with src using mask.Source§fn trailing_ones_z(self, mask: Mask<R>) -> Self
fn trailing_ones_z(self, mask: Mask<R>) -> Self
trailing_ones masked (zeroed where mask is false).Source§fn trailing_zeros_c(self, mask: Mask<R>) -> Self
fn trailing_zeros_c(self, mask: Mask<R>) -> Self
trailing_zeros when mask is true, returns self where false.Source§fn trailing_zeros_m(self, src: Self, mask: Mask<R>) -> Self
fn trailing_zeros_m(self, src: Self, mask: Mask<R>) -> Self
trailing_zeros with src using mask.Source§fn trailing_zeros_z(self, mask: Mask<R>) -> Self
fn trailing_zeros_z(self, mask: Mask<R>) -> Self
trailing_zeros masked (zeroed where mask is false).Source§impl<R: Register> Interleave for Vector<R>
impl<R: Register> Interleave for Vector<R>
Source§fn interleave(self, other: Self) -> (Self, Self)
fn interleave(self, other: Self) -> (Self, Self)
Source§fn deinterleave(self, other: Self) -> (Self, Self)
fn deinterleave(self, other: Self) -> (Self, Self)
interleave. Read moreSource§impl<R: LinAlg3Register> LinAlg3Vector for Vector<R>
impl<R: LinAlg3Register> LinAlg3Vector for Vector<R>
Source§fn dot3(self, other: Self) -> Self::Element
fn dot3(self, other: Self) -> Self::Element
Source§fn cross3<const DOP: bool>(self, other: Self) -> Self
fn cross3<const DOP: bool>(self, other: Self) -> Self
Source§fn refract(self, n: Self, eta: Self::Element) -> Self
fn refract(self, n: Self, eta: Self::Element) -> Self
self through a surface with normal n
and relative index of refraction eta ($\eta = \eta_i/\eta_t$). self and n are
assumed unit length. Read moreSource§fn min_element3(self) -> Self::Element
fn min_element3(self) -> Self::Element
Source§fn max_element3(self) -> Self::Element
fn max_element3(self) -> Self::Element
Source§fn sum_elements3(self) -> Self::Element
fn sum_elements3(self) -> Self::Element
Source§fn prod_elements3(self) -> Self::Element
fn prod_elements3(self) -> Self::Element
Source§fn mat3_vec3_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 3]) -> Self
fn mat3_vec3_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 3]) -> Self
self as the vector.Source§fn mat3_vec3_product_array<const COLUMN_MAJOR: bool, const N: usize>(
m: &[Self; 3],
vectors: &[Self; N],
) -> [Self; N]
fn mat3_vec3_product_array<const COLUMN_MAJOR: bool, const N: usize>( m: &[Self; 3], vectors: &[Self; N], ) -> [Self; N]
Source§fn mat3_product<const COLUMN_MAJOR: bool>(
lhs: &[Self; 3],
rhs: &[Self; 3],
) -> [Self; 3]
fn mat3_product<const COLUMN_MAJOR: bool>( lhs: &[Self; 3], rhs: &[Self; 3], ) -> [Self; 3]
Source§fn mat3_inverse_inplace(m: &mut [Self; 3]) -> Self::Element
fn mat3_inverse_inplace(m: &mut [Self; 3]) -> Self::Element
Source§impl<R: LinAlg4Register> LinAlg4Vector for Vector<R>
impl<R: LinAlg4Register> LinAlg4Vector for Vector<R>
Source§fn dot4(self, other: Self) -> Self::Element
fn dot4(self, other: Self) -> Self::Element
Source§fn quat4_product(self, other: Self) -> Self
fn quat4_product(self, other: Self) -> Self
Source§fn quat4_vec3_product<const DOP: bool>(self, vec: Self) -> Self
fn quat4_vec3_product<const DOP: bool>(self, vec: Self) -> Self
Source§fn quat_to_mat3<const COLUMN_MAJOR: bool>(self) -> [Self; 3]
fn quat_to_mat3<const COLUMN_MAJOR: bool>(self) -> [Self; 3]
Source§fn quat_to_mat4<const COLUMN_MAJOR: bool>(self) -> [Self; 4]
fn quat_to_mat4<const COLUMN_MAJOR: bool>(self) -> [Self; 4]
quat_to_mat3 rotation with each rotation
register’s 4th lane zeroed and a [0, 0, 0, 1] 4th register.
COLUMN_MAJOR is forwarded to quat_to_mat3.Source§fn mat4_transpose(m: &[Self; 4]) -> [Self; 4]
fn mat4_transpose(m: &[Self; 4]) -> [Self; 4]
Source§fn mat4_vec4_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 4]) -> Self
fn mat4_vec4_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 4]) -> Self
self as the vector. Read moreSource§fn mat4_vec3_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 4]) -> Self
fn mat4_vec3_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 4]) -> Self
Source§fn mat4_vec3_product_array<const COLUMN_MAJOR: bool, const N: usize>(
m: &[Self; 4],
vectors: &[Self; N],
) -> [Self; N]
fn mat4_vec3_product_array<const COLUMN_MAJOR: bool, const N: usize>( m: &[Self; 4], vectors: &[Self; N], ) -> [Self; N]
Source§fn mat4_point3_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 4]) -> Self
fn mat4_point3_product<const COLUMN_MAJOR: bool>(self, m: &[Self; 4]) -> Self
Source§fn mat4_point3_product_array<const COLUMN_MAJOR: bool, const N: usize>(
m: &[Self; 4],
vectors: &[Self; N],
) -> [Self; N]
fn mat4_point3_product_array<const COLUMN_MAJOR: bool, const N: usize>( m: &[Self; 4], vectors: &[Self; N], ) -> [Self; N]
N 3D points (small-N batch).Source§fn mat4_product<const COLUMN_MAJOR: bool>(
lhs: &[Self; 4],
rhs: &[Self; 4],
) -> [Self; 4]
fn mat4_product<const COLUMN_MAJOR: bool>( lhs: &[Self; 4], rhs: &[Self; 4], ) -> [Self; 4]
Source§fn mat4_vec4_product_array<const COLUMN_MAJOR: bool, const N: usize>(
m: &[Self; 4],
vectors: &[Self; N],
) -> [Self; N]
fn mat4_vec4_product_array<const COLUMN_MAJOR: bool, const N: usize>( m: &[Self; 4], vectors: &[Self; N], ) -> [Self; N]
N vectors by a single 4x4 matrix, returning the transformed array. Read moreSource§fn mat4_det(m: &[Self; 4]) -> Self::Element
fn mat4_det(m: &[Self; 4]) -> Self::Element
Source§impl<R: FloatRegister> MulAddAssignExt for Vector<R>
impl<R: FloatRegister> MulAddAssignExt for Vector<R>
Source§fn mul_add_assign(&mut self, a: Self, b: Self)
fn mul_add_assign(&mut self, a: Self, b: Self)
Source§fn mul_sub_assign(&mut self, a: Self, b: Self)
fn mul_sub_assign(&mut self, a: Self, b: Self)
Source§fn nmul_add_assign(&mut self, a: Self, b: Self)
fn nmul_add_assign(&mut self, a: Self, b: Self)
Source§fn nmul_sub_assign(&mut self, a: Self, b: Self)
fn nmul_sub_assign(&mut self, a: Self, b: Self)
Source§fn mul_adde_assign(&mut self, a: Self, b: Self)
fn mul_adde_assign(&mut self, a: Self, b: Self)
Source§fn mul_sube_assign(&mut self, a: Self, b: Self)
fn mul_sube_assign(&mut self, a: Self, b: Self)
Source§fn nmul_adde_assign(&mut self, a: Self, b: Self)
fn nmul_adde_assign(&mut self, a: Self, b: Self)
Source§fn nmul_sube_assign(&mut self, a: Self, b: Self)
fn nmul_sube_assign(&mut self, a: Self, b: Self)
Source§impl<R: FloatRegister> MulAddAssignExtMasked<Mask<R>> for Vector<R>
impl<R: FloatRegister> MulAddAssignExtMasked<Mask<R>> for Vector<R>
Source§fn mul_add_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_add_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_add_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn mul_add_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_add_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_add_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_sub_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_sub_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_sub_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn mul_sub_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_sub_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_sub_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_add_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_add_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_add_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn nmul_add_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_add_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_add_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_sub_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_sub_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_sub_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn nmul_sub_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_sub_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_sub_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_adde_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_adde_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_adde_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn mul_adde_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_adde_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_adde_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_sube_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_sube_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_sube_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn mul_sube_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn mul_sube_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn mul_sube_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_adde_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_adde_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_adde_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn nmul_adde_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_adde_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_adde_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_sube_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_sube_assign_c(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_sube_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
fn nmul_sube_assign_m(&mut self, src: Self, mask: Mask<R>, a: Self, b: Self)
Source§fn nmul_sube_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
fn nmul_sube_assign_z(&mut self, mask: Mask<R>, a: Self, b: Self)
Source§impl<R: FloatRegister> MulAddExt for Vector<R>
impl<R: FloatRegister> MulAddExt for Vector<R>
Source§const HAS_TRUE_FMA: bool = R::HAS_TRUE_FMA
const HAS_TRUE_FMA: bool = R::HAS_TRUE_FMA
Source§fn mul_add(self, a: Self, b: Self) -> Self::Output
fn mul_add(self, a: Self, b: Self) -> Self::Output
Source§fn mul_sub(self, a: Self, b: Self) -> Self::Output
fn mul_sub(self, a: Self, b: Self) -> Self::Output
Source§fn nmul_add(self, a: Self, b: Self) -> Self::Output
fn nmul_add(self, a: Self, b: Self) -> Self::Output
Source§fn nmul_sub(self, a: Self, b: Self) -> Self::Output
fn nmul_sub(self, a: Self, b: Self) -> Self::Output
Source§fn mul_adde(self, a: Self, b: Self) -> Self::Output
fn mul_adde(self, a: Self, b: Self) -> Self::Output
Source§fn mul_sube(self, a: Self, b: Self) -> Self::Output
fn mul_sube(self, a: Self, b: Self) -> Self::Output
Source§impl<R: FloatRegister> MulAddExtMasked<Mask<R>> for Vector<R>
impl<R: FloatRegister> MulAddExtMasked<Mask<R>> for Vector<R>
Source§fn mul_add_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_add_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_add_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_add_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_add_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_add_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_sub_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_sub_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_sub_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_sub_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_sub_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_sub_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_add_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_add_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_add_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_add_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_add_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_add_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_sub_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_sub_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_sub_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_sub_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_sub_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_sub_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_adde_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_adde_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_adde_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_adde_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_adde_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_adde_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_sube_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_sube_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_sube_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_sube_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn mul_sube_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn mul_sube_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_adde_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_adde_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_adde_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_adde_m(self, src: Self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_adde_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_adde_z(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§fn nmul_sube_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
fn nmul_sube_c(self, mask: Mask<R>, a: Self, b: Self) -> Self::Output
Source§impl<R: NumericRegister + Register> MulAssign for Vector<R>
impl<R: NumericRegister + Register> MulAssign for Vector<R>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl<R: NumericRegister + Register> MulAssignMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> MulAssignMasked<Mask<R>> for Vector<R>
Source§fn mul_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn mul_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn mul_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn mul_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn mul_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn mul_assign_z(&mut self, mask: Mask<R>, rhs: Self)
MulAssign masked (zeroed where mask is false).Source§impl<R: NumericRegister + Register> MulMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> MulMasked<Mask<R>> for Vector<R>
Source§impl<R: SignedRegister> Neg for Vector<R>
impl<R: SignedRegister> Neg for Vector<R>
Source§impl<R: SignedRegister> NegMasked<Mask<R>> for Vector<R>
impl<R: SignedRegister> NegMasked<Mask<R>> for Vector<R>
Source§impl<R: Register> NewVector<<R as Register>::Element, <R as CoreRegister>::Lanes> for Vector<R>
impl<R: Register> NewVector<<R as Register>::Element, <R as CoreRegister>::Lanes> for Vector<R>
Source§impl<R: BitwiseRegister + Register> NotMasked<Mask<R>> for Vector<R>
impl<R: BitwiseRegister + Register> NotMasked<Mask<R>> for Vector<R>
Source§impl<R: NumericRegister> NumericVector for Vector<R>
impl<R: NumericRegister> NumericVector for Vector<R>
Source§fn to_signed_integer(self) -> Self::Signed
fn to_signed_integer(self) -> Self::Signed
as semantics -
round toward zero, saturating at the bounds, NaN to zero. Read moreSource§fn from_signed_integer(v: Self::Signed) -> Self
fn from_signed_integer(v: Self::Signed) -> Self
as semantics. Read moreSource§fn to_unsigned_integer(self) -> Self::Unsigned
fn to_unsigned_integer(self) -> Self::Unsigned
as semantics.
See to_signed_integer.Source§fn from_unsigned_integer(v: Self::Unsigned) -> Self
fn from_unsigned_integer(v: Self::Unsigned) -> Self
as semantics.
See from_signed_integer.Source§fn fast_to_signed_integer(self) -> Self::Signed
fn fast_to_signed_integer(self) -> Self::Signed
to_signed_integer, but may relax IEEE corner
cases (out-of-range and NaN inputs) for speed. Defaults to the exact form.Source§fn fast_to_unsigned_integer(self) -> Self::Unsigned
fn fast_to_unsigned_integer(self) -> Self::Unsigned
to_unsigned_integer, but may relax IEEE
corner cases. Defaults to the exact form.Source§fn is_zero(self) -> Self::Mask
fn is_zero(self) -> Self::Mask
Source§fn is_all_zero(self) -> bool
fn is_all_zero(self) -> bool
Source§fn bitonic_clean_by<O: SortOrder>(self) -> Self
fn bitonic_clean_by<O: SortOrder>(self) -> Self
O order - one that rises then
falls, or a rotation of one. Read moreSource§fn prefix_sum(self) -> Self
fn prefix_sum(self) -> Self
out[i] = self[0] + .. + self[i]. Read moreSource§fn prefix_min(self) -> Self
fn prefix_min(self) -> Self
out[i] = min(self[0], .., self[i]). Read moreSource§fn prefix_max(self) -> Self
fn prefix_max(self) -> Self
out[i] = max(self[0], .., self[i]). Read moreSource§fn reverse_prefix_sum(self) -> Self
fn reverse_prefix_sum(self) -> Self
out[i] = self[i] + .. + self[LANES-1].Source§fn reverse_prefix_min(self) -> Self
fn reverse_prefix_min(self) -> Self
out[i] = min(self[i], .., self[LANES-1]). Read moreSource§fn reverse_prefix_max(self) -> Self
fn reverse_prefix_max(self) -> Self
out[i] = max(self[i], .., self[LANES-1]). Read moreSource§fn clamp(self, min: Self, max: Self) -> Self
fn clamp(self, min: Self, max: Self) -> Self
Source§fn min_element(self) -> Self::Element
fn min_element(self) -> Self::Element
Source§fn max_element(self) -> Self::Element
fn max_element(self) -> Self::Element
Source§fn min_max_element(self) -> (Self::Element, Self::Element)
fn min_max_element(self) -> (Self::Element, Self::Element)
Source§fn arg_minmax(self) -> (usize, usize)
fn arg_minmax(self) -> (usize, usize)
Source§fn scale(self, factor: Self::Element) -> Self
fn scale(self, factor: Self::Element) -> Self
Source§fn pairwise_sum(lo: Self, hi: Self) -> Self
fn pairwise_sum(lo: Self, hi: Self) -> Self
Source§fn relaxed_pairwise_sum(lo: Self, hi: Self) -> Self
fn relaxed_pairwise_sum(lo: Self, hi: Self) -> Self
pairwise_sum, but may return a relaxed (implementation-defined)
lane ordering for performance. Treat this as if randomly shuffling the result of
pairwise_sum, with better performance than pairwise_sum. Read moreSource§fn sum_elements(self) -> Self::Element
fn sum_elements(self) -> Self::Element
Source§fn prod_elements(self) -> Self::Element
fn prod_elements(self) -> Self::Element
Source§fn indexed() -> Self
fn indexed() -> Self
[0, 1, 2, ..., LANES-1]. Read moreSource§fn min_c(self, mask: Mask<R>, other: Self) -> Self
fn min_c(self, mask: Mask<R>, other: Self) -> Self
min when mask is true, returns self where false.Source§fn min_z(self, mask: Mask<R>, other: Self) -> Self
fn min_z(self, mask: Mask<R>, other: Self) -> Self
min masked (zeroed where mask is false).Source§fn max_c(self, mask: Mask<R>, other: Self) -> Self
fn max_c(self, mask: Mask<R>, other: Self) -> Self
max when mask is true, returns self where false.Source§fn max_z(self, mask: Mask<R>, other: Self) -> Self
fn max_z(self, mask: Mask<R>, other: Self) -> Self
max masked (zeroed where mask is false).Source§fn scale_c(self, mask: Mask<R>, factor: Self::Element) -> Self
fn scale_c(self, mask: Mask<R>, factor: Self::Element) -> Self
Source§fn scale_m(self, src: Self, mask: Mask<R>, factor: Self::Element) -> Self
fn scale_m(self, src: Self, mask: Mask<R>, factor: Self::Element) -> Self
Source§fn scale_z(self, mask: Mask<R>, factor: Self::Element) -> Self
fn scale_z(self, mask: Mask<R>, factor: Self::Element) -> Self
Source§fn sort(self) -> Self
fn sort(self) -> Self
sort_by::<Ascending>.Source§fn bitonic_clean(self) -> Self
fn bitonic_clean(self) -> Self
bitonic_clean_by::<Ascending>.Source§impl<R: NumericRegister> One for Vector<R>
impl<R: NumericRegister> One for Vector<R>
Source§impl<S, R, FR, B> PackedFloatVector<S, Vector<FR>> for Vector<R>where
S: FloatSpec,
B: CastRegister<R>,
FR: FloatRegister<Element = f32, Lanes = R::Lanes, Bits = B>,
R: PackedFloatRegister<S, FR> + CastRegister<B>,
impl<S, R, FR, B> PackedFloatVector<S, Vector<FR>> for Vector<R>where
S: FloatSpec,
B: CastRegister<R>,
FR: FloatRegister<Element = f32, Lanes = R::Lanes, Bits = B>,
R: PackedFloatRegister<S, FR> + CastRegister<B>,
Source§impl<R: PartialOrdRegister> PartialEq for Vector<R>
impl<R: PartialOrdRegister> PartialEq for Vector<R>
Source§impl<R: PartialOrdRegister> PartialOrdVector for Vector<R>
impl<R: PartialOrdRegister> PartialOrdVector for Vector<R>
Source§fn group_by_value(self, valid: Self::Mask) -> ValueGroups<Self> ⓘ
fn group_by_value(self, valid: Self::Mask) -> ValueGroups<Self> ⓘ
valid into groups of equal value. Read moreSource§impl<R: NumericRegister> Product for Vector<R>
impl<R: NumericRegister> Product for Vector<R>
Source§impl<R: NumericRegister + Register> RemAssign for Vector<R>
impl<R: NumericRegister + Register> RemAssign for Vector<R>
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
%= operation. Read moreSource§impl<R: NumericRegister + Register> RemAssignMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> RemAssignMasked<Mask<R>> for Vector<R>
Source§fn rem_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn rem_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn rem_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn rem_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn rem_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn rem_assign_z(&mut self, mask: Mask<R>, rhs: Self)
RemAssign masked (zeroed where mask is false).Source§impl<R: NumericRegister + Register> RemMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> RemMasked<Mask<R>> for Vector<R>
Source§impl<R, W> Sad16Vector<Vector<W>> for Vector<R>
impl<R, W> Sad16Vector<Vector<W>> for Vector<R>
Source§impl<R, W> Sad32Vector<Vector<W>> for Vector<R>
impl<R, W> Sad32Vector<Vector<W>> for Vector<R>
Source§impl<R, W> Sad64Vector<Vector<W>> for Vector<R>
impl<R, W> Sad64Vector<Vector<W>> for Vector<R>
Source§impl<R: IntegerRegister> Saturating for Vector<R>
impl<R: IntegerRegister> Saturating for Vector<R>
Source§fn saturating_add(self, v: Self) -> Self
fn saturating_add(self, v: Self) -> Self
Source§fn saturating_sub(self, v: Self) -> Self
fn saturating_sub(self, v: Self) -> Self
Source§impl<R: IntegerRegister> SaturatingAdd for Vector<R>
impl<R: IntegerRegister> SaturatingAdd for Vector<R>
Source§fn saturating_add(&self, v: &Self) -> Self
fn saturating_add(&self, v: &Self) -> Self
self + other, saturating at the relevant high or low boundary of
the type.Source§impl<R: IntegerRegister> SaturatingSub for Vector<R>
impl<R: IntegerRegister> SaturatingSub for Vector<R>
Source§fn saturating_sub(&self, v: &Self) -> Self
fn saturating_sub(&self, v: &Self) -> Self
self - other, saturating at the relevant high or low boundary of
the type.Source§impl<R: Register> Selectable<R> for Vector<R>
impl<R: Register> Selectable<R> for Vector<R>
Source§impl<R: BitshiftRegister> ShlAssign<u32> for Vector<R>
impl<R: BitshiftRegister> ShlAssign<u32> for Vector<R>
Source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
<<= operation. Read moreSource§impl<R: BitshiftRegister> ShlAssignMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
impl<R: BitshiftRegister> ShlAssignMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
Source§impl<R: BitshiftRegister> ShlAssignMasked<Mask<R>, u32> for Vector<R>
impl<R: BitshiftRegister> ShlAssignMasked<Mask<R>, u32> for Vector<R>
Source§fn shl_assign_c(&mut self, mask: Mask<R>, rhs: u32)
fn shl_assign_c(&mut self, mask: Mask<R>, rhs: u32)
Source§fn shl_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: u32)
fn shl_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: u32)
Source§impl<R: BitshiftRegister> ShlMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
impl<R: BitshiftRegister> ShlMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
Source§impl<R: BitshiftRegister> ShlMasked<Mask<R>, u32> for Vector<R>
impl<R: BitshiftRegister> ShlMasked<Mask<R>, u32> for Vector<R>
Source§impl<R: BitshiftRegister> ShrAssign<u32> for Vector<R>
impl<R: BitshiftRegister> ShrAssign<u32> for Vector<R>
Source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
>>= operation. Read moreSource§impl<R: BitshiftRegister> ShrAssignMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
impl<R: BitshiftRegister> ShrAssignMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
Source§impl<R: BitshiftRegister> ShrAssignMasked<Mask<R>, u32> for Vector<R>
impl<R: BitshiftRegister> ShrAssignMasked<Mask<R>, u32> for Vector<R>
Source§fn shr_assign_c(&mut self, mask: Mask<R>, rhs: u32)
fn shr_assign_c(&mut self, mask: Mask<R>, rhs: u32)
Source§fn shr_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: u32)
fn shr_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: u32)
Source§impl<R: BitshiftRegister> ShrMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
impl<R: BitshiftRegister> ShrMasked<Mask<R>, Vector<<R as Register>::Unsigned>> for Vector<R>
Source§impl<R: BitshiftRegister> ShrMasked<Mask<R>, u32> for Vector<R>
impl<R: BitshiftRegister> ShrMasked<Mask<R>, u32> for Vector<R>
Source§impl<R: SignedIntegerRegister> SignedIntegerVector for Vector<R>where
R::Element: Denominator,
impl<R: SignedIntegerRegister> SignedIntegerVector for Vector<R>where
R::Element: Denominator,
Source§fn srai<const I: i32>(self) -> Self
fn srai<const I: i32>(self) -> Self
Source§fn sra(self, count: u32) -> Self
fn sra(self, count: u32) -> Self
Source§fn srav(self, counts: Self::Unsigned) -> Self
fn srav(self, counts: Self::Unsigned) -> Self
Source§fn avg_floor(self, other: Self) -> Self
fn avg_floor(self, other: Self) -> Self
(a + b) >> 1 rounded toward -∞, computed without overflow.Source§fn avg_ceil(self, other: Self) -> Self
fn avg_ceil(self, other: Self) -> Self
(a + b + 1) >> 1 rounded toward +∞, computed without overflow.Source§fn mulhrs(self, other: Self) -> Self
fn mulhrs(self, other: Self) -> Self
Q(W-1) product
(self * other + 2^(W-2)) >> (W-1), where W is the element bit width. Read moreSource§fn srai_c<const I: i32>(self, mask: Mask<R>) -> Self
fn srai_c<const I: i32>(self, mask: Mask<R>) -> Self
srai when mask is true, returns self where false.Source§fn srai_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
fn srai_m<const I: i32>(self, src: Self, mask: Mask<R>) -> Self
srai with src using mask.Source§fn srai_z<const I: i32>(self, mask: Mask<R>) -> Self
fn srai_z<const I: i32>(self, mask: Mask<R>) -> Self
srai masked (zeroed where mask is false).Source§fn sra_c(self, mask: Mask<R>, count: u32) -> Self
fn sra_c(self, mask: Mask<R>, count: u32) -> Self
sra when mask is true, returns self where false.Source§fn sra_m(self, src: Self, mask: Mask<R>, count: u32) -> Self
fn sra_m(self, src: Self, mask: Mask<R>, count: u32) -> Self
sra with src using mask.Source§fn sra_z(self, mask: Mask<R>, count: u32) -> Self
fn sra_z(self, mask: Mask<R>, count: u32) -> Self
sra masked (zeroed where mask is false).Source§fn srav_c(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn srav_c(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
srav when mask is true, returns self where false.Source§fn srav_m(self, src: Self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn srav_m(self, src: Self, mask: Mask<R>, counts: Self::Unsigned) -> Self
srav with src using mask.Source§fn srav_z(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
fn srav_z(self, mask: Mask<R>, counts: Self::Unsigned) -> Self
srav masked (zeroed where mask is false).Source§fn avg_floor_c(self, mask: Mask<R>, other: Self) -> Self
fn avg_floor_c(self, mask: Mask<R>, other: Self) -> Self
(a + b) >> 1 rounded toward -∞, computed without overflow.
Computes avg_floor when mask is true, returns self where false.Source§fn avg_floor_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn avg_floor_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
(a + b) >> 1 rounded toward -∞, computed without overflow.
Merges avg_floor with src using mask.Source§fn avg_floor_z(self, mask: Mask<R>, other: Self) -> Self
fn avg_floor_z(self, mask: Mask<R>, other: Self) -> Self
(a + b) >> 1 rounded toward -∞, computed without overflow.
Computes avg_floor masked (zeroed where mask is false).Source§fn avg_ceil_c(self, mask: Mask<R>, other: Self) -> Self
fn avg_ceil_c(self, mask: Mask<R>, other: Self) -> Self
(a + b + 1) >> 1 rounded toward +∞, computed without overflow.
Computes avg_ceil when mask is true, returns self where false.Source§fn avg_ceil_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn avg_ceil_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
(a + b + 1) >> 1 rounded toward +∞, computed without overflow.
Merges avg_ceil with src using mask.Source§fn avg_ceil_z(self, mask: Mask<R>, other: Self) -> Self
fn avg_ceil_z(self, mask: Mask<R>, other: Self) -> Self
(a + b + 1) >> 1 rounded toward +∞, computed without overflow.
Computes avg_ceil masked (zeroed where mask is false).Source§fn mulhrs_c(self, mask: Mask<R>, other: Self) -> Self
fn mulhrs_c(self, mask: Mask<R>, other: Self) -> Self
Q(W-1) product
(self * other + 2^(W-2)) >> (W-1), where W is the element bit width. Read moreSource§impl<R> SignedIntegerVectorWithRegister for Vector<R>where
R: SignedIntegerRegister,
impl<R> SignedIntegerVectorWithRegister for Vector<R>where
R: SignedIntegerRegister,
Source§impl<R: SignedRegister> SignedVector for Vector<R>
impl<R: SignedRegister> SignedVector for Vector<R>
Source§const MIN_POSITIVE: Self
const MIN_POSITIVE: Self
Source§fn signum(self) -> Self
fn signum(self) -> Self
Source§fn copysign(self, sign: Self) -> Self
fn copysign(self, sign: Self) -> Self
Source§fn is_positive(self) -> Self::Mask
fn is_positive(self) -> Self::Mask
Source§fn is_negative(self) -> Self::Mask
fn is_negative(self) -> Self::Mask
Source§fn select_negative(self, if_neg: Self, if_pos: Self) -> Self
fn select_negative(self, if_neg: Self, if_pos: Self) -> Self
if_neg and if_pos.Source§fn abs_c(self, mask: Mask<R>) -> Self
fn abs_c(self, mask: Mask<R>) -> Self
abs when mask is true, returns self where false.Source§fn abs_z(self, mask: Mask<R>) -> Self
fn abs_z(self, mask: Mask<R>) -> Self
abs masked (zeroed where mask is false).Source§fn copysign_c(self, mask: Mask<R>, sign: Self) -> Self
fn copysign_c(self, mask: Mask<R>, sign: Self) -> Self
copysign when mask is true, returns self where false.Source§fn copysign_m(self, src: Self, mask: Mask<R>, sign: Self) -> Self
fn copysign_m(self, src: Self, mask: Mask<R>, sign: Self) -> Self
copysign with src using mask.Source§fn copysign_z(self, mask: Mask<R>, sign: Self) -> Self
fn copysign_z(self, mask: Mask<R>, sign: Self) -> Self
copysign masked (zeroed where mask is false).Source§impl<R: Register> SplatVector<<R as Register>::Element> for Vector<R>
impl<R: Register> SplatVector<<R as Register>::Element> for Vector<R>
Source§type Splat<T: SplatConst<R::Element>> = SplatVectorImpl
type Splat<T: SplatConst<R::Element>> = SplatVectorImpl
T, the type exposing the splatted vector
constant via VectorValue.Source§impl<R: NumericRegister> Square for Vector<R>
impl<R: NumericRegister> Square for Vector<R>
Source§impl<R: NumericRegister> SquareMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister> SquareMasked<Mask<R>> for Vector<R>
Source§impl<R: NumericRegister + Register> SubAssign for Vector<R>
impl<R: NumericRegister + Register> SubAssign for Vector<R>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreSource§impl<R: NumericRegister + Register> SubAssignMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> SubAssignMasked<Mask<R>> for Vector<R>
Source§fn sub_assign_c(&mut self, mask: Mask<R>, rhs: Self)
fn sub_assign_c(&mut self, mask: Mask<R>, rhs: Self)
Source§fn sub_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
fn sub_assign_m(&mut self, src: Self, mask: Mask<R>, rhs: Self)
Source§fn sub_assign_z(&mut self, mask: Mask<R>, rhs: Self)
fn sub_assign_z(&mut self, mask: Mask<R>, rhs: Self)
SubAssign masked (zeroed where mask is false).Source§impl<R: NumericRegister + Register> SubMasked<Mask<R>> for Vector<R>
impl<R: NumericRegister + Register> SubMasked<Mask<R>> for Vector<R>
Source§impl<R: NumericRegister> Sum for Vector<R>
impl<R: NumericRegister> Sum for Vector<R>
Source§impl<R> Swizzle<<R as CoreRegister>::Lanes> for Vector<R>where
R: Register,
impl<R> Swizzle<<R as CoreRegister>::Lanes> for Vector<R>where
R: Register,
Source§fn swizzle(self, other: Self, indices: GenericArray<u32, R::Lanes>) -> Self
fn swizzle(self, other: Self, indices: GenericArray<u32, R::Lanes>) -> Self
fn swizzle_const<I: SwizzleIndices<R::Lanes>>(self, other: Self) -> Self
Source§fn permute(self, indices: GenericArray<u32, R::Lanes>) -> Self
fn permute(self, indices: GenericArray<u32, R::Lanes>) -> Self
fn permute_const<I: SwizzleIndices<R::Lanes>>(self) -> Self
Source§impl<R: UnsignedIntegerRegister> UnsignedIntegerVector for Vector<R>where
R::Element: Denominator,
impl<R: UnsignedIntegerRegister> UnsignedIntegerVector for Vector<R>where
R::Element: Denominator,
Source§fn is_power_of_two(self) -> Self::Mask
fn is_power_of_two(self) -> Self::Mask
Source§fn next_power_of_two_m1(self) -> Self
fn next_power_of_two_m1(self) -> Self
Source§fn ilog2p1(self) -> Self
fn ilog2p1(self) -> Self
Source§fn avg(self, other: Self) -> Self
fn avg(self, other: Self) -> Self
(a + b + 1) >> 1, computed without overflow. Read moreSource§fn abs_diff(self, other: Self) -> Self
fn abs_diff(self, other: Self) -> Self
|self - other|, without overflow. Read moreSource§fn morton<const N: usize>(values: [Self; N]) -> Self
fn morton<const N: usize>(values: [Self; N]) -> Self
N-dimensional Morton code (Z-order curve index): interleave the
low floor(W / N) bits of each of the N coordinate vectors into one,
placing bit i of values[d] at output position i * N + d. N = 2 is
the classic 2D code, N = 3 the 3D (voxel/octree) code. Read moreSource§fn reverse_morton<const N: usize>(self) -> [Self; N]
fn reverse_morton<const N: usize>(self) -> [Self; N]
morton: de-interleave a Morton code back into
its N coordinate vectors, where out[d] gathers output bits
d, d + N, d + 2N, ... into the low floor(W / N) bits.Source§fn next_power_of_two_m1_c(self, mask: Mask<R>) -> Self
fn next_power_of_two_m1_c(self, mask: Mask<R>) -> Self
next_power_of_two_m1 when mask is true, returns self where false.Source§fn next_power_of_two_m1_m(self, src: Self, mask: Mask<R>) -> Self
fn next_power_of_two_m1_m(self, src: Self, mask: Mask<R>) -> Self
next_power_of_two_m1 with src using mask.Source§fn next_power_of_two_m1_z(self, mask: Mask<R>) -> Self
fn next_power_of_two_m1_z(self, mask: Mask<R>) -> Self
next_power_of_two_m1 masked (zeroed where mask is false).Source§fn ilog2p1_c(self, mask: Mask<R>) -> Self
fn ilog2p1_c(self, mask: Mask<R>) -> Self
ilog2p1 when mask is true, returns self where false.Source§fn ilog2p1_m(self, src: Self, mask: Mask<R>) -> Self
fn ilog2p1_m(self, src: Self, mask: Mask<R>) -> Self
ilog2p1 with src using mask.Source§fn ilog2p1_z(self, mask: Mask<R>) -> Self
fn ilog2p1_z(self, mask: Mask<R>) -> Self
ilog2p1 masked (zeroed where mask is false).Source§fn parity_c(self, mask: Mask<R>) -> Self
fn parity_c(self, mask: Mask<R>) -> Self
parity when mask is true, returns self where false.Source§fn parity_z(self, mask: Mask<R>) -> Self
fn parity_z(self, mask: Mask<R>) -> Self
parity masked (zeroed where mask is false).Source§fn avg_c(self, mask: Mask<R>, other: Self) -> Self
fn avg_c(self, mask: Mask<R>, other: Self) -> Self
(a + b + 1) >> 1, computed without overflow. Read moreSource§fn avg_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn avg_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
(a + b + 1) >> 1, computed without overflow. Read moreSource§fn avg_z(self, mask: Mask<R>, other: Self) -> Self
fn avg_z(self, mask: Mask<R>, other: Self) -> Self
(a + b + 1) >> 1, computed without overflow. Read moreSource§fn abs_diff_c(self, mask: Mask<R>, other: Self) -> Self
fn abs_diff_c(self, mask: Mask<R>, other: Self) -> Self
|self - other|, without overflow. Read moreSource§fn abs_diff_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
fn abs_diff_m(self, src: Self, mask: Mask<R>, other: Self) -> Self
|self - other|, without overflow. Read moreSource§fn abs_diff_z(self, mask: Mask<R>, other: Self) -> Self
fn abs_diff_z(self, mask: Mask<R>, other: Self) -> Self
|self - other|, without overflow. Read moreSource§impl<R> UnsignedIntegerVectorWithRegister for Vector<R>where
R: UnsignedIntegerRegister,
impl<R> UnsignedIntegerVectorWithRegister for Vector<R>where
R: UnsignedIntegerRegister,
Source§impl<R: Register> VectorWithRegister<R> for Vector<R>
impl<R: Register> VectorWithRegister<R> for Vector<R>
Source§fn into_register(self) -> Storage<R>
fn into_register(self) -> Storage<R>
Source§fn from_register(reg: Storage<R>) -> Self
fn from_register(reg: Storage<R>) -> Self
Vector.Source§fn as_mut_slice(&mut self) -> &mut [R::Element]
fn as_mut_slice(&mut self) -> &mut [R::Element]
Source§impl<R: IntegerRegister> WrappingAdd for Vector<R>
impl<R: IntegerRegister> WrappingAdd for Vector<R>
Source§fn wrapping_add(&self, v: &Self) -> Self
fn wrapping_add(&self, v: &Self) -> Self
self + other, wrapping around at the boundary of
the type.Source§impl<R: IntegerRegister> WrappingMul for Vector<R>
impl<R: IntegerRegister> WrappingMul for Vector<R>
Source§fn wrapping_mul(&self, v: &Self) -> Self
fn wrapping_mul(&self, v: &Self) -> Self
self * other, wrapping around at the boundary
of the type.Source§impl<R: IntegerRegister> WrappingSub for Vector<R>
impl<R: IntegerRegister> WrappingSub for Vector<R>
Source§fn wrapping_sub(&self, v: &Self) -> Self
fn wrapping_sub(&self, v: &Self) -> Self
self - other, wrapping around at the boundary
of the type.Source§impl<R: NumericRegister> Zero for Vector<R>
impl<R: NumericRegister> Zero for Vector<R>
Auto Trait Implementations§
impl<R> Freeze for Vector<R>
impl<R> RefUnwindSafe for Vector<R>
impl<R> Send for Vector<R>
impl<R> Sync for Vector<R>
impl<R> Unpin for Vector<R>
impl<R> UnsafeUnpin for Vector<R>
impl<R> UnwindSafe for Vector<R>
Blanket Implementations§
impl<V, Mask, Rhs> AssignMaskedBitshiftOps<Mask, Rhs> for Vwhere
V: ShlAssignMasked<Mask, Rhs> + ShrAssignMasked<Mask, Rhs>,
impl<V, Mask, Rhs> AssignMaskedBitwiseOps<Mask, Rhs> for Vwhere
V: BitAndAssignMasked<Mask, Rhs> + BitAndNotAssignMasked<Mask, Rhs> + BitOrAssignMasked<Mask, Rhs> + BitXorAssignMasked<Mask, Rhs>,
impl<V, Mask, Rhs> AssignMaskedNumOps<Mask, Rhs> for Vwhere
V: AddAssignMasked<Mask, Rhs> + SubAssignMasked<Mask, Rhs> + MulAssignMasked<Mask, Rhs> + DivAssignMasked<Mask, Rhs> + RemAssignMasked<Mask, Rhs>,
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<M> CoreMath for Mwhere
M: CoreMathWithPolicy,
impl<M> CoreMath for Mwhere
M: CoreMathWithPolicy,
Source§fn poly<const N: usize>(self, coeffs: &[Self::Element; N]) -> Self
fn poly<const N: usize>(self, coeffs: &[Self::Element; N]) -> Self
self. Read moreSource§fn poly_rev<const N: usize>(self, coeffs: &[Self::Element; N]) -> Self
fn poly_rev<const N: usize>(self, coeffs: &[Self::Element; N]) -> Self
self, but with the coefficients in reverse order. Read moreSource§fn poly_rational<const N: usize, const D: usize>(
self,
numerator: &[Self::Element; N],
denominator: &[Self::Element; D],
) -> Self
fn poly_rational<const N: usize, const D: usize>( self, numerator: &[Self::Element; N], denominator: &[Self::Element; D], ) -> Self
self, given the numerator and denominator coefficients. Read moreSource§fn reciprocal(self) -> Self
fn reciprocal(self) -> Self
Source§fn approx_div(self, divisor: Self) -> Self
fn approx_div(self, divisor: Self) -> Self
Source§fn inverse_sqrt(self) -> Self
fn inverse_sqrt(self) -> Self
Source§impl<E, V> CoreMathWithPolicy for V
impl<E, V> CoreMathWithPolicy for V
Source§fn poly_p<P, const N: usize>(
self,
coeffs: &[<V as GenericVector>::Element; N],
) -> Vwhere
P: Policy,
fn poly_p<P, const N: usize>(
self,
coeffs: &[<V as GenericVector>::Element; N],
) -> Vwhere
P: Policy,
Computes the polynomial with the given coefficients at self.
This will use fused multiply-add instructions where available for improved performance and accuracy, but falls back to standard operations if not.
Source§fn poly_rev_p<P, const N: usize>(
self,
coeffs: &[<V as GenericVector>::Element; N],
) -> Vwhere
P: Policy,
fn poly_rev_p<P, const N: usize>(
self,
coeffs: &[<V as GenericVector>::Element; N],
) -> Vwhere
P: Policy,
Computes the polynomial with the given coefficients at self, but with the coefficients in reverse order.
This will use fused multiply-add instructions where available for improved performance and accuracy, but falls back to standard operations if not.
Source§fn poly_rational_p<P, const N: usize, const D: usize>(
self,
numerator: &[<V as GenericVector>::Element; N],
denominator: &[<V as GenericVector>::Element; D],
) -> Vwhere
P: Policy,
fn poly_rational_p<P, const N: usize, const D: usize>(
self,
numerator: &[<V as GenericVector>::Element; N],
denominator: &[<V as GenericVector>::Element; D],
) -> Vwhere
P: Policy,
Computes the ratio of two polynomials at self, given the numerator and denominator coefficients.
Equivalent to poly(numerator) / poly(denominator), but with improved numerical stability in some cases.
This will use fused multiply-add instructions where available for improved performance and accuracy, but falls back to standard operations if not.
Source§fn reciprocal_p<P>(self) -> Vwhere
P: Policy,
fn reciprocal_p<P>(self) -> Vwhere
P: Policy,
Returns the multiplicative inverse of self, which is 1 / self.
If using the policy version, you may select lower precision policies for extra performance, at the cost of accuracy.
Source§fn approx_div_p<P>(self, divisor: V) -> Vwhere
P: Policy,
fn approx_div_p<P>(self, divisor: V) -> Vwhere
P: Policy,
Returns the result of dividing self by divisor, i.e., self / divisor.
Depending on the precision policy and available features, this may be optimized to use approximate reciprocal and multiplication for better performance, at the cost of accuracy.
Source§fn inverse_sqrt_p<P>(self) -> Vwhere
P: Policy,
fn inverse_sqrt_p<P>(self) -> Vwhere
P: Policy,
Returns the inverse square root of self, which is 1 / sqrt(self).
If using the policy version, you may select lower precision policies for extra performance, at the cost of accuracy.
Source§impl<M> FloatMath for Mwhere
M: FloatMathWithPolicy,
impl<M> FloatMath for Mwhere
M: FloatMathWithPolicy,
Source§fn ldexp(self, exp: Self::SignedBits) -> Self
fn ldexp(self, exp: Self::SignedBits) -> Self
self * 2^exp efficiently. Read moreSource§fn frexp(self) -> (Self, Self::SignedBits)
fn frexp(self) -> (Self, Self::SignedBits)
self into its normalized fraction and an integral power of two. Read moreSource§fn flush_denormals(self) -> Self
fn flush_denormals(self) -> Self
Source§impl<E, V> FloatMathWithPolicy for Vwhere
E: FloatElementWithBits,
V: FloatVector<Element = E> + FloatVectorWithBits + SpecializedFloatMath<E>,
impl<E, V> FloatMathWithPolicy for Vwhere
E: FloatElementWithBits,
V: FloatVector<Element = E> + FloatVectorWithBits + SpecializedFloatMath<E>,
Source§fn ldexp_p<P>(self, exp: <V as FloatVectorWithBits>::SignedBits) -> Vwhere
P: Policy,
fn ldexp_p<P>(self, exp: <V as FloatVectorWithBits>::SignedBits) -> Vwhere
P: Policy,
Computes self * 2^exp efficiently.
The default policy handles the full domain: overflow gives a signed
infinity, underflow a signed zero (or a subnormal under a
Preserve denormal policy), and infinities/NaNs pass through. That
costs a handful of compares and selects around the exponent
arithmetic.
A caller whose exponent is known to stay in range (anything fed by
frexp, for instance) can drop all of it with
ldexp_p::<CheckOverflow<P, false>>(exp), leaving an add, a shift
and an or. Out-of-domain inputs are then garbage in, garbage out.
Source§fn frexp_p<P>(self) -> (V, <V as FloatVectorWithBits>::SignedBits)where
P: Policy,
fn frexp_p<P>(self) -> (V, <V as FloatVectorWithBits>::SignedBits)where
P: Policy,
Decomposes self into its normalized fraction and an integral power of two.
self == frac * 2^exp with 0.5 <= |frac| < 1; +-0 gives
(+-0, 0), and infinities and NaNs pass through unchanged.
Unless the DenormalBehavior is set to Ignore,
denormal/subnormal values are properly handled regardless, not flushed. Mixed
workloads of normal and denormal values will be slower than all-similar workloads
due to branch prediction misprediction. This was the fastest approach overall.
Source§fn flush_denormals_p<P>(self) -> Vwhere
P: Policy,
fn flush_denormals_p<P>(self) -> Vwhere
P: Policy,
Removes denormal/subnormal values, flushing them to zero.
If the precision policy is less than Best,
this will NOT preserve -0.0. However, at higher precision policies the
negative zero will be correctly preserved.
The crate feature preserve_denormals will disable this for default policies,
which may be useful when targeting hardware or applications where the processor
will handle denormals automatically.
See DenormalBehavior for more options for how to control
this function, as it is used extensively internally.
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<V> GenericVector2 for V
impl<V> GenericVector2 for V
Source§impl<V> GenericVector3 for V
impl<V> GenericVector3 for V
Source§impl<V> GenericVector4 for V
impl<V> GenericVector4 for V
Source§impl<T> LowerBounded for Twhere
T: Bounded,
impl<T> LowerBounded for Twhere
T: Bounded,
impl<V, Mask, Rhs> MaskedBitshiftOps<Mask, Rhs> for V
impl<V, Mask, Rhs> MaskedBitwiseOps<Mask, Rhs> for Vwhere
V: BitAndMasked<Mask, Rhs> + BitAndNotMasked<Mask, Rhs> + BitOrMasked<Mask, Rhs> + BitXorMasked<Mask, Rhs>,
impl<V, Mask, Rhs> MaskedNumOps<Mask, Rhs> for V
impl<T, Rhs> NumAssignOps<Rhs> for T
impl<T, Rhs, Output> NumOps<Rhs, Output> for T
impl<V, F> PackedF8Vector<F> for V
impl<V, F> PackedF16Vector<F> for V
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<M> RealMath for Mwhere
M: RealMathWithPolicy,
impl<M> RealMath for Mwhere
M: RealMathWithPolicy,
Source§fn tolerance() -> Self
fn tolerance() -> Self
Source§fn to_degrees(self) -> Self
fn to_degrees(self) -> Self
Source§fn to_radians(self) -> Self
fn to_radians(self) -> Self
Source§fn wrap_angle(self) -> Self
fn wrap_angle(self) -> Self
Source§fn angle_diff(self, other: Self) -> Self
fn angle_diff(self, other: Self) -> Self
Source§fn logaddexp(self, other: Self) -> Self
fn logaddexp(self, other: Self) -> Self
$\ln(e^{a} + e^{b})$ computed in a numerically stable way that avoids overflow,
where a = self and b = other. Read moreSource§fn smoothstep<const N: usize>(self, edges: Option<(Self, Self)>) -> Self
fn smoothstep<const N: usize>(self, edges: Option<(Self, Self)>) -> Self
2N-1. Note: The “smoothness”
for higher order is in terms of the number of continuous derivatives,
not in terms of visual smoothness, though they are related in some ways. Read moreSource§fn inverse_smoothstep<const N: usize>(self, edges: Option<(Self, Self)>) -> Self
fn inverse_smoothstep<const N: usize>(self, edges: Option<(Self, Self)>) -> Self
self, which is the value that would produce self when passed to smoothstep. Read moreSource§fn smoothstep_derivative<const N: usize>(
self,
edges: Option<(Self, Self)>,
) -> Self
fn smoothstep_derivative<const N: usize>( self, edges: Option<(Self, Self)>, ) -> Self
smoothstep function of order 2N-1, at the given point.Source§fn smooth_interpolator(self, edges: Option<(Self, Self)>, k: Self) -> Self
fn smooth_interpolator(self, edges: Option<(Self, Self)>, k: Self) -> Self
Source§fn smooth_interpolator_inverse(
self,
edges: Option<(Self, Self)>,
k: Self,
) -> Self
fn smooth_interpolator_inverse( self, edges: Option<(Self, Self)>, k: Self, ) -> Self
smooth_interpolator. Read moreSource§impl<E, V> RealMathWithPolicy for Vwhere
E: FloatElement,
V: FloatVector<Element = E> + TranscendentalMathWithPolicy + SpatialMathWithPolicy + SpecializedRealMath<E>,
impl<E, V> RealMathWithPolicy for Vwhere
E: FloatElement,
V: FloatVector<Element = E> + TranscendentalMathWithPolicy + SpatialMathWithPolicy + SpecializedRealMath<E>,
Source§fn tolerance_p<P>() -> Vwhere
P: Policy,
fn tolerance_p<P>() -> Vwhere
P: Policy,
Returns the precision tolerance based on the selected policy. This is a good default tolerance to use for numerical methods.
Source§fn to_degrees_p<P>(self) -> Vwhere
P: Policy,
fn to_degrees_p<P>(self) -> Vwhere
P: Policy,
Converts angles from radians to degrees.
Source§fn to_radians_p<P>(self) -> Vwhere
P: Policy,
fn to_radians_p<P>(self) -> Vwhere
P: Policy,
Converts angles from degrees to radians.
Source§fn wrap_angle_p<P>(self) -> Vwhere
P: Policy,
fn wrap_angle_p<P>(self) -> Vwhere
P: Policy,
Wraps the angle (radians) in self to the range [-π, π).
The formula for this is self - floor((self + π) / 2π) * 2π
Source§fn angle_diff_p<P>(self, other: V) -> Vwhere
P: Policy,
fn angle_diff_p<P>(self, other: V) -> Vwhere
P: Policy,
Computes the smallest difference between two angles (in radians), taking into account angle wrapping.
To get the “distance” between two angles, use the absolute value of the result.
Source§fn atan2_p<P>(self, x: V) -> Vwhere
P: Policy,
fn atan2_p<P>(self, x: V) -> Vwhere
P: Policy,
Returns the four-quadrant arctangent of self and x.
This method is only defined for real-valued types.
Source§fn lerp_p<P>(self, a: V, b: V) -> Vwhere
P: Policy,
fn lerp_p<P>(self, a: V, b: V) -> Vwhere
P: Policy,
Linearly interpolates between a and b based on the value of self.
This operation is not clamped.
Source§fn rescale_p<P>(self, in_min: V, in_max: V, out_min: V, out_max: V) -> Vwhere
P: Policy,
fn rescale_p<P>(self, in_min: V, in_max: V, out_min: V, out_max: V) -> Vwhere
P: Policy,
Scales self from the input range [in_min, in_max] to the output range [out_min, out_max].
This operation is not clamped.
Source§fn logaddexp_p<P>(self, other: V) -> Vwhere
P: Policy,
fn logaddexp_p<P>(self, other: V) -> Vwhere
P: Policy,
Returns $\ln(e^{a} + e^{b})$ computed in a numerically stable way that avoids overflow,
where a = self and b = other.
Evaluated as $\max(a, b) + \ln(1 + e^{-|a - b|})$, so the result is accurate even when a
and b are large. This is the workhorse of stable log-domain probability arithmetic
(e.g. the two-argument log-sum-exp).
Source§fn smoothstep_p<P, const N: usize>(self, edges: Option<(V, V)>) -> Vwhere
P: Policy,
fn smoothstep_p<P, const N: usize>(self, edges: Option<(V, V)>) -> Vwhere
P: Policy,
Generalized smoothstep function of Order 2N-1. Note: The “smoothness”
for higher order is in terms of the number of continuous derivatives,
not in terms of visual smoothness, though they are related in some ways.
For N=0, this is equivalent to the step function.
For N=1, this is a linear line between 0 and 1.
For N=2, this is equivalent to the standard 3rd-order smoothstep function.
For N=3, this is equivalent to the 5th-order “smootherstep” function.
For single precision, N can go up to 10, whereas for double precision, N can go up to 20.
See smooth_interpolator for a more advanced interpolator with
infinite differentiability.
§Examples
use thermite::prelude::*;
type V = Vector<f64>;
// Standard 3rd-order smoothstep (N = 2) over the default [0, 1] edges:
// 3t^2 - 2t^3
let y = V::splat(0.25).smoothstep::<2>(None);
assert!((y.extract::<0>() - 0.15625).abs() < 1e-15);Source§fn inverse_smoothstep_p<P, const N: usize>(self, edges: Option<(V, V)>) -> Vwhere
P: Policy,
fn inverse_smoothstep_p<P, const N: usize>(self, edges: Option<(V, V)>) -> Vwhere
P: Policy,
Returns the inverse smoothstep of self, which is the value that would produce self when passed to smoothstep.
N from 0..=2 have fast closed-form solutions, while higher N use numerical root-finding methods, which will inherently be much slower.
§Examples
Round-trips smoothstep, even at high orders where
the inverse must be found numerically:
use thermite::prelude::*;
type V = Vector<f64>;
let x = V::splat(1.0 / 16.0);
let y = x.smoothstep::<12>(None);
let x_back = y.inverse_smoothstep::<12>(None);
assert!((x_back.extract::<0>() - x.extract::<0>()).abs() < 1e-9);Source§fn smoothstep_derivative_p<P, const N: usize>(self, edges: Option<(V, V)>) -> Vwhere
P: Policy,
fn smoothstep_derivative_p<P, const N: usize>(self, edges: Option<(V, V)>) -> Vwhere
P: Policy,
Derivative of the smoothstep function of order 2N-1, at the given point.
Source§fn smooth_interpolator_p<P>(self, edges: Option<(V, V)>, k: V) -> Vwhere
P: Policy,
fn smooth_interpolator_p<P>(self, edges: Option<(V, V)>, k: V) -> Vwhere
P: Policy,
C∞-smooth interpolation factor between the given edges (defaulting to 0 and 1).
Constructs a smooth transition function using:
f(x) = e^(-1 / (k * x))
g(x) = f(x) / (f(x) + f(1 - x))The result is C∞-differentiable (infinitely smooth), with all derivatives vanishing at both endpoints - making it strictly superior to polynomial smoothstep for applications requiring flatness at the edges.
The k parameter controls the shape of the transition:
k < 1: sharpens the curve, concentrating the transition near the midpoint.k = 1: the standard balanced sigmoid-like transition.k > 1: stretches the transition region, making the curve more gradual.$k \approx 2/\sqrt{3}$(~1.1547): the function becomes bimodal - use with caution above this value.
Source§fn smooth_interpolator_inverse_p<P>(self, edges: Option<(V, V)>, k: V) -> Vwhere
P: Policy,
fn smooth_interpolator_inverse_p<P>(self, edges: Option<(V, V)>, k: V) -> Vwhere
P: Policy,
Inverse of smooth_interpolator.
Given an output value y in [0, 1], recovers the input x such that
smooth_interpolator(x, edges, k) ≈ y.
Source§impl<M> SpatialMath for Mwhere
M: SpatialMathWithPolicy,
impl<M> SpatialMath for Mwhere
M: SpatialMathWithPolicy,
Source§fn hypot_n<const N: usize>(values: [Self; N]) -> Self
fn hypot_n<const N: usize>(values: [Self; N]) -> Self
$\sqrt{x_1^2 + x_2^2 + \dots + x_N^2}$. Read moreSource§fn inv_hypot_n<const N: usize>(values: [Self; N]) -> Self
fn inv_hypot_n<const N: usize>(values: [Self; N]) -> Self
$1/\sqrt{x_1^2 + x_2^2 + \dots + x_N^2}$. Read moreSource§fn l2_norm_squared(self) -> Self
fn l2_norm_squared(self) -> Self
Source§impl<E, V> SpatialMathWithPolicy for Vwhere
E: FloatElement,
V: FloatVector<Element = E> + CoreMathWithPolicy + SpecializedSpatialMath<E>,
impl<E, V> SpatialMathWithPolicy for Vwhere
E: FloatElement,
V: FloatVector<Element = E> + CoreMathWithPolicy + SpecializedSpatialMath<E>,
Source§fn hypot_p<P>(self, other: V) -> Vwhere
P: Policy,
fn hypot_p<P>(self, other: V) -> Vwhere
P: Policy,
Computes the Euclidean norm (hypotenuse) of self and other, i.e., sqrt(self^2 + other^2).
This is not higher performance than the naive implementation, but is more resistant to overflow and underflow. If using the worst precision policy, it becomes equivalent to the naive implementation.
Check out hypot_n for a more general version that computes the hypotenuse of N values.
Source§fn hypot_n_p<P, const N: usize>(values: [V; N]) -> Vwhere
P: Policy,
fn hypot_n_p<P, const N: usize>(values: [V; N]) -> Vwhere
P: Policy,
Computes the Euclidean norm (hypotenuse) of N values, i.e., $\sqrt{x_1^2 + x_2^2 + \dots + x_N^2}$.
This is typically higher performance than naively computing the sum of squares and then taking the square root, especially for larger N, and is more resistant to overflow and underflow when using average or higher precision policies.
Source§fn inv_hypot_n_p<P, const N: usize>(values: [V; N]) -> Vwhere
P: Policy,
fn inv_hypot_n_p<P, const N: usize>(values: [V; N]) -> Vwhere
P: Policy,
Computes the inverse Euclidean norm (inverse hypotenuse) of N values, i.e., $1/\sqrt{x_1^2 + x_2^2 + \dots + x_N^2}$.
This is typically higher performance than naively computing the sum of squares, taking the square root, and then inverting, especially for larger N, and is more resistant to overflow and underflow when using average or higher precision policies.
At lower precision policies, we can take advantage of fast approximate inverse square root implementations for better performance.
Source§fn l1_norm_p<P>(self) -> Vwhere
P: Policy,
fn l1_norm_p<P>(self) -> Vwhere
P: Policy,
L1 Norm, or the “Manhattan” distance from the origin.
For 1D vectors, this is equivalent to the absolute value.
Source§fn l2_norm_p<P>(self) -> Vwhere
P: Policy,
fn l2_norm_p<P>(self) -> Vwhere
P: Policy,
L2 Norm, or the “Euclidean” distance from the origin.
For 1D vectors, this is equivalent to the absolute value.
Source§fn l2_norm_squared_p<P>(self) -> Vwhere
P: Policy,
fn l2_norm_squared_p<P>(self) -> Vwhere
P: Policy,
Squared L2 Norm, or the squared “Euclidean” distance from the origin.
For 1D vectors, this is equivalent to squaring the value.
Source§impl<V> SpecializedCoreMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
impl<V> SpecializedCoreMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
fn inverse_sqrt<P>(self) -> Vwhere
P: Policy,
fn poly<P: Policy, const N: usize>(self, coeffs: &[E; N]) -> Self
fn poly_rev<P: Policy, const N: usize>(self, coeffs: &[E; N]) -> Self
fn poly_rational<P: Policy, const N: usize, const D: usize>( self, numerator: &[E; N], denominator: &[E; D], ) -> Self
fn reciprocal<P: Policy>(self) -> Self
fn approx_div<P: Policy>(self, rhs: Self) -> Self
fn reciprocal_adde<P: Policy>(self, a: Self) -> Self
fn powi<P: Policy>(self, e: i32) -> Self
fn powic<P: Policy, const N: i32>(self) -> Self
fn powiv<P: Policy>(self, e: Self::Signed) -> Self
Source§impl<V> SpecializedCoreMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
impl<V> SpecializedCoreMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
fn inverse_sqrt<P>(self) -> Vwhere
P: Policy,
fn poly<P: Policy, const N: usize>(self, coeffs: &[E; N]) -> Self
fn poly_rev<P: Policy, const N: usize>(self, coeffs: &[E; N]) -> Self
fn poly_rational<P: Policy, const N: usize, const D: usize>( self, numerator: &[E; N], denominator: &[E; D], ) -> Self
fn reciprocal<P: Policy>(self) -> Self
fn approx_div<P: Policy>(self, rhs: Self) -> Self
fn reciprocal_adde<P: Policy>(self, a: Self) -> Self
fn powi<P: Policy>(self, e: i32) -> Self
fn powic<P: Policy, const N: i32>(self) -> Self
fn powiv<P: Policy>(self, e: Self::Signed) -> Self
Source§impl<E, V> SpecializedFloatMath<E> for Vwhere
E: FloatElement,
V: FloatVectorWithBits<Element = E>,
impl<E, V> SpecializedFloatMath<E> for Vwhere
E: FloatElement,
V: FloatVectorWithBits<Element = E>,
fn ldexp<P: Policy>(self, exp: Self::SignedBits) -> Self
fn frexp<P: Policy>(self) -> (Self, Self::SignedBits)
fn flush_denormals<P: Policy>(self) -> Self
Source§impl<V> SpecializedRealMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
impl<V> SpecializedRealMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
fn wrap_angle<P>(self) -> Vwhere
P: Policy,
fn atan2<P>(self, x: V) -> Vwhere
P: Policy,
fn tolerance<P: Policy>() -> Self
fn to_degrees<P: Policy>(self) -> Self
fn to_radians<P: Policy>(self) -> Self
fn angle_diff<P: Policy>(self, other: Self) -> Self
fn step<P: Policy>(self, t: Self) -> Self
fn lerp<P: Policy>(self, a: Self, b: Self) -> Self
fn rescale<P: Policy>( self, in_min: Self, in_max: Self, out_min: Self, out_max: Self, ) -> Self
fn logaddexp<P: Policy>(self, other: Self) -> Self
fn smoothstep<P: Policy, const N: usize>( self, edges: Option<(Self, Self)>, ) -> Self
fn smoothstep_derivative<P: Policy, const N: usize>( self, edges: Option<(Self, Self)>, ) -> Self
fn inverse_smoothstep<P: Policy, const N: usize>( y: Self, edges: Option<(Self, Self)>, ) -> Self
fn smooth_interpolator<P: Policy>( x: Self, edges: Option<(Self, Self)>, k: Self, ) -> Self
fn smooth_interpolator_inverse<P: Policy>( y: Self, edges: Option<(Self, Self)>, k: Self, ) -> Self
Source§impl<V> SpecializedRealMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
impl<V> SpecializedRealMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
fn atan2<P>(self, x: V) -> Vwhere
P: Policy,
fn wrap_angle<P>(self) -> Vwhere
P: Policy,
fn tolerance<P: Policy>() -> Self
fn to_degrees<P: Policy>(self) -> Self
fn to_radians<P: Policy>(self) -> Self
fn angle_diff<P: Policy>(self, other: Self) -> Self
fn step<P: Policy>(self, t: Self) -> Self
fn lerp<P: Policy>(self, a: Self, b: Self) -> Self
fn rescale<P: Policy>( self, in_min: Self, in_max: Self, out_min: Self, out_max: Self, ) -> Self
fn logaddexp<P: Policy>(self, other: Self) -> Self
fn smoothstep<P: Policy, const N: usize>( self, edges: Option<(Self, Self)>, ) -> Self
fn smoothstep_derivative<P: Policy, const N: usize>( self, edges: Option<(Self, Self)>, ) -> Self
fn inverse_smoothstep<P: Policy, const N: usize>( y: Self, edges: Option<(Self, Self)>, ) -> Self
fn smooth_interpolator<P: Policy>( x: Self, edges: Option<(Self, Self)>, k: Self, ) -> Self
fn smooth_interpolator_inverse<P: Policy>( y: Self, edges: Option<(Self, Self)>, k: Self, ) -> Self
Source§impl<V> SpecializedSpatialMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
impl<V> SpecializedSpatialMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
fn l2_norm_squared<P>(self) -> Vwhere
P: Policy,
fn l2_norm<P>(self) -> Vwhere
P: Policy,
fn l1_norm<P>(self) -> Vwhere
P: Policy,
fn hypot<P: Policy>(self, y: Self) -> Self
fn hypot_n<P: Policy, const N: usize>(values: [Self; N]) -> Self
fn inv_hypot_n<P: Policy, const N: usize>(values: [Self; N]) -> Self
Source§impl<V> SpecializedSpatialMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
impl<V> SpecializedSpatialMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
fn l2_norm_squared<P>(self) -> Vwhere
P: Policy,
fn l2_norm<P>(self) -> Vwhere
P: Policy,
fn l1_norm<P>(self) -> Vwhere
P: Policy,
fn hypot<P: Policy>(self, y: Self) -> Self
fn hypot_n<P: Policy, const N: usize>(values: [Self; N]) -> Self
fn inv_hypot_n<P: Policy, const N: usize>(values: [Self; N]) -> Self
Source§impl<V> SpecializedTranscendentalMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
impl<V> SpecializedTranscendentalMath<f32> for Vwhere
V: FloatVectorWithBits<Element = f32>,
fn sinc<P>(self) -> Vwhere
P: Policy,
fn sinc_pi<P>(self) -> Vwhere
P: Policy,
fn log_n<P, const N: usize>(self) -> Vwhere
P: Policy,
fn sin_cos<P>(self) -> (V, V)where
P: Policy,
fn sin<P>(self) -> Vwhere
P: Policy,
fn cos<P>(self) -> Vwhere
P: Policy,
fn tan<P>(self) -> Vwhere
P: Policy,
fn sincos_pi<P>(self) -> (V, V)where
P: Policy,
fn sin_pi<P>(self) -> Vwhere
P: Policy,
fn cos_pi<P>(self) -> Vwhere
P: Policy,
fn tan_pi<P>(self) -> Vwhere
P: Policy,
fn sinh_cosh<P>(self) -> (V, V)where
P: Policy,
fn sinh<P>(self) -> Vwhere
P: Policy,
fn cosh<P>(self) -> Vwhere
P: Policy,
fn tanh<P>(self) -> Vwhere
P: Policy,
fn asin<P>(self) -> Vwhere
P: Policy,
fn acos<P>(self) -> Vwhere
P: Policy,
fn atan<P>(self) -> Vwhere
P: Policy,
fn asinh<P>(self) -> Vwhere
P: Policy,
fn acosh<P>(self) -> Vwhere
P: Policy,
fn atanh<P>(self) -> Vwhere
P: Policy,
fn exp<P>(self) -> Vwhere
P: Policy,
fn exph<P>(self) -> Vwhere
P: Policy,
fn exp2<P>(self) -> Vwhere
P: Policy,
fn exp10<P>(self) -> Vwhere
P: Policy,
fn exp_m1<P>(self) -> Vwhere
P: Policy,
fn exp2_m1<P>(self) -> Vwhere
P: Policy,
fn exp10_m1<P>(self) -> Vwhere
P: Policy,
fn powf<P>(self, y: V) -> Vwhere
P: Policy,
fn cbrt<P>(self) -> Vwhere
P: Policy,
fn ln<P>(self) -> Vwhere
P: Policy,
fn ln_1p<P>(self) -> Vwhere
P: Policy,
fn log2<P>(self) -> Vwhere
P: Policy,
fn log10<P>(self) -> Vwhere
P: Policy,
Source§fn ln1m_expnx<P>(self) -> Vwhere
P: Policy,
fn ln1m_expnx<P>(self) -> Vwhere
P: Policy,
fn ln1m_expnx_ext<P>(self, lnx: V) -> Vwhere
P: Policy,
fn sqrt1pm1<P: Policy>(self) -> Self
fn compound<P: Policy>(self, n: Self) -> Self
fn powf_m1<P: Policy>(self, e: Self) -> Self
fn haversin<P: Policy>(self) -> Self
fn versin<P: Policy>(self) -> Self
fn cos_m1<P: Policy>(self) -> Self
fn nth_root<P: Policy, const N: usize>(self) -> Self
fn log2_p1<P: Policy>(self) -> Self
fn log10_p1<P: Policy>(self) -> Self
fn log<P: Policy>(self, base: Self) -> Self
Source§impl<V> SpecializedTranscendentalMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
impl<V> SpecializedTranscendentalMath<f64> for Vwhere
V: FloatVectorWithBits<Element = f64>,
fn sinc<P>(self) -> Vwhere
P: Policy,
fn sinc_pi<P>(self) -> Vwhere
P: Policy,
fn log_n<P, const N: usize>(self) -> Vwhere
P: Policy,
fn sin_cos<P>(self) -> (V, V)where
P: Policy,
fn sincos_pi<P>(self) -> (V, V)where
P: Policy,
fn sinh_cosh<P>(self) -> (V, V)where
P: Policy,
fn sinh<P>(self) -> Vwhere
P: Policy,
fn cosh<P>(self) -> Vwhere
P: Policy,
fn tanh<P>(self) -> Vwhere
P: Policy,
fn asin<P>(self) -> Vwhere
P: Policy,
fn acos<P>(self) -> Vwhere
P: Policy,
fn atan<P>(self) -> Vwhere
P: Policy,
fn asinh<P>(self) -> Vwhere
P: Policy,
fn acosh<P>(self) -> Vwhere
P: Policy,
fn atanh<P>(self) -> Vwhere
P: Policy,
fn exp<P>(self) -> Vwhere
P: Policy,
fn exph<P>(self) -> Vwhere
P: Policy,
fn exp2<P>(self) -> Vwhere
P: Policy,
fn exp10<P>(self) -> Vwhere
P: Policy,
fn exp_m1<P>(self) -> Vwhere
P: Policy,
fn exp2_m1<P>(self) -> Vwhere
P: Policy,
fn exp10_m1<P>(self) -> Vwhere
P: Policy,
fn powf<P>(self, y: V) -> Vwhere
P: Policy,
fn cbrt<P>(self) -> Vwhere
P: Policy,
fn ln<P>(self) -> Vwhere
P: Policy,
fn ln_1p<P>(self) -> Vwhere
P: Policy,
fn log2<P>(self) -> Vwhere
P: Policy,
fn log10<P>(self) -> Vwhere
P: Policy,
Source§fn ln1m_expnx<P>(self) -> Vwhere
P: Policy,
fn ln1m_expnx<P>(self) -> Vwhere
P: Policy,
fn ln1m_expnx_ext<P>(self, _lnx: V) -> Vwhere
P: Policy,
fn sin<P: Policy>(self) -> Self
fn cos<P: Policy>(self) -> Self
fn tan<P: Policy>(self) -> Self
fn sin_pi<P: Policy>(self) -> Self
fn cos_pi<P: Policy>(self) -> Self
fn tan_pi<P: Policy>(self) -> Self
fn sqrt1pm1<P: Policy>(self) -> Self
fn compound<P: Policy>(self, n: Self) -> Self
fn powf_m1<P: Policy>(self, e: Self) -> Self
fn haversin<P: Policy>(self) -> Self
fn versin<P: Policy>(self) -> Self
fn cos_m1<P: Policy>(self) -> Self
fn nth_root<P: Policy, const N: usize>(self) -> Self
fn log2_p1<P: Policy>(self) -> Self
fn log10_p1<P: Policy>(self) -> Self
fn log<P: Policy>(self, base: Self) -> Self
Source§impl<V> Swizzle3 for V
impl<V> Swizzle3 for V
fn xyz(self) -> V
fn xxx(self) -> V
fn xxy(self) -> V
fn xxz(self) -> V
fn xyx(self) -> V
fn xyy(self) -> V
fn xzx(self) -> V
fn xzy(self) -> V
fn xzz(self) -> V
fn yxx(self) -> V
fn yxy(self) -> V
fn yxz(self) -> V
fn yyx(self) -> V
fn yyy(self) -> V
fn yyz(self) -> V
fn yzx(self) -> V
fn yzy(self) -> V
fn yzz(self) -> V
fn zxx(self) -> V
fn zxy(self) -> V
fn zxz(self) -> V
fn zyx(self) -> V
fn zyy(self) -> V
fn zyz(self) -> V
fn zzx(self) -> V
fn zzy(self) -> V
fn zzz(self) -> V
Source§impl<V> Swizzle4 for V
impl<V> Swizzle4 for V
fn xyzw(self) -> V
fn xxxx(self) -> V
fn xxxy(self) -> V
fn xxxz(self) -> V
fn xxxw(self) -> V
fn xxyx(self) -> V
fn xxyy(self) -> V
fn xxyz(self) -> V
fn xxyw(self) -> V
fn xxzx(self) -> V
fn xxzy(self) -> V
fn xxzz(self) -> V
fn xxzw(self) -> V
fn xxwx(self) -> V
fn xxwy(self) -> V
fn xxwz(self) -> V
fn xxww(self) -> V
fn xyxx(self) -> V
fn xyxy(self) -> V
fn xyxz(self) -> V
fn xyxw(self) -> V
fn xyyx(self) -> V
fn xyyy(self) -> V
fn xyyz(self) -> V
fn xyyw(self) -> V
fn xyzx(self) -> V
fn xyzy(self) -> V
fn xyzz(self) -> V
fn xywx(self) -> V
fn xywy(self) -> V
fn xywz(self) -> V
fn xyww(self) -> V
fn xzxx(self) -> V
fn xzxy(self) -> V
fn xzxz(self) -> V
fn xzxw(self) -> V
fn xzyx(self) -> V
fn xzyy(self) -> V
fn xzyz(self) -> V
fn xzyw(self) -> V
fn xzzx(self) -> V
fn xzzy(self) -> V
fn xzzz(self) -> V
fn xzzw(self) -> V
fn xzwx(self) -> V
fn xzwy(self) -> V
fn xzwz(self) -> V
fn xzww(self) -> V
fn xwxx(self) -> V
fn xwxy(self) -> V
fn xwxz(self) -> V
fn xwxw(self) -> V
fn xwyx(self) -> V
fn xwyy(self) -> V
fn xwyz(self) -> V
fn xwyw(self) -> V
fn xwzx(self) -> V
fn xwzy(self) -> V
fn xwzz(self) -> V
fn xwzw(self) -> V
fn xwwx(self) -> V
fn xwwy(self) -> V
fn xwwz(self) -> V
fn xwww(self) -> V
fn yxxx(self) -> V
fn yxxy(self) -> V
fn yxxz(self) -> V
fn yxxw(self) -> V
fn yxyx(self) -> V
fn yxyy(self) -> V
fn yxyz(self) -> V
fn yxyw(self) -> V
fn yxzx(self) -> V
fn yxzy(self) -> V
fn yxzz(self) -> V
fn yxzw(self) -> V
fn yxwx(self) -> V
fn yxwy(self) -> V
fn yxwz(self) -> V
fn yxww(self) -> V
fn yyxx(self) -> V
fn yyxy(self) -> V
fn yyxz(self) -> V
fn yyxw(self) -> V
fn yyyx(self) -> V
fn yyyy(self) -> V
fn yyyz(self) -> V
fn yyyw(self) -> V
fn yyzx(self) -> V
fn yyzy(self) -> V
fn yyzz(self) -> V
fn yyzw(self) -> V
fn yywx(self) -> V
fn yywy(self) -> V
fn yywz(self) -> V
fn yyww(self) -> V
fn yzxx(self) -> V
fn yzxy(self) -> V
fn yzxz(self) -> V
fn yzxw(self) -> V
fn yzyx(self) -> V
fn yzyy(self) -> V
fn yzyz(self) -> V
fn yzyw(self) -> V
fn yzzx(self) -> V
fn yzzy(self) -> V
fn yzzz(self) -> V
fn yzzw(self) -> V
fn yzwx(self) -> V
fn yzwy(self) -> V
fn yzwz(self) -> V
fn yzww(self) -> V
fn ywxx(self) -> V
fn ywxy(self) -> V
fn ywxz(self) -> V
fn ywxw(self) -> V
fn ywyx(self) -> V
fn ywyy(self) -> V
fn ywyz(self) -> V
fn ywyw(self) -> V
fn ywzx(self) -> V
fn ywzy(self) -> V
fn ywzz(self) -> V
fn ywzw(self) -> V
fn ywwx(self) -> V
fn ywwy(self) -> V
fn ywwz(self) -> V
fn ywww(self) -> V
fn zxxx(self) -> V
fn zxxy(self) -> V
fn zxxz(self) -> V
fn zxxw(self) -> V
fn zxyx(self) -> V
fn zxyy(self) -> V
fn zxyz(self) -> V
fn zxyw(self) -> V
fn zxzx(self) -> V
fn zxzy(self) -> V
fn zxzz(self) -> V
fn zxzw(self) -> V
fn zxwx(self) -> V
fn zxwy(self) -> V
fn zxwz(self) -> V
fn zxww(self) -> V
fn zyxx(self) -> V
fn zyxy(self) -> V
fn zyxz(self) -> V
fn zyxw(self) -> V
fn zyyx(self) -> V
fn zyyy(self) -> V
fn zyyz(self) -> V
fn zyyw(self) -> V
fn zyzx(self) -> V
fn zyzy(self) -> V
fn zyzz(self) -> V
fn zyzw(self) -> V
fn zywx(self) -> V
fn zywy(self) -> V
fn zywz(self) -> V
fn zyww(self) -> V
fn zzxx(self) -> V
fn zzxy(self) -> V
fn zzxz(self) -> V
fn zzxw(self) -> V
fn zzyx(self) -> V
fn zzyy(self) -> V
fn zzyz(self) -> V
fn zzyw(self) -> V
fn zzzx(self) -> V
fn zzzy(self) -> V
fn zzzz(self) -> V
fn zzzw(self) -> V
fn zzwx(self) -> V
fn zzwy(self) -> V
fn zzwz(self) -> V
fn zzww(self) -> V
fn zwxx(self) -> V
fn zwxy(self) -> V
fn zwxz(self) -> V
fn zwxw(self) -> V
fn zwyx(self) -> V
fn zwyy(self) -> V
fn zwyz(self) -> V
fn zwyw(self) -> V
fn zwzx(self) -> V
fn zwzy(self) -> V
fn zwzz(self) -> V
fn zwzw(self) -> V
fn zwwx(self) -> V
fn zwwy(self) -> V
fn zwwz(self) -> V
fn zwww(self) -> V
fn wxxx(self) -> V
fn wxxy(self) -> V
fn wxxz(self) -> V
fn wxxw(self) -> V
fn wxyx(self) -> V
fn wxyy(self) -> V
fn wxyz(self) -> V
fn wxyw(self) -> V
fn wxzx(self) -> V
fn wxzy(self) -> V
fn wxzz(self) -> V
fn wxzw(self) -> V
fn wxwx(self) -> V
fn wxwy(self) -> V
fn wxwz(self) -> V
fn wxww(self) -> V
fn wyxx(self) -> V
fn wyxy(self) -> V
fn wyxz(self) -> V
fn wyxw(self) -> V
fn wyyx(self) -> V
fn wyyy(self) -> V
fn wyyz(self) -> V
fn wyyw(self) -> V
fn wyzx(self) -> V
fn wyzy(self) -> V
fn wyzz(self) -> V
fn wyzw(self) -> V
fn wywx(self) -> V
fn wywy(self) -> V
fn wywz(self) -> V
fn wyww(self) -> V
fn wzxx(self) -> V
fn wzxy(self) -> V
fn wzxz(self) -> V
fn wzxw(self) -> V
fn wzyx(self) -> V
fn wzyy(self) -> V
fn wzyz(self) -> V
fn wzyw(self) -> V
fn wzzx(self) -> V
fn wzzy(self) -> V
fn wzzz(self) -> V
fn wzzw(self) -> V
fn wzwx(self) -> V
fn wzwy(self) -> V
fn wzwz(self) -> V
fn wzww(self) -> V
fn wwxx(self) -> V
fn wwxy(self) -> V
fn wwxz(self) -> V
fn wwxw(self) -> V
fn wwyx(self) -> V
fn wwyy(self) -> V
fn wwyz(self) -> V
fn wwyw(self) -> V
fn wwzx(self) -> V
fn wwzy(self) -> V
fn wwzz(self) -> V
fn wwzw(self) -> V
fn wwwx(self) -> V
fn wwwy(self) -> V
fn wwwz(self) -> V
fn wwww(self) -> V
impl<V> SwizzleVector for V
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<M> TranscendentalMath for Mwhere
M: TranscendentalMathWithPolicy,
impl<M> TranscendentalMath for Mwhere
M: TranscendentalMathWithPolicy,
Source§fn sin_cos(self) -> (Self, Self)
fn sin_cos(self) -> (Self, Self)
sin and cos separately.Source§fn versin(self) -> Self
fn versin(self) -> Self
$1 - \cos(x)$ of self, evaluated as $2\sin^2(x/2)$ (accurate near zero).Source§fn haversin(self) -> Self
fn haversin(self) -> Self
$\tfrac{1 - \cos(x)}{2}$ of self, evaluated as $\sin^2(x/2)$ (accurate near zero). Read moreSource§fn sincos_pi(self) -> (Self, Self)
fn sincos_pi(self) -> (Self, Self)
pi * x, together. This will be more efficient than calling sin_pi and cos_pi separately,
and more precise than computing them manually with sin(pi * x) and cos(pi * x).Source§fn sin_pi(self) -> Self
fn sin_pi(self) -> Self
pi * x, with improved precision when the policy allows.Source§fn cos_pi(self) -> Self
fn cos_pi(self) -> Self
pi * x, with improved precision when the policy allows.Source§fn tan_pi(self) -> Self
fn tan_pi(self) -> Self
pi * x, with improved precision when the policy allows.Source§fn sinc_pi(self) -> Self
fn sinc_pi(self) -> Self
$\frac{\sin(\pi x)}{\pi x}$ with improved precision when the policy allows.Source§fn sinh_cosh(self) -> (Self, Self)
fn sinh_cosh(self) -> (Self, Self)
sinh and cosh separately.Source§fn exp_m1(self) -> Self
fn exp_m1(self) -> Self
exp(self) - 1 of self, which is more precise than calculating exp(self) - 1 directly.Source§fn exp2_m1(self) -> Self
fn exp2_m1(self) -> Self
2^(self) - 1, which is more precise than calculating exp2(self) - 1 directly.Source§fn exp10_m1(self) -> Self
fn exp10_m1(self) -> Self
10^(self) - 1, which is more precise than calculating exp10(self) - 1 directly.Source§fn sqrt1pm1(self) -> Self
fn sqrt1pm1(self) -> Self
$\sqrt{1 + x} - 1$ of self, which is more precise than sqrt(1 + x) - 1 directly near zero. Read moreSource§fn log2_p1(self) -> Self
fn log2_p1(self) -> Self
$\log_2(1 + x)$ of self, which is more precise than log2(1 + x) directly near zero.Source§fn log10_p1(self) -> Self
fn log10_p1(self) -> Self
$\log_{10}(1 + x)$ of self, which is more precise than log10(1 + x) directly near zero.Source§fn log(self, base: Self) -> Self
fn log(self, base: Self) -> Self
self with respect to the given base.Source§fn ln1m_expnx(self) -> Self
fn ln1m_expnx(self) -> Self
$\ln(1 - e^{-x})$, which depending on the policy may be
an approximation more performant than the exact calculation. If you’re using a policy with below
average precision, and happen to have ln(x) available, you can use ln1m_expnx_ext instead
to provide that.Source§fn ln1m_expnx_ext(self, lnx: Self) -> Self
fn ln1m_expnx_ext(self, lnx: Self) -> Self
ln(1 - exp(lnx)), which depending on the policy may be
an approximation more performant than the exact calculation. If you’re using a policy with below
average precision, it’s recommended to use this function instead of ln1m_expnx to provide ln(x) directly. Read moreSource§impl<E, V> TranscendentalMathWithPolicy for Vwhere
E: FloatElement,
V: FloatVector<Element = E> + CoreMathWithPolicy + SpecializedTranscendentalMath<E>,
impl<E, V> TranscendentalMathWithPolicy for Vwhere
E: FloatElement,
V: FloatVector<Element = E> + CoreMathWithPolicy + SpecializedTranscendentalMath<E>,
Source§fn sin_cos_p<P>(self) -> (V, V)where
P: Policy,
fn sin_cos_p<P>(self) -> (V, V)where
P: Policy,
Trigonometric sine and cosine, together. This will be more efficient than calling sin and cos separately.
Source§fn cos_m1_p<P>(self) -> Vwhere
P: Policy,
fn cos_m1_p<P>(self) -> Vwhere
P: Policy,
Returns cos(x) - 1 of self, which is more precise than cos(x) - 1 directly near zero.
Evaluated as $-2\sin^2(x/2)$, which has no cancellation near x = 0.
Source§fn versin_p<P>(self) -> Vwhere
P: Policy,
fn versin_p<P>(self) -> Vwhere
P: Policy,
Returns the versine $1 - \cos(x)$ of self, evaluated as $2\sin^2(x/2)$ (accurate near zero).
Source§fn haversin_p<P>(self) -> Vwhere
P: Policy,
fn haversin_p<P>(self) -> Vwhere
P: Policy,
Returns the haversine $\tfrac{1 - \cos(x)}{2}$ of self, evaluated as $\sin^2(x/2)$ (accurate near zero).
This is the kernel of the haversine great-circle-distance formula.
Source§fn sincos_pi_p<P>(self) -> (V, V)where
P: Policy,
fn sincos_pi_p<P>(self) -> (V, V)where
P: Policy,
Sine and cosine of pi * x, together. This will be more efficient than calling sin_pi and cos_pi separately,
and more precise than computing them manually with sin(pi * x) and cos(pi * x).
Source§fn sin_pi_p<P>(self) -> Vwhere
P: Policy,
fn sin_pi_p<P>(self) -> Vwhere
P: Policy,
Trigonometric sine of pi * x, with improved precision when the policy allows.
Source§fn cos_pi_p<P>(self) -> Vwhere
P: Policy,
fn cos_pi_p<P>(self) -> Vwhere
P: Policy,
Trigonometric cosine of pi * x, with improved precision when the policy allows.
Source§fn tan_pi_p<P>(self) -> Vwhere
P: Policy,
fn tan_pi_p<P>(self) -> Vwhere
P: Policy,
Trigonometric tangent of pi * x, with improved precision when the policy allows.
Source§fn sinc_p<P>(self) -> Vwhere
P: Policy,
fn sinc_p<P>(self) -> Vwhere
P: Policy,
Computes sin(x) / x with improved precision when the policy allows.
Source§fn sinc_pi_p<P>(self) -> Vwhere
P: Policy,
fn sinc_pi_p<P>(self) -> Vwhere
P: Policy,
Computes $\frac{\sin(\pi x)}{\pi x}$ with improved precision when the policy allows.
Source§fn sinh_cosh_p<P>(self) -> (V, V)where
P: Policy,
fn sinh_cosh_p<P>(self) -> (V, V)where
P: Policy,
Hyperbolic sine and cosine, together. This will be more efficient than calling sinh and cosh separately.
Source§fn exph_p<P>(self) -> Vwhere
P: Policy,
fn exph_p<P>(self) -> Vwhere
P: Policy,
The Half exponential function, returns 0.5 * e^(self).
Source§fn exp_m1_p<P>(self) -> Vwhere
P: Policy,
fn exp_m1_p<P>(self) -> Vwhere
P: Policy,
Returns exp(self) - 1 of self, which is more precise than calculating exp(self) - 1 directly.
Source§fn exp2_m1_p<P>(self) -> Vwhere
P: Policy,
fn exp2_m1_p<P>(self) -> Vwhere
P: Policy,
Returns 2^(self) - 1, which is more precise than calculating exp2(self) - 1 directly.
Source§fn exp10_m1_p<P>(self) -> Vwhere
P: Policy,
fn exp10_m1_p<P>(self) -> Vwhere
P: Policy,
Returns 10^(self) - 1, which is more precise than calculating exp10(self) - 1 directly.
Source§fn sqrt1pm1_p<P>(self) -> Vwhere
P: Policy,
fn sqrt1pm1_p<P>(self) -> Vwhere
P: Policy,
Returns $\sqrt{1 + x} - 1$ of self, which is more precise than sqrt(1 + x) - 1 directly near zero.
Evaluated as $\frac{x}{\sqrt{1 + x} + 1}$, which has no cancellation near x = 0.
Source§fn powf_m1_p<P>(self, e: V) -> Vwhere
P: Policy,
fn powf_m1_p<P>(self, e: V) -> Vwhere
P: Policy,
Returns $x^e - 1$ where x = self, computed accurately as $e^{e \ln(x)}$-style expm1.
More precise than powf(x, e) - 1 when the result is near zero (i.e. x near 1 or e near 0),
e.g. compound returns/growth rates.
Source§fn compound_p<P>(self, n: V) -> Vwhere
P: Policy,
fn compound_p<P>(self, n: V) -> Vwhere
P: Policy,
Returns $(1 + x)^n$ where x = self, computed accurately near x = 0 as $e^{n \ln(1 + x)}$.
This is the IEEE 754 compound operation, and is more precise than powf(1 + x, n) for small x
(e.g. compound-growth/interest over n periods at rate x).
Source§fn nth_root_p<P, const N: usize>(self) -> Vwhere
P: Policy,
fn nth_root_p<P, const N: usize>(self) -> Vwhere
P: Policy,
Returns the Nth root of self.
This is often faster and more accurate than using powf(1.0 / N as float). Supports
negative numbers for odd N.
Source§fn ln_p<P>(self) -> Vwhere
P: Policy,
fn ln_p<P>(self) -> Vwhere
P: Policy,
Returns the natural logarithm of self.
§Examples
Every math function takes a precision policy via its _p variant; a quick
sweep against a scalar reference is the cheapest way to validate that a
policy choice is accurate enough for your domain:
use thermite::prelude::*;
use thermite::math::policy::policies::Precision;
type V = Vector<f64>;
let mut max_err = 0.0f64;
for i in 1..=1000 {
let x = i as f64 * 0.05;
let y = V::splat(x).ln_p::<Precision>().extract::<0>();
max_err = max_err.max((y - x.ln()).abs() / x.ln().abs().max(1.0));
}
assert!(max_err < 1e-14, "max relative error {max_err}");Source§fn log2_p1_p<P>(self) -> Vwhere
P: Policy,
fn log2_p1_p<P>(self) -> Vwhere
P: Policy,
Returns $\log_2(1 + x)$ of self, which is more precise than log2(1 + x) directly near zero.
Source§fn log10_p1_p<P>(self) -> Vwhere
P: Policy,
fn log10_p1_p<P>(self) -> Vwhere
P: Policy,
Returns $\log_{10}(1 + x)$ of self, which is more precise than log10(1 + x) directly near zero.
Source§fn log_p<P>(self, base: V) -> Vwhere
P: Policy,
fn log_p<P>(self, base: V) -> Vwhere
P: Policy,
Returns the logarithm of self with respect to the given base.
Source§fn log_n_p<P, const N: usize>(self) -> Vwhere
P: Policy,
fn log_n_p<P, const N: usize>(self) -> Vwhere
P: Policy,
Returns the logarithm of self with respect to the given integer base N.
This is efficient for bases <=32 using a lookup table, and falls back to the general log(x)/libm::log(N)
implementation for larger bases.
For bases 0 and 1, the result is 0 and Infinity respectively.
Source§fn ln1m_expnx_p<P>(self) -> Vwhere
P: Policy,
fn ln1m_expnx_p<P>(self) -> Vwhere
P: Policy,
Returns $\ln(1 - e^{-x})$, which depending on the policy may be
an approximation more performant than the exact calculation. If you’re using a policy with below
average precision, and happen to have ln(x) available, you can use ln1m_expnx_ext instead
to provide that.
Source§fn ln1m_expnx_ext_p<P>(self, lnx: V) -> Vwhere
P: Policy,
fn ln1m_expnx_ext_p<P>(self, lnx: V) -> Vwhere
P: Policy,
Returns ln(1 - exp(lnx)), which depending on the policy may be
an approximation more performant than the exact calculation. If you’re using a policy with below
average precision, it’s recommended to use this function instead of ln1m_expnx to provide ln(x) directly.
Although not obvious, ln(x) is used internally for the approximation, and if it’s already available,
you may as well use this function to avoid recomputing it.
Source§impl<T> UpperBounded for Twhere
T: Bounded,
impl<T> UpperBounded for Twhere
T: Bounded,
impl<USIZE, U32, U64, R> VectorIndexedBy<USIZE, U32, U64> for Rwhere
USIZE: UnsignedIntegerVector<Lanes = <R as GenericVector>::Lanes>,
U32: UnsignedIntegerVector<Lanes = <R as GenericVector>::Lanes>,
U64: UnsignedIntegerVector<Lanes = <R as GenericVector>::Lanes>,
R: GenericVector + IndexableVector<USIZE> + IndexableVector<U32> + IndexableVector<U64>,
Source§impl<I, V> VectorIndices<V> for I
impl<I, V> VectorIndices<V> for I
Source§unsafe fn gather_ptr(ptr: *const <V as GenericVector>::Element, indices: I) -> V
unsafe fn gather_ptr(ptr: *const <V as GenericVector>::Element, indices: I) -> V
Source§unsafe fn gather_ptr_m(
src: V,
mask: <V as GenericVector>::Mask,
ptr: *const <V as GenericVector>::Element,
indices: I,
) -> V
unsafe fn gather_ptr_m( src: V, mask: <V as GenericVector>::Mask, ptr: *const <V as GenericVector>::Element, indices: I, ) -> V
gather_ptr, but only lanes where mask is
true are loaded; the rest are taken from src. Read moreSource§unsafe fn gather_ptr_z(
mask: <V as GenericVector>::Mask,
ptr: *const <V as GenericVector>::Element,
indices: I,
) -> V
unsafe fn gather_ptr_z( mask: <V as GenericVector>::Mask, ptr: *const <V as GenericVector>::Element, indices: I, ) -> V
gather_ptr_m, but masked-off lanes are
zeroed instead of taken from a source vector. Read more