diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-12-27 23:03:53 +0100 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-12-29 12:03:14 +0100 |
commit | a154ddc405ec5bee16e2348eca7828455110ec9c (patch) | |
tree | df00328732d6041ec38f9f066c807dcdac10ad95 /isl_output.c | |
parent | 81ca70df85f895df8311f7ae151929fb9da59a68 (diff) | |
download | isl-a154ddc405ec5bee16e2348eca7828455110ec9c.tar.gz isl-a154ddc405ec5bee16e2348eca7828455110ec9c.tar.bz2 isl-a154ddc405ec5bee16e2348eca7828455110ec9c.zip |
isl_printer_print_qpolynomial_fold: support C format
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'isl_output.c')
-rw-r--r-- | isl_output.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/isl_output.c b/isl_output.c index 54fda96f..b103b5e0 100644 --- a/isl_output.c +++ b/isl_output.c @@ -1470,18 +1470,6 @@ static __isl_give isl_printer *qpolynomial_fold_print( return p; } -__isl_give isl_printer *isl_printer_print_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold) -{ - if (!p || !fold) - goto error; - p = qpolynomial_fold_print(fold, p); - return p; -error: - isl_printer_free(p); - return NULL; -} - void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, FILE *out, unsigned output_format) { @@ -1882,6 +1870,22 @@ static __isl_give isl_printer *print_qpolynomial_fold_c( return p; } +__isl_give isl_printer *isl_printer_print_qpolynomial_fold( + __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold) +{ + if (!p || !fold) + goto error; + if (p->output_format == ISL_FORMAT_ISL) + return qpolynomial_fold_print(fold, p); + else if (p->output_format == ISL_FORMAT_C) + return print_qpolynomial_fold_c(p, fold->dim, fold); + isl_die(p->ctx, isl_error_unsupported, "unsupported output format", + goto error); +error: + isl_printer_free(p); + return NULL; +} + static __isl_give isl_printer *print_pw_qpolynomial_fold_c( __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) { |