summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <sven@nestor.cs.kuleuven.be>2010-11-14 14:11:42 +0100
committerSven Verdoolaege <skimo@kotnet.org>2010-11-14 15:40:09 +0100
commit9149cbdb3d852e5c4575f2eeddc51c8cfa69c05b (patch)
tree0bc247f30565a5c3c4a7a230d938f7a4af9ec07c
parent3fc4e41cbe232710979e1774440788f28caf3613 (diff)
downloadisl-9149cbdb3d852e5c4575f2eeddc51c8cfa69c05b.tar.gz
isl-9149cbdb3d852e5c4575f2eeddc51c8cfa69c05b.tar.bz2
isl-9149cbdb3d852e5c4575f2eeddc51c8cfa69c05b.zip
isl_printer_print_pw_qpolynomial{,_fold}: always print special domains
If the domain of a piecewise quasipolynomial (fold) is the zero-dimensional space, then we don't print the "[] -> " to avoid clutter. However, if the domain has a name or if it has internal structure then it should be printed explicitly as otherwise no distinction can be made with the unnamed unstructured zero-dimensional space. Signed-off-by: Sven Verdoolaege <sven@nestor.cs.kuleuven.be>
-rw-r--r--isl_output.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/isl_output.c b/isl_output.c
index 6f81e1ae..305b9cbf 100644
--- a/isl_output.c
+++ b/isl_output.c
@@ -1451,8 +1451,8 @@ static __isl_give isl_printer *isl_pwqp_print_isl_body(
for (i = 0; i < pwqp->n; ++i) {
if (i)
p = isl_printer_print_str(p, "; ");
- if (isl_dim_size(pwqp->p[i].set->dim, isl_dim_set) > 0 ||
- isl_dim_get_tuple_name(pwqp->p[i].set->dim, isl_dim_set)) {
+ if (isl_dim_size(pwqp->dim, isl_dim_set) > 0 ||
+ isl_dim_is_named_or_nested(pwqp->dim, isl_dim_set)) {
p = print_dim(pwqp->p[i].set->dim, p, 1, 0, NULL);
p = isl_printer_print_str(p, " -> ");
}
@@ -1475,7 +1475,8 @@ static __isl_give isl_printer *print_pw_qpolynomial_isl(
}
p = isl_printer_print_str(p, "{ ");
if (pwqp->n == 0) {
- if (isl_dim_size(pwqp->dim, isl_dim_set) > 0) {
+ if (isl_dim_size(pwqp->dim, isl_dim_set) > 0 ||
+ isl_dim_is_named_or_nested(pwqp->dim, isl_dim_set)) {
p = print_dim(pwqp->dim, p, 1, 0, NULL);
p = isl_printer_print_str(p, " -> ");
}
@@ -1512,7 +1513,8 @@ static __isl_give isl_printer *isl_pwf_print_isl_body(
for (i = 0; i < pwf->n; ++i) {
if (i)
p = isl_printer_print_str(p, "; ");
- if (isl_dim_size(pwf->p[i].set->dim, isl_dim_set) > 0) {
+ if (isl_dim_size(pwf->dim, isl_dim_set) > 0 ||
+ isl_dim_is_named_or_nested(pwf->dim, isl_dim_set)) {
p = print_dim(pwf->p[i].set->dim, p, 1, 0, NULL);
p = isl_printer_print_str(p, " -> ");
}
@@ -1532,7 +1534,8 @@ static __isl_give isl_printer *print_pw_qpolynomial_fold_isl(
}
p = isl_printer_print_str(p, "{ ");
if (pwf->n == 0) {
- if (isl_dim_size(pwf->dim, isl_dim_set) > 0) {
+ if (isl_dim_size(pwf->dim, isl_dim_set) > 0 ||
+ isl_dim_is_named_or_nested(pwf->dim, isl_dim_set)) {
p = print_dim(pwf->dim, p, 1, 0, NULL);
p = isl_printer_print_str(p, " -> ");
}