print_name(dim, out, type, pos, set);
}
-static void print_affine(__isl_keep isl_basic_map *bmap, FILE *out,
- isl_int *c, int set)
+static void print_affine(__isl_keep isl_basic_map *bmap,
+ __isl_keep isl_dim *dim, FILE *out, isl_int *c, int set)
{
int i;
int first;
fprintf(out, " + ");
}
first = 0;
- print_term(bmap->dim, c[i], i, out, set);
+ print_term(dim, c[i], i, out, set);
if (flip)
isl_int_neg(c[i], c[i]);
}
fprintf(out, "0");
}
-static void print_constraint(struct isl_basic_map *bmap, FILE *out,
+static void print_constraint(struct isl_basic_map *bmap,
+ __isl_keep isl_dim *dim, FILE *out,
isl_int *c, int last, const char *op, int first_constraint, int set)
{
if (!first_constraint)
isl_int_abs(c[last], c[last]);
- print_term(bmap->dim, c[last], last, out, set);
+ print_term(dim, c[last], last, out, set);
fprintf(out, " %s ", op);
isl_int_set_si(c[last], 0);
- print_affine(bmap, out, c, set);
+ print_affine(bmap, dim, out, c, set);
}
-static void print_constraints(__isl_keep isl_basic_map *bmap, FILE *out,
- int set)
+static void print_constraints(__isl_keep isl_basic_map *bmap,
+ __isl_keep isl_dim *dim, FILE *out, int set)
{
int i;
struct isl_vec *c;
isl_seq_cpy(c->el, bmap->eq[i], 1 + total);
else
isl_seq_neg(c->el, bmap->eq[i], 1 + total);
- print_constraint(bmap, out, c->el, l,
+ print_constraint(bmap, dim, out, c->el, l,
"=", i == bmap->n_eq - 1, set);
}
for (i = 0; i < bmap->n_ineq; ++i) {
isl_seq_cpy(c->el, bmap->ineq[i], 1 + total);
else
isl_seq_neg(c->el, bmap->ineq[i], 1 + total);
- print_constraint(bmap, out, c->el, l,
+ print_constraint(bmap, dim, out, c->el, l,
s < 0 ? "<=" : ">=", !bmap->n_eq && !i, set);
}
}
fprintf(out, ": ");
}
- print_constraints(bmap, out, set);
+ print_constraints(bmap, bmap->dim, out, set);
if (bmap->n_div > 0)
fprintf(out, ")");
}
fprintf(out, "\n");
}
-static void print_disjunct(__isl_keep isl_basic_map *bmap, FILE *out, int set)
+static void print_disjunct(__isl_keep isl_basic_map *bmap,
+ __isl_keep isl_dim *dim, FILE *out, int set)
{
if (bmap->n_div > 0) {
int i;
for (i = 0; i < bmap->n_div; ++i) {
if (i)
fprintf(out, ", ");
- print_name(bmap->dim, out, isl_dim_div, i, 0);
+ print_name(dim, out, isl_dim_div, i, 0);
if (isl_int_is_zero(bmap->div[i][0]))
continue;
fprintf(out, " = [(");
- print_affine(bmap, out, bmap->div[i] + 1, set);
+ print_affine(bmap, dim, out, bmap->div[i] + 1, set);
fprintf(out, ")/");
isl_int_print(out, bmap->div[i][0], 0);
fprintf(out, "]");
fprintf(out, ": ");
}
- print_constraints(bmap, out, set);
+ print_constraints(bmap, dim, out, set);
if (bmap->n_div > 0)
fprintf(out, ")");
fprintf(out, " -> ");
print_tuple(bmap->dim, out, isl_dim_out, 0);
fprintf(out, " : ");
- print_disjunct(bmap, out, 0);
+ print_disjunct(bmap, bmap->dim, out, 0);
fprintf(out, " }%s\n", suffix ? suffix : "");
}
fprintf(out, "{ ");
print_tuple(bset->dim, out, isl_dim_set, 1);
fprintf(out, " : ");
- print_disjunct((isl_basic_map *)bset, out, 1);
+ print_disjunct((isl_basic_map *)bset, bset->dim, out, 1);
fprintf(out, " }%s\n", suffix ? suffix : "");
}
fprintf(out, " or ");
if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1)
fprintf(out, "(");
- print_disjunct(map->p[i], out, 0);
+ print_disjunct(map->p[i], map->dim, out, 0);
if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1)
fprintf(out, ")");
}
for (i = 0; i < set->n; ++i) {
if (i)
fprintf(out, " or ");
- print_disjunct((isl_basic_map *)set->p[i], out, 1);
+ print_disjunct((isl_basic_map *)set->p[i], set->dim, out, 1);
}
fprintf(out, " }\n");
}