isl_union_map.c: gen_bin_op: unify callbacks
[isl.git] / include / isl / schedule.h
blob895888e39a24b500a82f57dcca25ad6bbf9fba60
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_export isl_schedule_constraints;
18 typedef struct isl_schedule_constraints isl_schedule_constraints;
20 isl_stat isl_options_set_schedule_max_coefficient(isl_ctx *ctx, int val);
21 int isl_options_get_schedule_max_coefficient(isl_ctx *ctx);
23 isl_stat 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 isl_stat 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 isl_stat isl_options_set_schedule_maximize_coincidence(isl_ctx *ctx, int val);
30 int isl_options_get_schedule_maximize_coincidence(isl_ctx *ctx);
32 isl_stat isl_options_set_schedule_outer_coincidence(isl_ctx *ctx, int val);
33 int isl_options_get_schedule_outer_coincidence(isl_ctx *ctx);
35 isl_stat isl_options_set_schedule_split_scaled(isl_ctx *ctx, int val);
36 int isl_options_get_schedule_split_scaled(isl_ctx *ctx);
38 isl_stat isl_options_set_schedule_treat_coalescing(isl_ctx *ctx, int val);
39 int isl_options_get_schedule_treat_coalescing(isl_ctx *ctx);
41 isl_stat isl_options_set_schedule_separate_components(isl_ctx *ctx, int val);
42 int isl_options_get_schedule_separate_components(isl_ctx *ctx);
44 isl_stat isl_options_set_schedule_serialize_sccs(isl_ctx *ctx, int val);
45 int isl_options_get_schedule_serialize_sccs(isl_ctx *ctx);
47 isl_stat isl_options_set_schedule_whole_component(isl_ctx *ctx, int val);
48 int isl_options_get_schedule_whole_component(isl_ctx *ctx);
50 isl_stat isl_options_set_schedule_carry_self_first(isl_ctx *ctx, int val);
51 int isl_options_get_schedule_carry_self_first(isl_ctx *ctx);
53 __isl_give isl_schedule_constraints *isl_schedule_constraints_copy(
54 __isl_keep isl_schedule_constraints *sc);
55 __isl_give isl_schedule_constraints *isl_schedule_constraints_on_domain(
56 __isl_take isl_union_set *domain);
57 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_context(
58 __isl_take isl_schedule_constraints *sc, __isl_take isl_set *context);
59 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_validity(
60 __isl_take isl_schedule_constraints *sc,
61 __isl_take isl_union_map *validity);
62 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_coincidence(
63 __isl_take isl_schedule_constraints *sc,
64 __isl_take isl_union_map *coincidence);
65 __isl_give isl_schedule_constraints *isl_schedule_constraints_set_proximity(
66 __isl_take isl_schedule_constraints *sc,
67 __isl_take isl_union_map *proximity);
68 __isl_give isl_schedule_constraints *
69 isl_schedule_constraints_set_conditional_validity(
70 __isl_take isl_schedule_constraints *sc,
71 __isl_take isl_union_map *condition,
72 __isl_take isl_union_map *validity);
73 __isl_null isl_schedule_constraints *isl_schedule_constraints_free(
74 __isl_take isl_schedule_constraints *sc);
76 isl_ctx *isl_schedule_constraints_get_ctx(
77 __isl_keep isl_schedule_constraints *sc);
78 __isl_export
79 __isl_give isl_union_set *isl_schedule_constraints_get_domain(
80 __isl_keep isl_schedule_constraints *sc);
81 __isl_export
82 __isl_give isl_set *isl_schedule_constraints_get_context(
83 __isl_keep isl_schedule_constraints *sc);
84 __isl_export
85 __isl_give isl_union_map *isl_schedule_constraints_get_validity(
86 __isl_keep isl_schedule_constraints *sc);
87 __isl_export
88 __isl_give isl_union_map *isl_schedule_constraints_get_coincidence(
89 __isl_keep isl_schedule_constraints *sc);
90 __isl_export
91 __isl_give isl_union_map *isl_schedule_constraints_get_proximity(
92 __isl_keep isl_schedule_constraints *sc);
93 __isl_export
94 __isl_give isl_union_map *isl_schedule_constraints_get_conditional_validity(
95 __isl_keep isl_schedule_constraints *sc);
96 __isl_export
97 __isl_give isl_union_map *
98 isl_schedule_constraints_get_conditional_validity_condition(
99 __isl_keep isl_schedule_constraints *sc);
101 __isl_give isl_schedule_constraints *isl_schedule_constraints_apply(
102 __isl_take isl_schedule_constraints *sc,
103 __isl_take isl_union_map *umap);
105 __isl_constructor
106 __isl_give isl_schedule_constraints *isl_schedule_constraints_read_from_str(
107 isl_ctx *ctx, const char *str);
108 __isl_give isl_schedule_constraints *isl_schedule_constraints_read_from_file(
109 isl_ctx *ctx, FILE *input);
110 __isl_give isl_printer *isl_printer_print_schedule_constraints(
111 __isl_take isl_printer *p, __isl_keep isl_schedule_constraints *sc);
112 void isl_schedule_constraints_dump(__isl_keep isl_schedule_constraints *sc);
113 __isl_give char *isl_schedule_constraints_to_str(
114 __isl_keep isl_schedule_constraints *sc);
116 __isl_give isl_schedule *isl_schedule_constraints_compute_schedule(
117 __isl_take isl_schedule_constraints *sc);
119 __isl_give isl_schedule *isl_union_set_compute_schedule(
120 __isl_take isl_union_set *domain,
121 __isl_take isl_union_map *validity,
122 __isl_take isl_union_map *proximity);
124 __isl_give isl_schedule *isl_schedule_empty(__isl_take isl_space *space);
125 __isl_give isl_schedule *isl_schedule_from_domain(
126 __isl_take isl_union_set *domain);
127 __isl_give isl_schedule *isl_schedule_copy(__isl_keep isl_schedule *sched);
128 __isl_null isl_schedule *isl_schedule_free(__isl_take isl_schedule *sched);
129 __isl_export
130 __isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched);
132 isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *sched);
133 isl_bool isl_schedule_plain_is_equal(__isl_keep isl_schedule *schedule1,
134 __isl_keep isl_schedule *schedule2);
136 __isl_export
137 __isl_give isl_schedule_node *isl_schedule_get_root(
138 __isl_keep isl_schedule *schedule);
139 __isl_give isl_union_set *isl_schedule_get_domain(
140 __isl_keep isl_schedule *schedule);
142 isl_stat isl_schedule_foreach_schedule_node_top_down(
143 __isl_keep isl_schedule *sched,
144 isl_bool (*fn)(__isl_keep isl_schedule_node *node, void *user),
145 void *user);
146 __isl_give isl_schedule *isl_schedule_map_schedule_node_bottom_up(
147 __isl_take isl_schedule *schedule,
148 __isl_give isl_schedule_node *(*fn)(
149 __isl_take isl_schedule_node *node, void *user), void *user);
151 __isl_give isl_schedule *isl_schedule_insert_context(
152 __isl_take isl_schedule *schedule, __isl_take isl_set *context);
153 __isl_give isl_schedule *isl_schedule_insert_partial_schedule(
154 __isl_take isl_schedule *schedule,
155 __isl_take isl_multi_union_pw_aff *partial);
156 __isl_give isl_schedule *isl_schedule_insert_guard(
157 __isl_take isl_schedule *schedule, __isl_take isl_set *guard);
158 __isl_give isl_schedule *isl_schedule_sequence(
159 __isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2);
160 __isl_give isl_schedule *isl_schedule_set(
161 __isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2);
162 __isl_give isl_schedule *isl_schedule_intersect_domain(
163 __isl_take isl_schedule *schedule, __isl_take isl_union_set *domain);
164 __isl_give isl_schedule *isl_schedule_gist_domain_params(
165 __isl_take isl_schedule *schedule, __isl_take isl_set *context);
167 __isl_give isl_schedule *isl_schedule_reset_user(
168 __isl_take isl_schedule *schedule);
169 __isl_give isl_schedule *isl_schedule_align_params(
170 __isl_take isl_schedule *schedule, __isl_take isl_space *space);
171 __isl_overload
172 __isl_give isl_schedule *isl_schedule_pullback_union_pw_multi_aff(
173 __isl_take isl_schedule *schedule,
174 __isl_take isl_union_pw_multi_aff *upma);
175 __isl_give isl_schedule *isl_schedule_expand(__isl_take isl_schedule *schedule,
176 __isl_take isl_union_pw_multi_aff *contraction,
177 __isl_take isl_schedule *expansion);
179 __isl_give isl_band_list *isl_schedule_get_band_forest(
180 __isl_keep isl_schedule *schedule);
182 __isl_give isl_schedule *isl_schedule_read_from_file(isl_ctx *ctx, FILE *input);
183 __isl_constructor
184 __isl_give isl_schedule *isl_schedule_read_from_str(isl_ctx *ctx,
185 const char *str);
186 __isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p,
187 __isl_keep isl_schedule *schedule);
188 void isl_schedule_dump(__isl_keep isl_schedule *schedule);
189 __isl_give char *isl_schedule_to_str(__isl_keep isl_schedule *schedule);
191 int isl_schedule_foreach_band(__isl_keep isl_schedule *sched,
192 int (*fn)(__isl_keep isl_band *band, void *user), void *user);
194 #if defined(__cplusplus)
196 #endif
198 #endif