add isl_union_map_range_factor_range
[isl.git] / closure.c
bloba0faa15820add003abc2c3b9ef5aeca2d97e2eb6
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 int exact;
12 options = isl_options_new_with_defaults();
13 assert(options);
14 argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
16 ctx = isl_ctx_alloc_with_options(&isl_options_args, options);
18 map = isl_map_read_from_file(ctx, stdin);
19 map = isl_map_transitive_closure(map, &exact);
20 if (!exact)
21 printf("# NOT exact\n");
22 isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
23 printf("\n");
24 map = isl_map_compute_divs(map);
25 map = isl_map_coalesce(map);
26 printf("# coalesced\n");
27 isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
28 printf("\n");
29 isl_map_free(map);
31 isl_ctx_free(ctx);
33 return 0;