| 1 | /* |
|---|---|
| 2 | * Copyright 2017 Sven Verdoolaege |
| 3 | * |
| 4 | * Use of this software is governed by the MIT license |
| 5 | * |
| 6 | * Written by Sven Verdoolaege. |
| 7 | */ |
| 8 | |
| 9 | /* This program takes an isl_union_access_info object as input and |
| 10 | * prints the corresponding dependences. |
| 11 | */ |
| 12 | |
| 13 | #include <isl/options.h> |
| 14 | #include <isl/printer.h> |
| 15 | #include <isl/union_map.h> |
| 16 | #include <isl/flow.h> |
| 17 | #include <isl/schedule.h> |
| 18 | |
| 19 | int main(int argc, char **argv) |
| 20 | { |
| 21 | isl_ctx *ctx; |
| 22 | isl_printer *p; |
| 23 | isl_union_access_info *access; |
| 24 | isl_union_flow *flow; |
| 25 | struct isl_options *options; |
| 26 | |
| 27 | options = isl_options_new_with_defaults(); |
| 28 | argc = isl_options_parse(opt: options, argc, argv, ISL_ARG_ALL); |
| 29 | ctx = isl_ctx_alloc_with_options(args: &isl_options_args, opt: options); |
| 30 | |
| 31 | access = isl_union_access_info_read_from_file(ctx, stdin); |
| 32 | flow = isl_union_access_info_compute_flow(access); |
| 33 | |
| 34 | p = isl_printer_to_file(ctx, stdout); |
| 35 | p = isl_printer_set_yaml_style(p, ISL_YAML_STYLE_BLOCK); |
| 36 | p = isl_printer_print_union_flow(p, flow); |
| 37 | isl_printer_free(printer: p); |
| 38 | |
| 39 | isl_union_flow_free(flow); |
| 40 | |
| 41 | isl_ctx_free(ctx); |
| 42 | |
| 43 | return 0; |
| 44 | } |
| 45 |
