/* Clear all memory allocated by "grouping". */ static void ppcg_grouping_clear(struct ppcg_grouping *grouping) { isl_union_map_free(grouping->dep); isl_union_set_free(grouping->domain); isl_union_pw_multi_aff_free(grouping->contraction); isl_schedule_free(grouping->schedule); }
int main(int argc, char **argv) { isl_ctx *ctx; isl_printer *p; isl_schedule_constraints *sc; isl_schedule *schedule; struct isl_options *options; options = isl_options_new_with_defaults(); argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL); ctx = isl_ctx_alloc_with_options(&isl_options_args, options); sc = isl_schedule_constraints_read_from_file(ctx, stdin); schedule = isl_schedule_constraints_compute_schedule(sc); p = isl_printer_to_file(ctx, stdout); p = isl_printer_set_yaml_style(p, ISL_YAML_STYLE_BLOCK); p = isl_printer_print_schedule(p, schedule); isl_printer_free(p); isl_schedule_free(schedule); isl_ctx_free(ctx); return p ? EXIT_SUCCESS : EXIT_FAILURE; }
/* Construct a schedule with "domain" as domain, that executes * the elements of "list" in order (as a sequence). */ static __isl_give isl_schedule *schedule_from_domain_and_list( __isl_keep isl_union_set *domain, __isl_keep isl_union_set_list *list) { isl_schedule *schedule; isl_schedule_node *node; schedule = isl_schedule_from_domain(isl_union_set_copy(domain)); node = isl_schedule_get_root(schedule); isl_schedule_free(schedule); node = isl_schedule_node_child(node, 0); list = isl_union_set_list_copy(list); node = isl_schedule_node_insert_sequence(node, list); schedule = isl_schedule_node_get_schedule(node); isl_schedule_node_free(node); return schedule; }