pub struct UpDivisorU64 {
divisor: u64,
multiplier: u64,
shift: u32,
}Expand description
A u64 divisor whose rounded-up multiplier is exact in N bits, see DivisorU64
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: u64§multiplier: u64§shift: u32Implementations§
Source§impl UpDivisorU64
impl UpDivisorU64
Trait Implementations§
Source§impl Clone for UpDivisorU64
impl Clone for UpDivisorU64
impl Copy for UpDivisorU64
Auto Trait Implementations§
impl Forget for UpDivisorU64
impl Freeze for UpDivisorU64
impl Move for UpDivisorU64
impl RefUnwindSafe for UpDivisorU64
impl Send for UpDivisorU64
impl Sync for UpDivisorU64
impl Unpin for UpDivisorU64
impl UnsafeUnpin for UpDivisorU64
impl UnwindSafe for UpDivisorU64
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