pub struct AddIndicatorDivisorU32 {
divisor: u32,
multiplier: u32,
shift: u32,
}Expand description
A u32 divisor that isn’t a power of two, see DivisorU32
It uses the N + 1-bit multiplier from figure 4.1 of
Granlund and Montgomery, “Division by Invariant Integers using Multiplication” (1994).
DivisorU32::new returns it only on targets without DownDivisorU32, so the example checks nothing on aarch64 and on x86 with SSE4.1.
Fields§
§divisor: u32§multiplier: u32m' in figure 4.1
shift: u32sh2 in figure 4.1
Implementations§
Trait Implementations§
Source§impl Clone for AddIndicatorDivisorU32
impl Clone for AddIndicatorDivisorU32
impl Copy for AddIndicatorDivisorU32
Auto Trait Implementations§
impl Forget for AddIndicatorDivisorU32
impl Freeze for AddIndicatorDivisorU32
impl Move for AddIndicatorDivisorU32
impl RefUnwindSafe for AddIndicatorDivisorU32
impl Send for AddIndicatorDivisorU32
impl Sync for AddIndicatorDivisorU32
impl Unpin for AddIndicatorDivisorU32
impl UnsafeUnpin for AddIndicatorDivisorU32
impl UnwindSafe for AddIndicatorDivisorU32
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