isl_scheduler.c: compute_max_coefficient: round up half of minimal size
[isl.git] / schedule.c
blob797f086efe0550511d959fb873a653568403accb
1 /*
2 * Copyright 2016 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
7 */
9 /* This program takes an isl_schedule_constraints object as input and
10 * prints a schedule that satisfies those constraints.
13 #include <isl/options.h>
14 #include <isl/schedule.h>
16 int main(int argc, char **argv)
18 isl_ctx *ctx;
19 isl_printer *p;
20 isl_schedule_constraints *sc;
21 isl_schedule *schedule;
22 struct isl_options *options;
24 options = isl_options_new_with_defaults();
25 argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
26 ctx = isl_ctx_alloc_with_options(&isl_options_args, options);
28 sc = isl_schedule_constraints_read_from_file(ctx, stdin);
29 schedule = isl_schedule_constraints_compute_schedule(sc);
31 p = isl_printer_to_file(ctx, stdout);
32 p = isl_printer_set_yaml_style(p, ISL_YAML_STYLE_BLOCK);
33 p = isl_printer_print_schedule(p, schedule);
34 isl_printer_free(p);
36 isl_schedule_free(schedule);
38 isl_ctx_free(ctx);
40 return 0;