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);
87 __isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff,
88 __isl_take isl_set *context);
90 __isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1,
91 __isl_take isl_aff *aff2);
92 __isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
93 __isl_take isl_aff *aff2);
95 __isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str);
96 __isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
97 __isl_keep isl_aff *aff);
98 void isl_aff_dump(__isl_keep isl_aff *aff);
100 isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
101 __isl_give isl_space *isl_pw_aff_get_domain_space(__isl_keep isl_pw_aff *pwaff);
102 __isl_give isl_space *isl_pw_aff_get_space(__isl_keep isl_pw_aff *pwaff);
104 __isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff);
105 __isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_space *dim);
106 __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set,
107 __isl_take isl_aff *aff);
109 const char *isl_pw_aff_get_dim_name(__isl_keep isl_pw_aff *pa,
110 enum isl_dim_type type, unsigned pos);
111 __isl_give isl_id *isl_pw_aff_get_dim_id(__isl_keep isl_pw_aff *pa,
112 enum isl_dim_type type, unsigned pos);
113 __isl_give isl_pw_aff *isl_pw_aff_set_dim_id(__isl_take isl_pw_aff *pma,
114 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
116 int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff);
117 int isl_pw_aff_plain_is_equal(__isl_keep isl_pw_aff *pwaff1,
118 __isl_keep isl_pw_aff *pwaff2);
120 __isl_give isl_pw_aff *isl_pw_aff_union_min(__isl_take isl_pw_aff *pwaff1,
121 __isl_take isl_pw_aff *pwaff2);
122 __isl_give isl_pw_aff *isl_pw_aff_union_max(__isl_take isl_pw_aff *pwaff1,
123 __isl_take isl_pw_aff *pwaff2);
124 __isl_give isl_pw_aff *isl_pw_aff_union_add(__isl_take isl_pw_aff *pwaff1,
125 __isl_take isl_pw_aff *pwaff2);
127 __isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff);
128 void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff);
130 unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type);
131 int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff,
132 enum isl_dim_type type, unsigned first, unsigned n);
134 int isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff);
136 __isl_give isl_pw_aff *isl_pw_aff_align_params(__isl_take isl_pw_aff *pwaff,
137 __isl_take isl_space *model);
139 __isl_give isl_pw_aff *isl_pw_aff_set_tuple_id(__isl_take isl_pw_aff *pwaff,
140 enum isl_dim_type type, __isl_take isl_id *id);
142 __isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff);
144 __isl_give isl_pw_aff *isl_pw_aff_min(__isl_take isl_pw_aff *pwaff1,
145 __isl_take isl_pw_aff *pwaff2);
146 __isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1,
147 __isl_take isl_pw_aff *pwaff2);
148 __isl_give isl_pw_aff *isl_pw_aff_mul(__isl_take isl_pw_aff *pwaff1,
149 __isl_take isl_pw_aff *pwaff2);
150 __isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1,
151 __isl_take isl_pw_aff *pwaff2);
152 __isl_give isl_pw_aff *isl_pw_aff_sub(__isl_take isl_pw_aff *pwaff1,
153 __isl_take isl_pw_aff *pwaff2);
154 __isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff);
155 __isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff);
156 __isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff);
157 __isl_give isl_pw_aff *isl_pw_aff_mod(__isl_take isl_pw_aff *pwaff,
160 __isl_give isl_pw_aff *isl_pw_aff_intersect_domain(__isl_take isl_pw_aff *pa,
161 __isl_take isl_set *set);
163 __isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_set *cond,
164 __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false);
166 __isl_give isl_pw_aff *isl_pw_aff_scale(__isl_take isl_pw_aff *pwaff,
168 __isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff,
171 __isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff,
172 enum isl_dim_type type, unsigned first, unsigned n);
173 __isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff,
174 enum isl_dim_type type, unsigned n);
175 __isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff,
176 enum isl_dim_type type, unsigned first, unsigned n);
178 __isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp);
179 __isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff,
180 __isl_take isl_set *context);
182 int isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff,
183 int (*fn)(__isl_take isl_set *set, __isl_take isl_aff *aff,
184 void *user), void *user);
186 __isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff);
187 __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
189 __isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff);
190 __isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff);
191 __isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff);
193 __isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1,
194 __isl_take isl_pw_aff *pwaff2);
195 __isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1,
196 __isl_take isl_pw_aff *pwaff2);
197 __isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1,
198 __isl_take isl_pw_aff *pwaff2);
199 __isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1,
200 __isl_take isl_pw_aff *pwaff2);
201 __isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
202 __isl_take isl_pw_aff *pwaff2);
203 __isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1,
204 __isl_take isl_pw_aff *pwaff2);
206 __isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str);
207 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
208 __isl_keep isl_pw_aff *pwaff);
209 void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
211 __isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list);
212 __isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list);
214 __isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1,
215 __isl_take isl_pw_aff_list *list2);
216 __isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1,
217 __isl_take isl_pw_aff_list *list2);
218 __isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1,
219 __isl_take isl_pw_aff_list *list2);
220 __isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1,
221 __isl_take isl_pw_aff_list *list2);
222 __isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1,
223 __isl_take isl_pw_aff_list *list2);
224 __isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1,
225 __isl_take isl_pw_aff_list *list2);
227 isl_ctx *isl_multi_aff_get_ctx(__isl_keep isl_multi_aff *maff);
228 __isl_give isl_space *isl_multi_aff_get_space(__isl_keep isl_multi_aff *maff);
229 __isl_give isl_multi_aff *isl_multi_aff_copy(__isl_keep isl_multi_aff *maff);
230 void *isl_multi_aff_free(__isl_take isl_multi_aff *maff);
232 unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff *maff,
233 enum isl_dim_type type);
234 __isl_give isl_aff *isl_multi_aff_get_aff(__isl_keep isl_multi_aff *multi,
237 __isl_give isl_multi_aff *isl_multi_aff_set_dim_name(
238 __isl_take isl_multi_aff *maff,
239 enum isl_dim_type type, unsigned pos, const char *s);
241 int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1,
242 __isl_keep isl_multi_aff *maff2);
244 __isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1,
245 __isl_take isl_multi_aff *maff2);
247 __isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff,
250 __isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff,
251 __isl_take isl_set *context);
253 __isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff,
254 __isl_give isl_local_space **ls);
256 __isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p,
257 __isl_keep isl_multi_aff *maff);
259 __isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx,
261 void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff);
263 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set,
264 __isl_take isl_multi_aff *maff);
265 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy(
266 __isl_keep isl_pw_multi_aff *pma);
267 void *isl_pw_multi_aff_free(__isl_take isl_pw_multi_aff *pma);
269 unsigned isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff *pma,
270 enum isl_dim_type type);
272 isl_ctx *isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff *pma);
273 __isl_give isl_space *isl_pw_multi_aff_get_domain_space(
274 __isl_keep isl_pw_multi_aff *pma);
275 __isl_give isl_space *isl_pw_multi_aff_get_space(
276 __isl_keep isl_pw_multi_aff *pma);
277 const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff *pma,
278 enum isl_dim_type type);
279 __isl_give isl_id *isl_pw_multi_aff_get_tuple_id(
280 __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type);
281 int isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff *pma,
282 enum isl_dim_type type);
283 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id(
284 __isl_take isl_pw_multi_aff *pma,
285 enum isl_dim_type type, __isl_take isl_id *id);
287 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty(__isl_take isl_space *space);
289 const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff *pma,
290 enum isl_dim_type type, unsigned pos);
291 __isl_give isl_id *isl_pw_multi_aff_get_dim_id(
292 __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type,
294 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_dim_id(
295 __isl_take isl_pw_multi_aff *pma,
296 enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
298 int isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma1,
299 __isl_keep isl_pw_multi_aff *pma2);
301 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add(
302 __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
304 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_add(
305 __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
307 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain(
308 __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
310 int isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff *pma,
311 int (*fn)(__isl_take isl_set *set, __isl_take isl_multi_aff *maff,
312 void *user), void *user);
314 __isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
315 __isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
317 __isl_give isl_printer *isl_printer_print_pw_multi_aff(__isl_take isl_printer *p,
318 __isl_keep isl_pw_multi_aff *pma);
320 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set);
321 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map);
323 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx,
325 void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff *pma);
327 #if defined(__cplusplus)