pub struct UpDivisorU32 {
divisor: u32,
multiplier: u32,
shift: u32,
}Expand description
A u32 divisor whose rounded-up multiplier is exact in N bits, see DivisorU32
It computes MULUH(m, n) >> shift, where m satisfies theorem 4.2 of
Granlund and Montgomery, “Division by Invariant Integers using Multiplication” (1994)
with l = shift and fits in N bits, so it needs no add and halve as in figure 4.1.
Fields§
§divisor: u32§multiplier: u32§shift: u32Implementations§
Source§impl UpDivisorU32
impl UpDivisorU32
Trait Implementations§
Source§impl Clone for UpDivisorU32
impl Clone for UpDivisorU32
impl Copy for UpDivisorU32
Auto Trait Implementations§
impl Forget for UpDivisorU32
impl Freeze for UpDivisorU32
impl Move for UpDivisorU32
impl RefUnwindSafe for UpDivisorU32
impl Send for UpDivisorU32
impl Sync for UpDivisorU32
impl Unpin for UpDivisorU32
impl UnsafeUnpin for UpDivisorU32
impl UnwindSafe for UpDivisorU32
Blanket Implementations§
impl<T> Allocation 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
Mutably borrows from an owned value. Read more