Lines Matching refs:fold1
436 __isl_take isl_qpolynomial_fold *fold1, in isl_qpolynomial_fold_fold_on_domain() argument
444 if (!fold1 || !fold2) in isl_qpolynomial_fold_fold_on_domain()
447 isl_assert(fold1->dim->ctx, fold1->type == fold2->type, goto error); in isl_qpolynomial_fold_fold_on_domain()
448 isl_assert(fold1->dim->ctx, isl_space_is_equal(fold1->dim, fold2->dim), in isl_qpolynomial_fold_fold_on_domain()
451 better = fold1->type == isl_fold_max ? -1 : 1; in isl_qpolynomial_fold_fold_on_domain()
453 if (isl_qpolynomial_fold_is_empty(fold1) || in isl_qpolynomial_fold_fold_on_domain()
455 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_fold_on_domain()
460 isl_qpolynomial_fold_is_nan(fold1)) { in isl_qpolynomial_fold_fold_on_domain()
462 return fold1; in isl_qpolynomial_fold_fold_on_domain()
465 res = qpolynomial_fold_alloc(fold1->type, isl_space_copy(fold1->dim), in isl_qpolynomial_fold_fold_on_domain()
466 fold1->n + fold2->n); in isl_qpolynomial_fold_fold_on_domain()
470 for (i = 0; i < fold1->n; ++i) { in isl_qpolynomial_fold_fold_on_domain()
471 res->qp[res->n] = isl_qpolynomial_copy(fold1->qp[i]); in isl_qpolynomial_fold_fold_on_domain()
513 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_fold_on_domain()
519 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_fold_on_domain()
558 __isl_take isl_qpolynomial_fold *fold1, in isl_qpolynomial_fold_add_on_domain() argument
564 if (!fold1 || !fold2) in isl_qpolynomial_fold_add_on_domain()
567 if (isl_qpolynomial_fold_is_empty(fold1)) { in isl_qpolynomial_fold_add_on_domain()
568 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_add_on_domain()
574 return fold1; in isl_qpolynomial_fold_add_on_domain()
577 if (fold1->n == 1 && fold2->n != 1) in isl_qpolynomial_fold_add_on_domain()
578 return isl_qpolynomial_fold_add_on_domain(dom, fold2, fold1); in isl_qpolynomial_fold_add_on_domain()
581 res = isl_qpolynomial_fold_add_qpolynomial(fold1, in isl_qpolynomial_fold_add_on_domain()
588 isl_qpolynomial_fold_copy(fold1), in isl_qpolynomial_fold_add_on_domain()
594 isl_qpolynomial_fold_copy(fold1), in isl_qpolynomial_fold_add_on_domain()
599 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_add_on_domain()
604 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_add_on_domain()
832 __isl_take isl_qpolynomial_fold *fold1, in isl_qpolynomial_fold_fold() argument
838 if (!fold1 || !fold2) in isl_qpolynomial_fold_fold()
841 isl_assert(fold1->dim->ctx, fold1->type == fold2->type, goto error); in isl_qpolynomial_fold_fold()
842 isl_assert(fold1->dim->ctx, isl_space_is_equal(fold1->dim, fold2->dim), in isl_qpolynomial_fold_fold()
845 if (isl_qpolynomial_fold_is_empty(fold1)) { in isl_qpolynomial_fold_fold()
846 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_fold()
852 return fold1; in isl_qpolynomial_fold_fold()
855 res = qpolynomial_fold_alloc(fold1->type, isl_space_copy(fold1->dim), in isl_qpolynomial_fold_fold()
856 fold1->n + fold2->n); in isl_qpolynomial_fold_fold()
860 for (i = 0; i < fold1->n; ++i) { in isl_qpolynomial_fold_fold()
861 res->qp[res->n] = isl_qpolynomial_copy(fold1->qp[i]); in isl_qpolynomial_fold_fold()
874 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_fold()
880 isl_qpolynomial_fold_free(fold1); in isl_qpolynomial_fold_fold()
1059 int isl_qpolynomial_fold_plain_cmp(__isl_keep isl_qpolynomial_fold *fold1, in isl_qpolynomial_fold_plain_cmp() argument
1064 if (fold1 == fold2) in isl_qpolynomial_fold_plain_cmp()
1066 if (!fold1) in isl_qpolynomial_fold_plain_cmp()
1071 if (fold1->n != fold2->n) in isl_qpolynomial_fold_plain_cmp()
1072 return fold1->n - fold2->n; in isl_qpolynomial_fold_plain_cmp()
1074 for (i = 0; i < fold1->n; ++i) { in isl_qpolynomial_fold_plain_cmp()
1077 cmp = isl_qpolynomial_plain_cmp(fold1->qp[i], fold2->qp[i]); in isl_qpolynomial_fold_plain_cmp()
1085 int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1, in isl_qpolynomial_fold_plain_is_equal() argument
1090 if (!fold1 || !fold2) in isl_qpolynomial_fold_plain_is_equal()
1093 if (fold1->n != fold2->n) in isl_qpolynomial_fold_plain_is_equal()
1097 for (i = 0; i < fold1->n; ++i) { in isl_qpolynomial_fold_plain_is_equal()
1098 int eq = isl_qpolynomial_plain_is_equal(fold1->qp[i], fold2->qp[i]); in isl_qpolynomial_fold_plain_is_equal()
1201 __isl_keep isl_qpolynomial_fold *fold1, in qpolynomial_fold_covers_on_domain() argument
1207 if (!set || !fold1 || !fold2) in qpolynomial_fold_covers_on_domain()
1210 covers = fold1->type == isl_fold_max ? 1 : -1; in qpolynomial_fold_covers_on_domain()
1213 for (j = 0; j < fold1->n; ++j) { in qpolynomial_fold_covers_on_domain()
1218 isl_qpolynomial_copy(fold1->qp[j]), in qpolynomial_fold_covers_on_domain()
1225 if (j >= fold1->n) in qpolynomial_fold_covers_on_domain()