Lines Matching refs:Limb
40 pub type Limb = u32; typedef
43 pub const POW5_LIMB: &[Limb] = &POW5_32;
46 pub const POW10_LIMB: &[Limb] = &POW10_32;
53 pub type Limb = u64; typedef
56 pub const POW5_LIMB: &[Limb] = &POW5_64;
59 pub const POW10_LIMB: &[Limb] = &POW10_64;
66 pub(crate) fn as_limb<T: Integer>(t: T) -> Limb { in as_limb() argument
67 Limb::as_cast(t) in as_limb()
82 fn split_u64(x: u64) -> [Limb; 2] { in split_u64()
89 fn split_u64(x: u64) -> [Limb; 1] { in split_u64()
214 pub fn add(x: Limb, y: Limb) -> (Limb, bool) { in add() argument
220 pub fn iadd(x: &mut Limb, y: Limb) -> bool { in iadd() argument
230 pub fn sub(x: Limb, y: Limb) -> (Limb, bool) { in sub() argument
236 pub fn isub(x: &mut Limb, y: Limb) -> bool { in isub() argument
248 pub fn mul(x: Limb, y: Limb, carry: Limb) -> (Limb, Limb) { in mul() argument
253 let bits = mem::size_of::<Limb>() * 8; in mul()
259 pub fn imul(x: &mut Limb, y: Limb, carry: Limb) -> Limb { in imul() argument
283 pub fn iadd_impl(x: &mut Vec<Limb>, y: Limb, xstart: usize) { in iadd_impl() argument
307 pub fn iadd(x: &mut Vec<Limb>, y: Limb) { in iadd() argument
316 pub fn isub_impl(x: &mut Vec<Limb>, y: Limb, xstart: usize) { in isub_impl() argument
335 pub fn imul(x: &mut Vec<Limb>, y: Limb) { in imul() argument
337 let mut carry: Limb = 0; in imul()
350 pub fn mul(x: &[Limb], y: Limb) -> Vec<Limb> { in mul() argument
351 let mut z = Vec::<Limb>::default(); in mul()
389 pub fn imul_pow5(x: &mut Vec<Limb>, n: u32) { in imul_pow5() argument
447 pub fn leading_zeros(x: &[Limb]) -> usize { in leading_zeros()
453 pub fn bit_length(x: &[Limb]) -> usize { in bit_length()
454 let bits = mem::size_of::<Limb>() * 8; in bit_length()
468 pub fn ishl_bits(x: &mut Vec<Limb>, n: usize) { in ishl_bits() argument
470 let bits = mem::size_of::<Limb>() * 8; in ishl_bits()
483 let mut prev: Limb = 0; in ishl_bits()
502 pub fn ishl_limbs(x: &mut Vec<Limb>, n: usize) { in ishl_limbs() argument
512 pub fn ishl(x: &mut Vec<Limb>, n: usize) { in ishl() argument
513 let bits = mem::size_of::<Limb>() * 8; in ishl()
528 pub fn normalize(x: &mut Vec<Limb>) { in normalize() argument
549 pub fn compare(x: &[Limb], y: &[Limb]) -> cmp::Ordering { in compare() argument
570 pub fn less(x: &[Limb], y: &[Limb]) -> bool { in less() argument
576 pub fn greater_equal(x: &[Limb], y: &[Limb]) -> bool { in greater_equal() argument
586 pub fn iadd_impl(x: &mut Vec<Limb>, y: &[Limb], xstart: usize) { in iadd_impl() argument
615 pub fn iadd(x: &mut Vec<Limb>, y: &[Limb]) { in iadd() argument
621 pub fn add(x: &[Limb], y: &[Limb]) -> Vec<Limb> { in add() argument
622 let mut z = Vec::<Limb>::default(); in add()
631 pub fn isub(x: &mut Vec<Limb>, y: &[Limb]) { in isub() argument
671 fn long_mul(x: &[Limb], y: &[Limb]) -> Vec<Limb> { in long_mul() argument
676 let mut z: Vec<Limb> = small::mul(x, y[0]); in long_mul()
681 let zi: Vec<Limb> = small::mul(x, yi); in long_mul()
692 pub fn karatsuba_split(z: &[Limb], m: usize) -> (&[Limb], &[Limb]) { in karatsuba_split() argument
699 fn karatsuba_mul(x: &[Limb], y: &[Limb]) -> Vec<Limb> { in karatsuba_mul() argument
736 fn karatsuba_uneven_mul(x: &[Limb], mut y: &[Limb]) -> Vec<Limb> { in karatsuba_uneven_mul() argument
737 let mut result = Vec::<Limb>::default(); in karatsuba_uneven_mul()
759 fn karatsuba_mul_fwd(x: &[Limb], y: &[Limb]) -> Vec<Limb> { in karatsuba_mul_fwd() argument
769 pub fn imul(x: &mut Vec<Limb>, y: &[Limb]) { in imul() argument
794 fn data(&self) -> &Vec<Limb>; in data() argument
797 fn data_mut(&mut self) -> &mut Vec<Limb>; in data_mut() argument
847 fn iadd_small(&mut self, y: Limb) { in iadd_small() argument
855 fn imul_small(&mut self, y: Limb) { in imul_small() argument