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_pw_aff *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_n_piece(__isl_keep isl_pw_aff *pwaff);
197 int isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff,
198 int (*fn)(__isl_take isl_set *set, __isl_take isl_aff *aff,
199 void *user), void *user);
201 __isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff);
202 __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
204 __isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff);
205 __isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff);
206 __isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff);
208 __isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1,
209 __isl_take isl_pw_aff *pwaff2);
210 __isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1,
211 __isl_take isl_pw_aff *pwaff2);
212 __isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1,
213 __isl_take isl_pw_aff *pwaff2);
214 __isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1,
215 __isl_take isl_pw_aff *pwaff2);
216 __isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
217 __isl_take isl_pw_aff *pwaff2);
218 __isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1,
219 __isl_take isl_pw_aff *pwaff2);
221 __isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str);
222 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
223 __isl_keep isl_pw_aff *pwaff);
224 void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
226 __isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list);
227 __isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list);
229 __isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1,
230 __isl_take isl_pw_aff_list *list2);
231 __isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1,
232 __isl_take isl_pw_aff_list *list2);
233 __isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1,
234 __isl_take isl_pw_aff_list *list2);
235 __isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1,
236 __isl_take isl_pw_aff_list *list2);
237 __isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1,
238 __isl_take isl_pw_aff_list *list2);
239 __isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1,
240 __isl_take isl_pw_aff_list *list2);
242 __isl_give isl_multi_aff *isl_multi_aff_zero(__isl_take isl_space *space);
244 isl_ctx *isl_multi_aff_get_ctx(__isl_keep isl_multi_aff *maff);
245 __isl_give isl_space *isl_multi_aff_get_space(__isl_keep isl_multi_aff *maff);
246 __isl_give isl_multi_aff *isl_multi_aff_set_tuple_id(
247 __isl_take isl_multi_aff *maff,
248 enum isl_dim_type type, __isl_take isl_id *id);
249 __isl_give isl_multi_aff *isl_multi_aff_copy(__isl_keep isl_multi_aff *maff);
250 void *isl_multi_aff_free(__isl_take isl_multi_aff *maff);
252 unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff *maff,
253 enum isl_dim_type type);
254 __isl_give isl_aff *isl_multi_aff_get_aff(__isl_keep isl_multi_aff *multi,
257 __isl_give isl_multi_aff *isl_multi_aff_drop_dims(
258 __isl_take isl_multi_aff *maff,
259 enum isl_dim_type type, unsigned first, unsigned n);
261 __isl_give isl_multi_aff *isl_multi_aff_set_dim_name(
262 __isl_take isl_multi_aff *maff,
263 enum isl_dim_type type, unsigned pos, const char *s);
265 int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1,
266 __isl_keep isl_multi_aff *maff2);
268 __isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1,
269 __isl_take isl_multi_aff *maff2);
271 __isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff,
274 __isl_give isl_multi_aff *isl_multi_aff_gist_params(
275 __isl_take isl_multi_aff *maff, __isl_take isl_set *context);
276 __isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff,
277 __isl_take isl_set *context);
279 __isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff,
280 __isl_give isl_local_space **ls);
282 __isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p,
283 __isl_keep isl_multi_aff *maff);
285 __isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx,
287 void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff);
289 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set,
290 __isl_take isl_multi_aff *maff);
291 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy(
292 __isl_keep isl_pw_multi_aff *pma);
293 void *isl_pw_multi_aff_free(__isl_take isl_pw_multi_aff *pma);
295 unsigned isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff *pma,
296 enum isl_dim_type type);
297 __isl_give isl_pw_aff *isl_pw_multi_aff_get_pw_aff(
298 __isl_keep isl_pw_multi_aff *pma, int pos);
300 isl_ctx *isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff *pma);
301 __isl_give isl_space *isl_pw_multi_aff_get_domain_space(
302 __isl_keep isl_pw_multi_aff *pma);
303 __isl_give isl_space *isl_pw_multi_aff_get_space(
304 __isl_keep isl_pw_multi_aff *pma);
305 const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff *pma,
306 enum isl_dim_type type);
307 __isl_give isl_id *isl_pw_multi_aff_get_tuple_id(
308 __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type);
309 int isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff *pma,
310 enum isl_dim_type type);
311 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id(
312 __isl_take isl_pw_multi_aff *pma,
313 enum isl_dim_type type, __isl_take isl_id *id);
315 __isl_give isl_set *isl_pw_multi_aff_domain(__isl_take isl_pw_multi_aff *pma);
317 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty(__isl_take isl_space *space);
319 const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff *pma,
320 enum isl_dim_type type, unsigned pos);
321 __isl_give isl_id *isl_pw_multi_aff_get_dim_id(
322 __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type,
324 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_dim_id(
325 __isl_take isl_pw_multi_aff *pma,
326 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
328 int isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma1,
329 __isl_keep isl_pw_multi_aff *pma2);
331 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_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_add(
335 __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
337 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params(
338 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
339 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain(
340 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
342 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_coalesce(
343 __isl_take isl_pw_multi_aff *pma);
344 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist_params(
345 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
346 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist(
347 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
349 int isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff *pma,
350 int (*fn)(__isl_take isl_set *set, __isl_take isl_multi_aff *maff,
351 void *user), void *user);
353 __isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
354 __isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
356 __isl_give isl_printer *isl_printer_print_pw_multi_aff(__isl_take isl_printer *p,
357 __isl_keep isl_pw_multi_aff *pma);
359 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set);
360 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map);
362 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx,
364 void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff *pma);
366 #if defined(__cplusplus)