[PATCH] Avoid use of undocumented isl_*_print functions

27 views
Skip to first unread message

skimo...@kotnet.org

unread,
Feb 12, 2015, 9:50:46 AM2/12/15
to cloog-de...@googlegroups.com
From: Sven Verdoolaege <sk...@kotnet.org>

They will be removed in the next release of isl.

Reported-by: Nathan Royce <nar...@hotmail.com>
Signed-off-by: Sven Verdoolaege <sk...@kotnet.org>
---
source/isl/domain.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/source/isl/domain.c b/source/isl/domain.c
index 97cfe48..fbc0255 100644
--- a/source/isl/domain.c
+++ b/source/isl/domain.c
@@ -68,25 +68,34 @@ CloogConstraintSet *cloog_domain_constraints(CloogDomain *domain)
void cloog_domain_print_constraints(FILE *foo, CloogDomain *domain,
int print_number)
{
+ isl_printer *p;
isl_basic_set *bset;
isl_set *set = isl_set_from_cloog_domain(domain);

- if (print_number)
- isl_set_print(set, foo, 0, ISL_FORMAT_EXT_POLYLIB);
- else {
+ p = isl_printer_to_file(isl_set_get_ctx(set), foo);
+ if (print_number) {
+ p = isl_printer_set_output_format(p, ISL_FORMAT_EXT_POLYLIB);
+ p = isl_printer_print_set(p, set);
+ } else {
assert(isl_set_n_basic_set(set) == 1);
bset = isl_set_copy_basic_set(set);
- isl_basic_set_print(bset, foo,
- 0, NULL, NULL, ISL_FORMAT_POLYLIB);
+ p = isl_printer_set_output_format(p, ISL_FORMAT_POLYLIB);
+ p = isl_printer_print_basic_set(p, bset);
isl_basic_set_free(bset);
}
+ isl_printer_free(p);
}


void cloog_scattering_print_constraints(FILE *foo, CloogScattering *scattering)
{
isl_map *map = isl_map_from_cloog_scattering(scattering);
- isl_map_print(map, foo, 0, ISL_FORMAT_EXT_POLYLIB);
+ isl_printer *p;
+
+ p = isl_printer_to_file(isl_map_get_ctx(map), foo);
+ p = isl_printer_set_output_format(p, ISL_FORMAT_EXT_POLYLIB);
+ p = isl_printer_print_map(p, map);
+ isl_printer_free(p);
}


@@ -345,6 +354,7 @@ void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level,
{
int i ;
isl_set *set = isl_set_from_cloog_domain(domain);
+ isl_printer *p;

/* Go to the right level. */
for (i = 0; i < level; i++)
@@ -358,7 +368,9 @@ void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level,
for (i = 0; i < level+1; ++i)
fprintf(file, "|\t");

- isl_set_print(set, file, 0, ISL_FORMAT_ISL);
+ p = isl_printer_to_file(isl_set_get_ctx(set), file);
+ p = isl_printer_print_set(p, set);
+ isl_printer_free(p);

fprintf(file, "\n");
}
--
1.9.1

Cédric Bastoul

unread,
Feb 13, 2015, 7:16:08 PM2/13/15
to Sven Verdoolaege, CLooG Development
Thanks a lot, Sven :-) !
++

Ced.


--
--
You got this message because you subscribed to the CLooG Development mailing list.
To send messages to this list, use cloog-de...@googlegroups.com
To stop subscribing, send a mail to cloog-developm...@googlegroups.com
For more options and to visit the group, http://groups.google.fr/group/cloog-development?hl=en
---
You received this message because you are subscribed to the Google Groups "CLooG Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloog-developm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages