|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
Declarations
tools/polly/lib/External/isl/imath/imath.h 69 extern const mp_result MP_OK;
References
tools/polly/lib/External/isl/imath/gmp_compat.c 67 CHECK(mp_rat_init(x));
72 CHECK(mp_rat_mul(multiplier, multiplicand, product));
77 CHECK(mp_rat_copy(op, rop));
82 CHECK(mp_int_abs(op, rop));
87 CHECK(mp_int_add(op1, op2, rop));
112 CHECK(mp_int_init(x));
117 CHECK(mp_int_mul(op1, op2, rop));
122 CHECK(mp_int_neg(op, rop));
127 CHECK(mp_int_set_value(rop, op));
132 CHECK(mp_int_copy(op, rop));
137 CHECK(mp_int_sub(op1, op2, rop));
157 CHECK(mp_rat_set_uvalue(rop, op1, op2));
162 CHECK(mp_int_set_uvalue(rop, op));
177 CHECK(mp_rat_reduce(op));
192 CHECK(mp_int_mul(op1, op2, temp));
193 CHECK(mp_int_add(rop, temp, rop));
200 CHECK(mp_int_div(n, d, q, NULL));
219 CHECK(mp_int_init(r));
220 CHECK(mp_int_div(n, d, NULL, r));
234 CHECK(mp_int_mul(op1, op2, temp));
235 CHECK(mp_int_sub(rop, temp, rop));
244 CHECK(mp_int_init_uvalue(temp, op2));
246 CHECK(mp_int_add(op1, temp, rop));
256 CHECK(mp_int_init_uvalue(temp, d));
258 CHECK(mp_int_div(n, temp, q, NULL));
267 CHECK(mp_int_init_uvalue(temp, op2));
269 CHECK(mp_int_mul(op1, temp, rop));
282 CHECK(mp_int_set_value(rop, 1));
287 CHECK(mp_int_init_uvalue(temp, exp));
288 CHECK(mp_int_expt_full(base, temp, rop));
296 CHECK(mp_int_init_uvalue(temp, op2));
298 CHECK(mp_int_sub(op1, temp, rop));
319 CHECK(mp_int_gcd(op1, op2, rop));
338 CHECK(mp_int_to_string(op, r, str, len));
369 CHECK(mp_rat_to_string(op, r, str, len));
384 return ((res == MP_OK) ? 0 : -1);
414 if (resN != MP_OK || resD != MP_OK)
414 if (resN != MP_OK || resD != MP_OK)
449 if (res == MP_OK)
454 CHECK(res == MP_RANGE ? MP_OK : MP_RANGE);
454 CHECK(res == MP_RANGE ? MP_OK : MP_RANGE);
469 if (res == MP_OK)
474 CHECK(res == MP_RANGE ? MP_OK : MP_RANGE);
474 CHECK(res == MP_RANGE ? MP_OK : MP_RANGE);
503 CHECK(mp_int_lcm(op1, op2, rop));
504 CHECK(mp_int_abs(rop, rop));
513 CHECK(mp_int_mul_pow2(op1, op2, rop));
565 CHECK(mp_int_init(r));
572 CHECK(mp_int_div(n, d, q, r));
579 CHECK(mp_int_add_value(q, 1, q));
585 CHECK(mp_int_set_value(q, 1));
597 CHECK(mp_int_init(r));
604 CHECK(mp_int_div(n, d, q, r));
611 CHECK(mp_int_sub_value(q, 1, q));
617 CHECK(mp_int_set_value(q, -1));
634 CHECK(mp_int_init(q));
635 CHECK(mp_int_init(temp));
637 CHECK(mp_int_init_copy(orig_d, d));
638 CHECK(mp_int_init_copy(orig_n, n));
657 CHECK(mp_int_div(n, d, q, NULL));
669 CHECK(mp_int_init_uvalue(temp, d));
670 CHECK(mp_int_init(r));
672 CHECK(mp_int_init_copy(orig_n, n));
677 CHECK(mp_int_to_uint(r, &rl));
844 CHECK((res > 0) == MP_OK);
844 CHECK((res > 0) == MP_OK);
tools/polly/lib/External/isl/imath/imath.c 370 return MP_OK;
402 return MP_OK;
419 if ((res = mp_int_init_size(z, target)) != MP_OK)
427 return MP_OK;
505 return MP_OK;
538 if ((res = mp_int_copy(a, c)) != MP_OK)
542 return MP_OK;
551 if ((res = mp_int_copy(a, c)) != MP_OK)
557 return MP_OK;
601 return MP_OK;
622 return MP_OK;
692 return MP_OK;
716 return MP_OK;
760 return MP_OK;
778 if ((res = mp_int_copy(a, c)) != MP_OK)
782 return MP_OK;
827 return MP_OK;
833 mp_result res = MP_OK;
846 if (r && (res = mp_int_copy(a, r)) != MP_OK)
852 return MP_OK;
869 return MP_OK;
878 if ((res = mp_int_copy(a, q)) != MP_OK)
885 SETUP(mp_int_init_copy(LAST_TEMP(), a));
889 if ((res = mp_int_copy(b, r)) != MP_OK)
896 SETUP(mp_int_init_copy(LAST_TEMP(), b));
899 if ((res = s_udiv_knuth(qout, rout)) != MP_OK) goto CLEANUP;
902 if (q && (res = mp_int_copy(a, q)) != MP_OK) goto CLEANUP;
903 if (r && (res = mp_int_copy(a, r)) != MP_OK) goto CLEANUP;
921 if (q && (res = mp_int_copy(qout, q)) != MP_OK) goto CLEANUP;
922 if (r && (res = mp_int_copy(rout, r)) != MP_OK) goto CLEANUP;
942 if ((res = mp_int_div(a, m, NULL, out)) != MP_OK)
966 if ((res = mp_int_div(a, &vtmp, q, &rtmp)) != MP_OK)
979 mp_result res = MP_OK;
983 if (q != NULL && (res = mp_int_copy(a, q)) == MP_OK)
986 if (res == MP_OK && r != NULL && (res = mp_int_copy(a, r)) == MP_OK)
986 if (res == MP_OK && r != NULL && (res = mp_int_copy(a, r)) == MP_OK)
1002 if ((res = mp_int_init_copy(&t, a)) != MP_OK)
1008 if ((res = mp_int_mul(c, &t, c)) != MP_OK)
1015 if ((res = mp_int_sqr(&t, &t)) != MP_OK)
1034 if ((res = mp_int_init_value(&t, a)) != MP_OK)
1040 if ((res = mp_int_mul(c, &t, c)) != MP_OK)
1047 if ((res = mp_int_sqr(&t, &t)) != MP_OK)
1066 if ((res = mp_int_init_copy(&t, a)) != MP_OK)
1075 if ((res = mp_int_mul(c, &t, c)) != MP_OK)
1082 if ((res = mp_int_sqr(&t, &t)) != MP_OK)
1180 SETUP(mp_int_init_size(TEMP(0), 2 * um));
1181 SETUP(mp_int_init_size(TEMP(1), 2 * um));
1184 SETUP(mp_int_init_size(TEMP(2), 2 * um));
1191 if ((res = mp_int_mod(a, m, TEMP(0))) != MP_OK) goto CLEANUP;
1193 if ((res = s_brmu(TEMP(1), m)) != MP_OK) goto CLEANUP;
1195 if ((res = s_embar(TEMP(0), b, m, TEMP(1), s)) != MP_OK)
1241 SETUP(mp_int_init_size(TEMP(0), 2 * um));
1244 SETUP(mp_int_init_size(TEMP(1), 2 * um));
1251 if ((res = mp_int_mod(a, m, TEMP(0))) != MP_OK) goto CLEANUP;
1253 if ((res = s_embar(TEMP(0), b, m, mu, s)) != MP_OK)
1285 if ((res = mp_int_egcd(a, m, TEMP(0), TEMP(1), NULL)) != MP_OK)
1294 if ((res = mp_int_mod(TEMP(1), m, TEMP(1))) != MP_OK)
1330 if ((res = mp_int_init_copy(&u, a)) != MP_OK)
1332 if ((res = mp_int_init_copy(&v, b)) != MP_OK)
1346 if ((res = mp_int_neg(&v, &t)) != MP_OK)
1350 if ((res = mp_int_copy(&u, &t)) != MP_OK)
1358 if ((res = mp_int_copy(&t, &u)) != MP_OK)
1362 if ((res = mp_int_neg(&t, &v)) != MP_OK)
1366 if ((res = mp_int_sub(&u, &v, &t)) != MP_OK)
1373 if ((res = mp_int_abs(&u, c)) != MP_OK)
1405 if ((res = mp_int_abs(b, c)) != MP_OK) return res;
1406 mp_int_zero(x); (void) mp_int_set_value(y, 1); return MP_OK;
1409 if ((res = mp_int_abs(a, c)) != MP_OK) return res;
1410 (void) mp_int_set_value(x, 1); mp_int_zero(y); return MP_OK;
1420 SETUP(mp_int_init_copy(TEMP(4), a));
1421 SETUP(mp_int_init_copy(TEMP(5), b));
1435 SETUP(mp_int_init_copy(TEMP(6), TEMP(4)));
1436 SETUP(mp_int_init_copy(TEMP(7), TEMP(5)));
1443 if ((res = mp_int_add(TEMP(0), TEMP(7), TEMP(0))) != MP_OK)
1445 if ((res = mp_int_sub(TEMP(1), TEMP(6), TEMP(1))) != MP_OK)
1457 if ((res = mp_int_add(TEMP(2), TEMP(7), TEMP(2))) != MP_OK)
1459 if ((res = mp_int_sub(TEMP(3), TEMP(6), TEMP(3))) != MP_OK)
1468 if ((res = mp_int_sub(TEMP(4), TEMP(5), TEMP(4))) != MP_OK) goto CLEANUP;
1469 if ((res = mp_int_sub(TEMP(0), TEMP(2), TEMP(0))) != MP_OK) goto CLEANUP;
1470 if ((res = mp_int_sub(TEMP(1), TEMP(3), TEMP(1))) != MP_OK) goto CLEANUP;
1473 if ((res = mp_int_sub(TEMP(5), TEMP(4), TEMP(5))) != MP_OK) goto CLEANUP;
1474 if ((res = mp_int_sub(TEMP(2), TEMP(0), TEMP(2))) != MP_OK) goto CLEANUP;
1475 if ((res = mp_int_sub(TEMP(3), TEMP(1), TEMP(3))) != MP_OK) goto CLEANUP;
1479 if (x && (res = mp_int_copy(TEMP(2), x)) != MP_OK) goto CLEANUP;
1480 if (y && (res = mp_int_copy(TEMP(3), y)) != MP_OK) goto CLEANUP;
1511 if ((res = mp_int_init(&lcm)) != MP_OK)
1513 if ((res = mp_int_gcd(a, b, &lcm)) != MP_OK)
1515 if ((res = mp_int_div(a, &lcm, &lcm, NULL)) != MP_OK)
1517 if ((res = mp_int_mul(&lcm, b, &lcm)) != MP_OK)
1532 if (mp_int_div_value(a, v, NULL, &rem) != MP_OK)
1551 mp_result res = MP_OK;
1567 SETUP(mp_int_init_copy(LAST_TEMP(), a));
1568 SETUP(mp_int_init_copy(LAST_TEMP(), a));
1569 SETUP(mp_int_init(LAST_TEMP()));
1570 SETUP(mp_int_init(LAST_TEMP()));
1571 SETUP(mp_int_init(LAST_TEMP()));
1577 if ((res = mp_int_expt(TEMP(1), b, TEMP(2))) != MP_OK)
1583 if ((res = mp_int_sub(TEMP(2), TEMP(0), TEMP(2))) != MP_OK)
1585 if ((res = mp_int_expt(TEMP(1), b - 1, TEMP(3))) != MP_OK)
1587 if ((res = mp_int_mul_value(TEMP(3), b, TEMP(3))) != MP_OK)
1589 if ((res = mp_int_div(TEMP(2), TEMP(3), TEMP(4), NULL)) != MP_OK)
1591 if ((res = mp_int_sub(TEMP(1), TEMP(4), TEMP(4))) != MP_OK)
1595 if ((res = mp_int_sub_value(TEMP(4), 1, TEMP(4))) != MP_OK)
1598 if ((res = mp_int_copy(TEMP(4), TEMP(1))) != MP_OK)
1602 if ((res = mp_int_copy(TEMP(1), c)) != MP_OK)
1640 return MP_OK;
1669 return MP_OK;
1690 if ((res = mp_int_init_copy(&tmp, z)) != MP_OK)
1723 return MP_OK;
1808 return MP_OK;
1883 return MP_OK;
1933 return MP_OK;
2714 if (mp_int_copy(x, q1) != MP_OK)
2761 SETUP(mp_int_init_size(LAST_TEMP(), 4 * umu));
2842 res = MP_OK;
2856 return MP_OK;
2912 if ((res = mp_int_init_size(&q, m + 1)) != MP_OK) return res;
2913 if ((res = mp_int_init_size(&t, n + 1)) != MP_OK) goto CLEANUP;
3125 return (uz == 0) ? MP_OK : MP_TRUNC;
tools/polly/lib/External/isl/imath/imrat.c 55 if ((res = mp_int_init(MP_NUMER_P(r))) != MP_OK)
57 if ((res = mp_int_init(MP_DENOM_P(r))) != MP_OK) {
70 if (mp_rat_init(out) != MP_OK) {
87 if ((res = mp_int_init_size(MP_NUMER_P(r), n_prec)) != MP_OK)
89 if ((res = mp_int_init_size(MP_DENOM_P(r), d_prec)) != MP_OK) {
101 if ((res = mp_int_init_copy(MP_NUMER_P(r), MP_NUMER_P(old))) != MP_OK)
103 if ((res = mp_int_init_copy(MP_DENOM_P(r), MP_DENOM_P(old))) != MP_OK)
116 if ((res = mp_int_set_value(MP_NUMER_P(r), numer)) != MP_OK)
118 if ((res = mp_int_set_value(MP_DENOM_P(r), denom)) != MP_OK)
131 if ((res = mp_int_set_uvalue(MP_NUMER_P(r), numer)) != MP_OK)
133 if ((res = mp_int_set_uvalue(MP_DENOM_P(r), denom)) != MP_OK)
186 if ((res = mp_int_copy(MP_NUMER_P(a), MP_NUMER_P(c))) != MP_OK)
204 if ((res = mp_int_abs(MP_NUMER_P(a), MP_NUMER_P(c))) != MP_OK)
215 if ((res = mp_int_neg(MP_NUMER_P(a), MP_NUMER_P(c))) != MP_OK)
229 if ((res = mp_rat_copy(a, c)) != MP_OK)
242 return MP_OK;
261 if ((res = mp_int_mul(MP_NUMER_P(a), MP_NUMER_P(b), MP_NUMER_P(c))) != MP_OK)
265 if ((res = mp_int_mul(MP_DENOM_P(a), MP_DENOM_P(b), MP_DENOM_P(c))) != MP_OK)
274 mp_result res = MP_OK;
282 if ((res = mp_int_init(&tmp)) != MP_OK) return res;
283 if ((res = mp_int_mul(MP_NUMER_P(a), MP_DENOM_P(b), &tmp)) != MP_OK)
285 if ((res = mp_int_mul(MP_DENOM_P(a), MP_NUMER_P(b), MP_DENOM_P(c))) != MP_OK)
293 if ((res = mp_int_mul(MP_NUMER_P(a), MP_DENOM_P(b), MP_NUMER_P(c))) != MP_OK)
295 if ((res = mp_int_mul(MP_DENOM_P(a), MP_NUMER_P(b), MP_DENOM_P(c))) != MP_OK)
299 if (res != MP_OK)
310 if ((res = mp_int_init_copy(&tmp, b)) != MP_OK)
313 if ((res = mp_int_mul(&tmp, MP_DENOM_P(a), &tmp)) != MP_OK)
316 if ((res = mp_rat_copy(a, c)) != MP_OK)
319 if ((res = mp_int_add(MP_NUMER_P(c), &tmp, MP_NUMER_P(c))) != MP_OK)
334 if ((res = mp_int_init_copy(&tmp, b)) != MP_OK)
337 if ((res = mp_int_mul(&tmp, MP_DENOM_P(a), &tmp)) != MP_OK)
340 if ((res = mp_rat_copy(a, c)) != MP_OK)
343 if ((res = mp_int_sub(MP_NUMER_P(c), &tmp, MP_NUMER_P(c))) != MP_OK)
357 if ((res = mp_rat_copy(a, c)) != MP_OK)
360 if ((res = mp_int_mul(MP_NUMER_P(c), b, MP_NUMER_P(c))) != MP_OK)
373 if ((res = mp_rat_copy(a, c)) != MP_OK)
376 if ((res = mp_int_mul(MP_DENOM_P(c), b, MP_DENOM_P(c))) != MP_OK)
394 if ((res = mp_int_expt(MP_NUMER_P(a), b, MP_NUMER_P(c))) != MP_OK)
435 SETUP(mp_int_init_copy(TEMP(last), MP_NUMER_P(a)), last);
436 SETUP(mp_int_init_copy(TEMP(last), MP_NUMER_P(b)), last);
438 if ((res = mp_int_mul(TEMP(0), MP_DENOM_P(b), TEMP(0))) != MP_OK ||
439 (res = mp_int_mul(TEMP(1), MP_DENOM_P(a), TEMP(1))) != MP_OK)
463 if ((res = mp_rat_init(&tmp)) != MP_OK)
465 if ((res = mp_rat_set_value(&tmp, n, d)) != MP_OK)
484 if ((res = mp_int_to_int(MP_NUMER_P(r), num)) != MP_OK)
499 if ((res = mp_int_to_string(MP_NUMER_P(r), radix, str, limit)) != MP_OK)
504 return MP_OK;
529 SETUP(mp_int_init_copy(TEMP(last), MP_NUMER_P(r)), last);
530 SETUP(mp_int_init(TEMP(last)), last);
531 SETUP(mp_int_init(TEMP(last)), last);
536 if ((res = mp_int_div(TEMP(0), MP_DENOM_P(r), TEMP(0), TEMP(1))) != MP_OK)
545 if ((res = mp_int_mul_value(TEMP(1), radix, TEMP(1))) != MP_OK)
552 if ((res = mp_int_expt_value(radix, prec - lead_0, TEMP(2))) != MP_OK)
554 if ((res = mp_int_mul(TEMP(1), TEMP(2), TEMP(1))) != MP_OK)
557 if ((res = mp_int_div(TEMP(1), MP_DENOM_P(r), TEMP(1), TEMP(2))) != MP_OK)
580 if ((res = mp_int_mul_pow2(TEMP(2), 1, TEMP(2))) != MP_OK)
613 if ((res = mp_int_to_string(TEMP(0), radix, start, left)) != MP_OK)
687 if ((res = mp_int_read_cstring(MP_NUMER_P(r), radix, str, &endp)) != MP_OK &&
704 if ((res = mp_int_read_cstring(MP_DENOM_P(r), radix, endp, end)) != MP_OK)
729 if ((res = mp_rat_read_cstring(r, radix, str, &endp)) != MP_OK) {
767 if ((res = mp_int_read_cstring(MP_NUMER_P(r), radix, str, &endp)) != MP_OK &&
793 return MP_OK;
805 if ((res = mp_int_init(&frac)) != MP_OK)
808 if ((res = mp_int_read_cstring(&frac, radix, endp, &endp)) != MP_OK &&
820 if ((res = mp_int_div_value(&frac, radix, &frac, NULL)) != MP_OK)
832 if ((res = mp_int_mul_value(MP_DENOM_P(r), radix, MP_DENOM_P(r))) != MP_OK)
838 if ((res = mp_int_mul_value(MP_DENOM_P(r), radix, MP_DENOM_P(r))) != MP_OK)
847 if ((res = mp_int_mul(MP_NUMER_P(r), MP_DENOM_P(r), MP_NUMER_P(r))) != MP_OK)
852 if ((res = mp_int_add(MP_NUMER_P(r), &frac, MP_NUMER_P(r))) != MP_OK)
857 if ((res = s_rat_reduce(r)) != MP_OK)
881 mp_result res = MP_OK;
885 return MP_OK;
890 if ((res = mp_int_init(&gcd)) != MP_OK)
893 if ((res = mp_int_gcd(MP_NUMER_P(r), MP_DENOM_P(r), &gcd)) != MP_OK)
897 if ((res = mp_int_div(MP_NUMER_P(r), &gcd, MP_NUMER_P(r), NULL)) != MP_OK)
899 if ((res = mp_int_div(MP_DENOM_P(r), &gcd, MP_DENOM_P(r), NULL)) != MP_OK)
924 if ((res = (comb_f)(MP_NUMER_P(a), MP_NUMER_P(b), MP_NUMER_P(c))) != MP_OK)
926 if ((res = mp_int_copy(MP_DENOM_P(a), MP_DENOM_P(c))) != MP_OK)
935 SETUP(mp_int_init_copy(TEMP(last), MP_NUMER_P(a)), last);
936 SETUP(mp_int_init_copy(TEMP(last), MP_NUMER_P(b)), last);
938 if ((res = mp_int_mul(TEMP(0), MP_DENOM_P(b), TEMP(0))) != MP_OK)
940 if ((res = mp_int_mul(TEMP(1), MP_DENOM_P(a), TEMP(1))) != MP_OK)
942 if ((res = (comb_f)(TEMP(0), TEMP(1), MP_NUMER_P(c))) != MP_OK)
951 if (res == MP_OK)
tools/polly/lib/External/isl/isl_imath.c 21 return res == MP_OK;
30 return res == MP_OK;
tools/polly/lib/External/isl/isl_int_sioimath.h 396 if (mp_int_to_int(isl_sioimath_get_big(*dst), &small) != MP_OK)
465 return mp_int_to_int(isl_sioimath_get_big(val), &dummy) == MP_OK;
491 return mp_int_to_uint(isl_sioimath_get_big(val), &dummy) == MP_OK;