pub struct Division<M>where
M: DivisionMode,{
pub division_terms: RVec<DivisionTerm>,
pub dividend: FMapping,
pub dividend_residue: FMapping,
pub divisor: FMapping,
pub divisor_residue: FMapping,
/* private fields */
}Expand description
Result of dividing two factor mappings.
Fields§
§division_terms: RVec<DivisionTerm>Information about each matched divisor term.
dividend: FMappingOriginal dividend before matching.
dividend_residue: FMappingDividend residue. Strict results preserve Bottom padding; relaxed results have all padding converted to Top.
divisor: FMappingOriginal divisor before matching.
divisor_residue: FMappingDivisor residue. Strict results preserve Bottom padding; relaxed results have all padding converted to Top.
Implementations§
Source§impl<M> Division<M>where
M: DivisionMode,
impl<M> Division<M>where
M: DivisionMode,
Sourcepub fn new(
dividend: FMapping,
dividend_residue: FMapping,
division_terms: Vec<DivisionTerm>,
divisor: FMapping,
divisor_residue: FMapping,
) -> Division<M>
pub fn new( dividend: FMapping, dividend_residue: FMapping, division_terms: Vec<DivisionTerm>, divisor: FMapping, divisor_residue: FMapping, ) -> Division<M>
Creates a new division result.
Sourcepub fn residue(&self, side: DivisionSide) -> &FMapping
pub fn residue(&self, side: DivisionSide) -> &FMapping
Returns the residue for the selected side.
Sourcepub fn mapping(&self, side: DivisionSide) -> &FMapping
pub fn mapping(&self, side: DivisionSide) -> &FMapping
Returns the original mapping for the selected side.
Sourcepub fn division_terms(&self) -> &[DivisionTerm]
pub fn division_terms(&self) -> &[DivisionTerm]
Returns matched division terms in dividend-order.
Trait Implementations§
Source§impl<M> GetStaticEquivalent_ for Division<M>where
M: DivisionMode + StableAbi,
impl<M> GetStaticEquivalent_ for Division<M>where
M: DivisionMode + StableAbi,
Source§type StaticEquivalent = _static_Division<<M as GetStaticEquivalent_>::StaticEquivalent>
type StaticEquivalent = _static_Division<<M as GetStaticEquivalent_>::StaticEquivalent>
'static equivalent of SelfSource§impl<M> StableAbi for Division<M>where
M: DivisionMode + StableAbi,
impl<M> StableAbi for Division<M>where
M: DivisionMode + StableAbi,
Source§type IsNonZeroType = False
type IsNonZeroType = False
§const ABI_CONSTS: AbiConsts = _
const ABI_CONSTS: AbiConsts = _
const-equivalents of the associated types.Source§impl StrictDivisionExt for Division<Strict>
impl StrictDivisionExt for Division<Strict>
Source§fn bounds(&self) -> RVec<TermBounds>
fn bounds(&self) -> RVec<TermBounds>
Returns per-term padding bounds reconstructed from the strict residue.
This reports the compact block bounds used by remainder. For example, m![A # 16].divide_strict(m![A]).bounds() reports dividend bounds 4..16 and divisor bounds 4..4 when A = 4.
use furiosa_mapping::*;
use furiosa_opt_macro::m;
axes![A = 4];
let division = <m![A # 16]>::to_value()
.factorize()
.divide_strict(<m![A]>::to_value().factorize());
let [row]: [TermBounds; 1] = division.bounds().into_vec().try_into().unwrap();
assert_eq!(row.dividend, BlockBounds { min: 4, max: 16 });
assert_eq!(row.divisor, BlockBounds { min: 4, max: 4 });Source§fn remainder(&self, side: DivisionSide) -> FMapping
fn remainder(&self, side: DivisionSide) -> FMapping
Auto Trait Implementations§
impl<M> Freeze for Division<M>
impl<M> RefUnwindSafe for Division<M>where
M: RefUnwindSafe,
impl<M> Send for Division<M>where
M: Send,
impl<M> Sync for Division<M>where
M: Sync,
impl<M> Unpin for Division<M>where
M: Unpin,
impl<M> UnwindSafe for Division<M>where
M: UnwindSafe,
Blanket Implementations§
§impl<T> AlignerFor<1> for T
impl<T> AlignerFor<1> for T
§impl<T> AlignerFor<1024> for T
impl<T> AlignerFor<1024> for T
§impl<T> AlignerFor<128> for T
impl<T> AlignerFor<128> for T
§impl<T> AlignerFor<16> for T
impl<T> AlignerFor<16> for T
§impl<T> AlignerFor<16384> for T
impl<T> AlignerFor<16384> for T
§impl<T> AlignerFor<2> for T
impl<T> AlignerFor<2> for T
§impl<T> AlignerFor<2048> for T
impl<T> AlignerFor<2048> for T
§impl<T> AlignerFor<256> for T
impl<T> AlignerFor<256> for T
§impl<T> AlignerFor<32> for T
impl<T> AlignerFor<32> for T
§impl<T> AlignerFor<32768> for T
impl<T> AlignerFor<32768> for T
§impl<T> AlignerFor<4> for T
impl<T> AlignerFor<4> for T
§impl<T> AlignerFor<4096> for T
impl<T> AlignerFor<4096> for T
§impl<T> AlignerFor<512> for T
impl<T> AlignerFor<512> for T
§impl<T> AlignerFor<64> for T
impl<T> AlignerFor<64> for T
§impl<T> AlignerFor<8> for T
impl<T> AlignerFor<8> for T
§impl<T> AlignerFor<8192> for T
impl<T> AlignerFor<8192> for T
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,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'a, T> RCowCompatibleRef<'a> for Twhere
T: Clone + 'a,
impl<'a, T> RCowCompatibleRef<'a> for Twhere
T: Clone + 'a,
§impl<S> ROExtAcc for S
impl<S> ROExtAcc for S
§fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
offset. Read more§fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
offset. Read more§fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
offset. Read more§fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
offset. Read more§impl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
§impl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read more§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
§fn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read more