add isl_schedule_insert_guard
[isl.git] / include / isl / schedule.h
blob9886fa46dfc12c783c66ff31804a6a08c2dc8dad
1 #ifndef ISL_SCHEDULE_H
2 #define ISL_SCHEDULE_H
4 #include <isl/union_set_type.h>
5 #include <isl/union_map_type.h>
6 #include <isl/schedule_type.h>
7 #include <isl/aff_type.h>
8 #include <isl/band.h>
9 #include <isl/space.h>
10 #include <isl/set_type.h>
11 #include <isl/list.h>
13 #if defined(__cplusplus)
14 extern "C" {
15 #endif
17 struct isl_schedule_constraints;
18 typedef struct isl_schedule_constraints isl_schedule_constraints;
20 int isl_options_set_schedule_max_coefficient(isl_ctx *ctx, int val);
21 int isl_options_get_schedule_max_coefficient(isl_ctx *ctx);
23 int isl_options_set_schedule_max_constant_term(isl_ctx *ctx, int val);
24 int isl_options_get_schedule_max_constant_term(isl_ctx *ctx);
26 int isl_options_set_schedule_maximize_band_depth(isl_ctx *ctx, int val);
27 int isl_options_get_schedule_maximize_band_depth(isl_ctx *ctx);
29 int isl_options_set_schedule_outer_coincidence(isl_ctx *ctx, int val);
30 int isl_options_get_schedule_outer_coincidence(isl_ctx *ctx);
32 int isl_options_set_schedule_split_scaled(isl_ctx *ctx, int val);
33 int isl_options_get_schedule_split_scaled(isl_ctx *ctx);
35 int isl_options_set_schedule_separate_components(isl_ctx *ctx, int val);
36 int isl_options_get_schedule_separate_components(isl_ctx *ctx);
38 #define ISL_SCHEDULE_FUSE_MAX 0
39 #define ISL_SCHEDULE_FUSE_MIN 1
40 int isl_options_set_schedule_fuse(isl_ctx *ctx, int val);
41 int isl_options_get_schedule_fuse(isl_ctx *ctx);
43 __isl_give isl_schedule_constraints *isl_schedule_constraints_copy(
44 __isl_keep isl_schedule_constraints *sc);
45 __isl_give isl_schedule_constraints *isl_schedule_constraints_on_domain(
46 __isl_take isl_union_set *domain);
47 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_context(
48 __isl_take isl_schedule_constraints *sc, __isl_take isl_set *context);
49 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_validity(
50 __isl_take isl_schedule_constraints *sc,
51 __isl_take isl_union_map *validity);
52 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_coincidence(
53 __isl_take isl_schedule_constraints *sc,
54 __isl_take isl_union_map *coincidence);
55 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_proximity(
56 __isl_take isl_schedule_constraints *sc,
57 __isl_take isl_union_map *proximity);
58 __isl_give isl_schedule_constraints *
59 isl_schedule_constraints_set_conditional_validity(
60 __isl_take isl_schedule_constraints *sc,
61 __isl_take isl_union_map *condition,
62 __isl_take isl_union_map *validity);
63 __isl_null isl_schedule_constraints *isl_schedule_constraints_free(
64 __isl_take isl_schedule_constraints *sc);
66 isl_ctx *isl_schedule_constraints_get_ctx(
67 __isl_keep isl_schedule_constraints *sc);
69 void isl_schedule_constraints_dump(__isl_keep isl_schedule_constraints *sc);
71 __isl_give isl_schedule *isl_schedule_constraints_compute_schedule(
72 __isl_take isl_schedule_constraints *sc);
74 __isl_give isl_schedule *isl_union_set_compute_schedule(
75 __isl_take isl_union_set *domain,
76 __isl_take isl_union_map *validity,
77 __isl_take isl_union_map *proximity);
79 __isl_give isl_schedule *isl_schedule_empty(__isl_take isl_space *space);
80 __isl_give isl_schedule *isl_schedule_from_domain(
81 __isl_take isl_union_set *domain);
82 __isl_give isl_schedule *isl_schedule_copy(__isl_keep isl_schedule *sched);
83 __isl_null isl_schedule *isl_schedule_free(__isl_take isl_schedule *sched);
84 __isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched);
86 isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *sched);
87 int isl_schedule_plain_is_equal(__isl_keep isl_schedule *schedule1,
88 __isl_keep isl_schedule *schedule2);
90 __isl_give isl_schedule_node *isl_schedule_get_root(
91 __isl_keep isl_schedule *schedule);
92 __isl_give isl_union_set *isl_schedule_get_domain(
93 __isl_keep isl_schedule *schedule);
95 int isl_schedule_foreach_schedule_node(__isl_keep isl_schedule *sched,
96 int (*fn)(__isl_keep isl_schedule_node *node, void *user), void *user);
97 __isl_give isl_schedule *isl_schedule_map_schedule_node(
98 __isl_take isl_schedule *schedule,
99 __isl_give isl_schedule_node *(*fn)(
100 __isl_take isl_schedule_node *node, void *user), void *user);
102 __isl_give isl_schedule *isl_schedule_insert_context(
103 __isl_take isl_schedule *schedule, __isl_take isl_set *context);
104 __isl_give isl_schedule *isl_schedule_insert_partial_schedule(
105 __isl_take isl_schedule *schedule,
106 __isl_take isl_multi_union_pw_aff *partial);
107 __isl_give isl_schedule *isl_schedule_insert_guard(
108 __isl_take isl_schedule *schedule, __isl_take isl_set *guard);
109 __isl_give isl_schedule *isl_schedule_sequence(
110 __isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2);
111 __isl_give isl_schedule *isl_schedule_set(
112 __isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2);
113 __isl_give isl_schedule *isl_schedule_intersect_domain(
114 __isl_take isl_schedule *schedule, __isl_take isl_union_set *domain);
116 __isl_give isl_schedule *isl_schedule_reset_user(
117 __isl_take isl_schedule *schedule);
118 __isl_give isl_schedule *isl_schedule_align_params(
119 __isl_take isl_schedule *schedule, __isl_take isl_space *space);
120 __isl_give isl_schedule *isl_schedule_pullback_union_pw_multi_aff(
121 __isl_take isl_schedule *schedule,
122 __isl_take isl_union_pw_multi_aff *upma);
124 __isl_give isl_band_list *isl_schedule_get_band_forest(
125 __isl_keep isl_schedule *schedule);
127 __isl_give isl_schedule *isl_schedule_read_from_file(isl_ctx *ctx, FILE *input);
128 __isl_give isl_schedule *isl_schedule_read_from_str(isl_ctx *ctx,
129 const char *str);
130 __isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p,
131 __isl_keep isl_schedule *schedule);
132 void isl_schedule_dump(__isl_keep isl_schedule *schedule);
134 int isl_schedule_foreach_band(__isl_keep isl_schedule *sched,
135 int (*fn)(__isl_keep isl_band *band, void *user), void *user);
137 #if defined(__cplusplus)
139 #endif
141 #endif