Lines Matching refs:limb_type

63     typedef L limb_type;  typedef in Bigint
69 limb_bits = sizeof(limb_type) * 8,
70 half_limb_bits = sizeof(limb_type) * 4
73 limb_high_bit = limb_type(1) << (limb_bits - 1),
74 limb_half = limb_type(1) << half_limb_bits,
76 limb_zero = limb_type(0)
82 static inline half_limb_type low(limb_type x) { in low()
87 static inline half_limb_type high(limb_type x) { in high()
101 static void add(limb_type &x1, limb_type &x0, in add()
102 limb_type a1, limb_type a0, limb_type b1, limb_type b0) { in add()
113 static void multiply(limb_type &x1, limb_type &x0, in multiply()
114 limb_type a, limb_type b) { in multiply()
124 static void multiply_half(limb_type &x1, limb_type &x0, in multiply_half()
125 limb_type a, half_limb_type b) { in multiply_half()
126 if (has_fast_int_multiply<limb_type>::value) in multiply_half()
131 limb_type r0 = (limb_type) al * b; in multiply_half()
133 limb_type r1 = (limb_type) ah * b; in multiply_half()
134 limb_type r2 = high(r0) + r1; in multiply_half()
146 static limb_type inverse(limb_type x) { in inverse()
147 limb_type y1 = ~x, y0 = ~limb_zero; in inverse()
150 limb_type x1 = high(x), x0 = low(x); in inverse()
151 limb_type q1 = y1 / x1; in inverse()
152 limb_type r1 = y1 - q1 * x1; in inverse()
153 limb_type m = q1 * x0; in inverse()
162 limb_type q0 = r1 / x1; in inverse()
163 limb_type r0 = r1 - q0 * x1; in inverse()
180 static click_uintmax_t set(limb_type *a, int n, click_uintmax_t b) { in set()
200 static limb_type multiply_add(limb_type *x, const limb_type *a, int n, in multiply_add()
201 limb_type b) { in multiply_add()
202 limb_type carry = 0; in multiply_add()
204 limb_type x0, x1; in multiply_add()
227 static limb_type multiply(limb_type *x, const limb_type *a, int n, in multiply()
228 limb_type b, limb_type carry = 0) { in multiply()
230 limb_type x0, x1; in multiply()
251 static limb_type multiply_half(limb_type *x, const limb_type *a, int n, in multiply_half()
252 half_limb_type b, limb_type carry = 0) { in multiply_half()
254 limb_type x0, x1; in multiply_half()
274 static limb_type divide(limb_type *x, const limb_type *a, int n, in divide()
275 limb_type b) { in divide()
278 limb_type r = 0; in divide()
288 limb_type b_inverse = inverse(b); in divide()
309 limb_type b_inverse = inverse(b); in divide()
311 limb_type a1 = *a; in divide()
315 limb_type a0 = *a; in divide()
334 static String unparse_clear(limb_type *x, int n, int base = 10, bool uppercase = false) { in unparse_clear()
369 static void preinverted_divide(limb_type &q, limb_type &r, in preinverted_divide()
370 limb_type a1, limb_type a0, limb_type b, in preinverted_divide()
371 limb_type b_inverse) { in preinverted_divide()
372 limb_type a0_mask = (a0 & limb_high_bit ? ~limb_zero : limb_zero); in preinverted_divide()
373 limb_type a0_adjusted = a0 + (b & a0_mask); in preinverted_divide()
374 limb_type x1, x0; in preinverted_divide()
377 limb_type q1 = ~x1; in preinverted_divide()