isl_output.c: print_nested_tuple: rename "local_dim" argument to "local_space"
[isl.git] / closure.c
blobc76fb298fda015ba0465a6fe71007d0d1579c0e7
1 #include <assert.h>
2 #include <isl/map.h>
3 #include <isl/options.h>
5 int main(int argc, char **argv)
7 struct isl_ctx *ctx;
8 struct isl_map *map;
9 struct isl_options *options;
10 isl_printer *p;
11 int exact;
13 options = isl_options_new_with_defaults();
14 assert(options);
15 argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
17 ctx = isl_ctx_alloc_with_options(&isl_options_args, options);
19 p = isl_printer_to_file(ctx, stdout);
21 map = isl_map_read_from_file(ctx, stdin);
22 map = isl_map_transitive_closure(map, &exact);
23 if (!exact)
24 p = isl_printer_print_str(p, "# NOT exact\n");
25 p = isl_printer_print_map(p, map);
26 p = isl_printer_end_line(p);
27 map = isl_map_compute_divs(map);
28 map = isl_map_coalesce(map);
29 p = isl_printer_print_str(p, "# coalesced\n");
30 p = isl_printer_print_map(p, map);
31 p = isl_printer_end_line(p);
32 isl_map_free(map);
34 isl_printer_free(p);
36 isl_ctx_free(ctx);
38 return 0;