4 #include <isl/local_space.h>
5 #include <isl/printer.h>
6 #include <isl/set_type.h>
7 #include <isl/aff_type.h>
11 #if defined(__cplusplus)
15 __isl_give isl_aff *isl_aff_zero_on_domain(__isl_take isl_local_space *ls);
17 __isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff);
18 void *isl_aff_free(__isl_take isl_aff *aff);
20 isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff);
22 int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type);
23 int isl_aff_involves_dims(__isl_keep isl_aff *aff,
24 enum isl_dim_type type, unsigned first, unsigned n);
26 __isl_give isl_space *isl_aff_get_domain_space(__isl_keep isl_aff *aff);
27 __isl_give isl_space *isl_aff_get_space(__isl_keep isl_aff *aff);
28 __isl_give isl_local_space *isl_aff_get_domain_local_space(
29 __isl_keep isl_aff *aff);
30 __isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff);
32 const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff,
33 enum isl_dim_type type, unsigned pos);
34 int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v);
35 int isl_aff_get_coefficient(__isl_keep isl_aff *aff,
36 enum isl_dim_type type, int pos, isl_int *v);
37 int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v);
38 __isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v);
39 __isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v);
40 __isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff,
41 enum isl_dim_type type, int pos, isl_int v);
42 __isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff,
43 enum isl_dim_type type, int pos, int v);
44 __isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v);
45 __isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v);
46 __isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v);
47 __isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff,
48 enum isl_dim_type type, int pos, isl_int v);
49 __isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff,
50 enum isl_dim_type type, int pos, int v);
52 int isl_aff_is_cst(__isl_keep isl_aff *aff);
54 __isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff,
55 enum isl_dim_type type, unsigned pos, const char *s);
56 __isl_give isl_aff *isl_aff_set_dim_id(__isl_take isl_aff *aff,
57 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
59 int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2);
60 int isl_aff_plain_is_zero(__isl_keep isl_aff *aff);
62 __isl_give isl_aff *isl_aff_get_div(__isl_keep isl_aff *aff, int pos);
64 __isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff);
65 __isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff);
66 __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff);
67 __isl_give isl_aff *isl_aff_mod(__isl_take isl_aff *aff, isl_int mod);
69 __isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1,
70 __isl_take isl_aff *aff2);
71 __isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1,
72 __isl_take isl_aff *aff2);
73 __isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1,
74 __isl_take isl_aff *aff2);
76 __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f);
77 __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f);
78 __isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f);
80 __isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff,
81 enum isl_dim_type type, unsigned first, unsigned n);
82 __isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff,
83 enum isl_dim_type type, unsigned n);
84 __isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff,
85 enum isl_dim_type type, unsigned first, unsigned n);
86 __isl_give isl_aff *isl_aff_project_domain_on_params(__isl_take isl_aff *aff);
88 __isl_give isl_aff *isl_aff_align_params(__isl_take isl_aff *aff,
89 __isl_take isl_space *model);
91 __isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff,
92 __isl_take isl_set *context);
93 __isl_give isl_aff *isl_aff_gist_params(__isl_take isl_aff *aff,
94 __isl_take isl_set *context);
96 __isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1,
97 __isl_take isl_aff *aff2);
98 __isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
99 __isl_take isl_aff *aff2);
101 __isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str);
102 __isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
103 __isl_keep isl_aff *aff);
104 void isl_aff_dump(__isl_keep isl_aff *aff);
106 isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
107 __isl_give isl_space *isl_pw_aff_get_domain_space(__isl_keep isl_pw_aff *pwaff);
108 __isl_give isl_space *isl_pw_aff_get_space(__isl_keep isl_pw_aff *pwaff);
110 __isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff);
111 __isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_space *dim);
112 __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set,
113 __isl_take isl_aff *aff);
115 __isl_give isl_pw_aff *isl_set_indicator_function(__isl_take isl_set *set);
117 const char *isl_pw_aff_get_dim_name(__isl_keep isl_pw_aff *pa,
118 enum isl_dim_type type, unsigned pos);
119 int isl_pw_aff_has_dim_id(__isl_keep isl_pw_aff *pa,
120 enum isl_dim_type type, unsigned pos);
121 __isl_give isl_id *isl_pw_aff_get_dim_id(__isl_keep isl_pw_aff *pa,
122 enum isl_dim_type type, unsigned pos);
123 __isl_give isl_pw_aff *isl_pw_aff_set_dim_id(__isl_take isl_pw_aff *pma,
124 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
126 int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff);
127 int isl_pw_aff_plain_is_equal(__isl_keep isl_pw_aff *pwaff1,
128 __isl_keep isl_pw_aff *pwaff2);
130 __isl_give isl_pw_aff *isl_pw_aff_union_min(__isl_take isl_pw_aff *pwaff1,
131 __isl_take isl_pw_aff *pwaff2);
132 __isl_give isl_pw_aff *isl_pw_aff_union_max(__isl_take isl_pw_aff *pwaff1,
133 __isl_take isl_pw_aff *pwaff2);
134 __isl_give isl_pw_aff *isl_pw_aff_union_add(__isl_take isl_pw_aff *pwaff1,
135 __isl_take isl_pw_aff *pwaff2);
137 __isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff);
138 void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff);
140 unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type);
141 int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff,
142 enum isl_dim_type type, unsigned first, unsigned n);
144 int isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff);
146 __isl_give isl_pw_aff *isl_pw_aff_align_params(__isl_take isl_pw_aff *pwaff,
147 __isl_take isl_space *model);
149 __isl_give isl_pw_aff *isl_pw_aff_set_tuple_id(__isl_take isl_pw_aff *pwaff,
150 enum isl_dim_type type, __isl_take isl_id *id);
152 __isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff);
154 __isl_give isl_pw_aff *isl_pw_aff_min(__isl_take isl_pw_aff *pwaff1,
155 __isl_take isl_pw_aff *pwaff2);
156 __isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1,
157 __isl_take isl_pw_aff *pwaff2);
158 __isl_give isl_pw_aff *isl_pw_aff_mul(__isl_take isl_pw_aff *pwaff1,
159 __isl_take isl_pw_aff *pwaff2);
160 __isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1,
161 __isl_take isl_pw_aff *pwaff2);
162 __isl_give isl_pw_aff *isl_pw_aff_sub(__isl_take isl_pw_aff *pwaff1,
163 __isl_take isl_pw_aff *pwaff2);
164 __isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff);
165 __isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff);
166 __isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff);
167 __isl_give isl_pw_aff *isl_pw_aff_mod(__isl_take isl_pw_aff *pwaff,
170 __isl_give isl_pw_aff *isl_pw_aff_intersect_params(__isl_take isl_pw_aff *pa,
171 __isl_take isl_set *set);
172 __isl_give isl_pw_aff *isl_pw_aff_intersect_domain(__isl_take isl_pw_aff *pa,
173 __isl_take isl_set *set);
175 __isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_set *cond,
176 __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false);
178 __isl_give isl_pw_aff *isl_pw_aff_scale(__isl_take isl_pw_aff *pwaff,
180 __isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff,
183 __isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff,
184 enum isl_dim_type type, unsigned first, unsigned n);
185 __isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff,
186 enum isl_dim_type type, unsigned n);
187 __isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff,
188 enum isl_dim_type type, unsigned first, unsigned n);
190 __isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp);
191 __isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff,
192 __isl_take isl_set *context);
193 __isl_give isl_pw_aff *isl_pw_aff_gist_params(__isl_take isl_pw_aff *pwaff,
194 __isl_take isl_set *context);
196 int isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff,
197 int (*fn)(__isl_take isl_set *set, __isl_take isl_aff *aff,
198 void *user), void *user);
200 __isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff);
201 __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
203 __isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff);
204 __isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff);
205 __isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff);
207 __isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1,
208 __isl_take isl_pw_aff *pwaff2);
209 __isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1,
210 __isl_take isl_pw_aff *pwaff2);
211 __isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1,
212 __isl_take isl_pw_aff *pwaff2);
213 __isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1,
214 __isl_take isl_pw_aff *pwaff2);
215 __isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
216 __isl_take isl_pw_aff *pwaff2);
217 __isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1,
218 __isl_take isl_pw_aff *pwaff2);
220 __isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str);
221 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
222 __isl_keep isl_pw_aff *pwaff);
223 void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
225 __isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list);
226 __isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list);
228 __isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1,
229 __isl_take isl_pw_aff_list *list2);
230 __isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1,
231 __isl_take isl_pw_aff_list *list2);
232 __isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1,
233 __isl_take isl_pw_aff_list *list2);
234 __isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1,
235 __isl_take isl_pw_aff_list *list2);
236 __isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1,
237 __isl_take isl_pw_aff_list *list2);
238 __isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1,
239 __isl_take isl_pw_aff_list *list2);
241 isl_ctx *isl_multi_aff_get_ctx(__isl_keep isl_multi_aff *maff);
242 __isl_give isl_space *isl_multi_aff_get_space(__isl_keep isl_multi_aff *maff);
243 __isl_give isl_multi_aff *isl_multi_aff_set_tuple_id(
244 __isl_take isl_multi_aff *maff,
245 enum isl_dim_type type, __isl_take isl_id *id);
246 __isl_give isl_multi_aff *isl_multi_aff_copy(__isl_keep isl_multi_aff *maff);
247 void *isl_multi_aff_free(__isl_take isl_multi_aff *maff);
249 unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff *maff,
250 enum isl_dim_type type);
251 __isl_give isl_aff *isl_multi_aff_get_aff(__isl_keep isl_multi_aff *multi,
254 __isl_give isl_multi_aff *isl_multi_aff_drop_dims(
255 __isl_take isl_multi_aff *maff,
256 enum isl_dim_type type, unsigned first, unsigned n);
258 __isl_give isl_multi_aff *isl_multi_aff_set_dim_name(
259 __isl_take isl_multi_aff *maff,
260 enum isl_dim_type type, unsigned pos, const char *s);
262 int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1,
263 __isl_keep isl_multi_aff *maff2);
265 __isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1,
266 __isl_take isl_multi_aff *maff2);
268 __isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff,
271 __isl_give isl_multi_aff *isl_multi_aff_gist_params(
272 __isl_take isl_multi_aff *maff, __isl_take isl_set *context);
273 __isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff,
274 __isl_take isl_set *context);
276 __isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff,
277 __isl_give isl_local_space **ls);
279 __isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p,
280 __isl_keep isl_multi_aff *maff);
282 __isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx,
284 void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff);
286 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set,
287 __isl_take isl_multi_aff *maff);
288 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy(
289 __isl_keep isl_pw_multi_aff *pma);
290 void *isl_pw_multi_aff_free(__isl_take isl_pw_multi_aff *pma);
292 unsigned isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff *pma,
293 enum isl_dim_type type);
294 __isl_give isl_pw_aff *isl_pw_multi_aff_get_pw_aff(
295 __isl_keep isl_pw_multi_aff *pma, int pos);
297 isl_ctx *isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff *pma);
298 __isl_give isl_space *isl_pw_multi_aff_get_domain_space(
299 __isl_keep isl_pw_multi_aff *pma);
300 __isl_give isl_space *isl_pw_multi_aff_get_space(
301 __isl_keep isl_pw_multi_aff *pma);
302 const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff *pma,
303 enum isl_dim_type type);
304 __isl_give isl_id *isl_pw_multi_aff_get_tuple_id(
305 __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type);
306 int isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff *pma,
307 enum isl_dim_type type);
308 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id(
309 __isl_take isl_pw_multi_aff *pma,
310 enum isl_dim_type type, __isl_take isl_id *id);
312 __isl_give isl_set *isl_pw_multi_aff_domain(__isl_take isl_pw_multi_aff *pma);
314 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty(__isl_take isl_space *space);
316 const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff *pma,
317 enum isl_dim_type type, unsigned pos);
318 __isl_give isl_id *isl_pw_multi_aff_get_dim_id(
319 __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type,
321 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_dim_id(
322 __isl_take isl_pw_multi_aff *pma,
323 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
325 int isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma1,
326 __isl_keep isl_pw_multi_aff *pma2);
328 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add(
329 __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
331 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_add(
332 __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
334 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params(
335 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
336 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain(
337 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
339 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_coalesce(
340 __isl_take isl_pw_multi_aff *pma);
341 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist_params(
342 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
343 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist(
344 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
346 int isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff *pma,
347 int (*fn)(__isl_take isl_set *set, __isl_take isl_multi_aff *maff,
348 void *user), void *user);
350 __isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
351 __isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
353 __isl_give isl_printer *isl_printer_print_pw_multi_aff(__isl_take isl_printer *p,
354 __isl_keep isl_pw_multi_aff *pma);
356 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set);
357 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map);
359 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx,
361 void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff *pma);
363 #if defined(__cplusplus)