Rename headers from isl_header.h to isl/header.h
[platform/upstream/isl.git] / closure.c
1 #include <assert.h>
2 #include <isl/map.h>
3
4 int main(int argc, char **argv)
5 {
6         struct isl_ctx *ctx;
7         struct isl_map *map;
8         struct isl_options *options;
9         int exact;
10
11         options = isl_options_new_with_defaults();
12         assert(options);
13         argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
14
15         ctx = isl_ctx_alloc_with_options(isl_options_arg, options);
16
17         map = isl_map_read_from_file(ctx, stdin, -1);
18         map = isl_map_transitive_closure(map, &exact);
19         if (!exact)
20                 printf("# NOT exact\n");
21         isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
22         printf("\n");
23         map = isl_map_compute_divs(map);
24         map = isl_map_coalesce(map);
25         printf("# coalesced\n");
26         isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
27         printf("\n");
28         isl_map_free(map);
29
30         isl_ctx_free(ctx);
31
32         return 0;
33 }