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
);
125 __isl_give isl_pw_aff
*isl_pw_aff_copy(__isl_keep isl_pw_aff
*pwaff
);
126 void *isl_pw_aff_free(__isl_take isl_pw_aff
*pwaff
);
128 unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff
*pwaff
, enum isl_dim_type type
);
129 int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff
*pwaff
,
130 enum isl_dim_type type
, unsigned first
, unsigned n
);
132 int isl_pw_aff_is_cst(__isl_keep isl_pw_aff
*pwaff
);
134 __isl_give isl_pw_aff
*isl_pw_aff_align_params(__isl_take isl_pw_aff
*pwaff
,
135 __isl_take isl_space
*model
);
137 __isl_give isl_pw_aff
*isl_pw_aff_set_tuple_id(__isl_take isl_pw_aff
*pwaff
,
138 enum isl_dim_type type
, __isl_take isl_id
*id
);
140 __isl_give isl_set
*isl_pw_aff_domain(__isl_take isl_pw_aff
*pwaff
);
142 __isl_give isl_pw_aff
*isl_pw_aff_min(__isl_take isl_pw_aff
*pwaff1
,
143 __isl_take isl_pw_aff
*pwaff2
);
144 __isl_give isl_pw_aff
*isl_pw_aff_max(__isl_take isl_pw_aff
*pwaff1
,
145 __isl_take isl_pw_aff
*pwaff2
);
146 __isl_give isl_pw_aff
*isl_pw_aff_mul(__isl_take isl_pw_aff
*pwaff1
,
147 __isl_take isl_pw_aff
*pwaff2
);
148 __isl_give isl_pw_aff
*isl_pw_aff_add(__isl_take isl_pw_aff
*pwaff1
,
149 __isl_take isl_pw_aff
*pwaff2
);
150 __isl_give isl_pw_aff
*isl_pw_aff_sub(__isl_take isl_pw_aff
*pwaff1
,
151 __isl_take isl_pw_aff
*pwaff2
);
152 __isl_give isl_pw_aff
*isl_pw_aff_neg(__isl_take isl_pw_aff
*pwaff
);
153 __isl_give isl_pw_aff
*isl_pw_aff_ceil(__isl_take isl_pw_aff
*pwaff
);
154 __isl_give isl_pw_aff
*isl_pw_aff_floor(__isl_take isl_pw_aff
*pwaff
);
155 __isl_give isl_pw_aff
*isl_pw_aff_mod(__isl_take isl_pw_aff
*pwaff
,
158 __isl_give isl_pw_aff
*isl_pw_aff_intersect_domain(__isl_take isl_pw_aff
*pa
,
159 __isl_take isl_set
*set
);
161 __isl_give isl_pw_aff
*isl_pw_aff_cond(__isl_take isl_set
*cond
,
162 __isl_take isl_pw_aff
*pwaff_true
, __isl_take isl_pw_aff
*pwaff_false
);
164 __isl_give isl_pw_aff
*isl_pw_aff_scale(__isl_take isl_pw_aff
*pwaff
,
166 __isl_give isl_pw_aff
*isl_pw_aff_scale_down(__isl_take isl_pw_aff
*pwaff
,
169 __isl_give isl_pw_aff
*isl_pw_aff_insert_dims(__isl_take isl_pw_aff
*pwaff
,
170 enum isl_dim_type type
, unsigned first
, unsigned n
);
171 __isl_give isl_pw_aff
*isl_pw_aff_add_dims(__isl_take isl_pw_aff
*pwaff
,
172 enum isl_dim_type type
, unsigned n
);
173 __isl_give isl_pw_aff
*isl_pw_aff_drop_dims(__isl_take isl_pw_aff
*pwaff
,
174 enum isl_dim_type type
, unsigned first
, unsigned n
);
176 __isl_give isl_pw_aff
*isl_pw_aff_coalesce(__isl_take isl_pw_aff
*pwqp
);
177 __isl_give isl_pw_aff
*isl_pw_aff_gist(__isl_take isl_pw_aff
*pwaff
,
178 __isl_take isl_set
*context
);
180 int isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff
*pwaff
,
181 int (*fn
)(__isl_take isl_set
*set
, __isl_take isl_aff
*aff
,
182 void *user
), void *user
);
184 __isl_give isl_set
*isl_set_from_pw_aff(__isl_take isl_pw_aff
*pwaff
);
185 __isl_give isl_map
*isl_map_from_pw_aff(__isl_take isl_pw_aff
*pwaff
);
187 __isl_give isl_set
*isl_pw_aff_nonneg_set(__isl_take isl_pw_aff
*pwaff
);
188 __isl_give isl_set
*isl_pw_aff_zero_set(__isl_take isl_pw_aff
*pwaff
);
189 __isl_give isl_set
*isl_pw_aff_non_zero_set(__isl_take isl_pw_aff
*pwaff
);
191 __isl_give isl_set
*isl_pw_aff_eq_set(__isl_take isl_pw_aff
*pwaff1
,
192 __isl_take isl_pw_aff
*pwaff2
);
193 __isl_give isl_set
*isl_pw_aff_ne_set(__isl_take isl_pw_aff
*pwaff1
,
194 __isl_take isl_pw_aff
*pwaff2
);
195 __isl_give isl_set
*isl_pw_aff_le_set(__isl_take isl_pw_aff
*pwaff1
,
196 __isl_take isl_pw_aff
*pwaff2
);
197 __isl_give isl_set
*isl_pw_aff_lt_set(__isl_take isl_pw_aff
*pwaff1
,
198 __isl_take isl_pw_aff
*pwaff2
);
199 __isl_give isl_set
*isl_pw_aff_ge_set(__isl_take isl_pw_aff
*pwaff1
,
200 __isl_take isl_pw_aff
*pwaff2
);
201 __isl_give isl_set
*isl_pw_aff_gt_set(__isl_take isl_pw_aff
*pwaff1
,
202 __isl_take isl_pw_aff
*pwaff2
);
204 __isl_give isl_pw_aff
*isl_pw_aff_read_from_str(isl_ctx
*ctx
, const char *str
);
205 __isl_give isl_printer
*isl_printer_print_pw_aff(__isl_take isl_printer
*p
,
206 __isl_keep isl_pw_aff
*pwaff
);
207 void isl_pw_aff_dump(__isl_keep isl_pw_aff
*pwaff
);
209 __isl_give isl_pw_aff
*isl_pw_aff_list_min(__isl_take isl_pw_aff_list
*list
);
210 __isl_give isl_pw_aff
*isl_pw_aff_list_max(__isl_take isl_pw_aff_list
*list
);
212 __isl_give isl_set
*isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list
*list1
,
213 __isl_take isl_pw_aff_list
*list2
);
214 __isl_give isl_set
*isl_pw_aff_list_ne_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_le_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_lt_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_ge_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_gt_set(__isl_take isl_pw_aff_list
*list1
,
223 __isl_take isl_pw_aff_list
*list2
);
225 isl_ctx
*isl_multi_aff_get_ctx(__isl_keep isl_multi_aff
*maff
);
226 __isl_give isl_space
*isl_multi_aff_get_space(__isl_keep isl_multi_aff
*maff
);
227 __isl_give isl_multi_aff
*isl_multi_aff_copy(__isl_keep isl_multi_aff
*maff
);
228 void *isl_multi_aff_free(__isl_take isl_multi_aff
*maff
);
230 unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff
*maff
,
231 enum isl_dim_type type
);
232 __isl_give isl_aff
*isl_multi_aff_get_aff(__isl_keep isl_multi_aff
*multi
,
235 __isl_give isl_multi_aff
*isl_multi_aff_set_dim_name(
236 __isl_take isl_multi_aff
*maff
,
237 enum isl_dim_type type
, unsigned pos
, const char *s
);
239 int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff
*maff1
,
240 __isl_keep isl_multi_aff
*maff2
);
242 __isl_give isl_multi_aff
*isl_multi_aff_add(__isl_take isl_multi_aff
*maff1
,
243 __isl_take isl_multi_aff
*maff2
);
245 __isl_give isl_multi_aff
*isl_multi_aff_scale(__isl_take isl_multi_aff
*maff
,
248 __isl_give isl_multi_aff
*isl_multi_aff_gist(__isl_take isl_multi_aff
*maff
,
249 __isl_take isl_set
*context
);
251 __isl_give isl_multi_aff
*isl_multi_aff_lift(__isl_take isl_multi_aff
*maff
,
252 __isl_give isl_local_space
**ls
);
254 __isl_give isl_printer
*isl_printer_print_multi_aff(__isl_take isl_printer
*p
,
255 __isl_keep isl_multi_aff
*maff
);
257 __isl_give isl_multi_aff
*isl_multi_aff_read_from_str(isl_ctx
*ctx
,
259 void isl_multi_aff_dump(__isl_keep isl_multi_aff
*maff
);
261 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_alloc(__isl_take isl_set
*set
,
262 __isl_take isl_multi_aff
*maff
);
263 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_copy(
264 __isl_keep isl_pw_multi_aff
*pma
);
265 void *isl_pw_multi_aff_free(__isl_take isl_pw_multi_aff
*pma
);
267 unsigned isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff
*pma
,
268 enum isl_dim_type type
);
270 isl_ctx
*isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff
*pma
);
271 __isl_give isl_space
*isl_pw_multi_aff_get_domain_space(
272 __isl_keep isl_pw_multi_aff
*pma
);
273 __isl_give isl_space
*isl_pw_multi_aff_get_space(
274 __isl_keep isl_pw_multi_aff
*pma
);
275 const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff
*pma
,
276 enum isl_dim_type type
);
277 __isl_give isl_id
*isl_pw_multi_aff_get_tuple_id(
278 __isl_keep isl_pw_multi_aff
*pma
, enum isl_dim_type type
);
279 int isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff
*pma
,
280 enum isl_dim_type type
);
281 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_set_tuple_id(
282 __isl_take isl_pw_multi_aff
*pma
,
283 enum isl_dim_type type
, __isl_take isl_id
*id
);
285 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_empty(__isl_take isl_space
*space
);
287 const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff
*pma
,
288 enum isl_dim_type type
, unsigned pos
);
289 __isl_give isl_id
*isl_pw_multi_aff_get_dim_id(
290 __isl_keep isl_pw_multi_aff
*pma
, enum isl_dim_type type
,
292 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_set_dim_id(
293 __isl_take isl_pw_multi_aff
*pma
,
294 enum isl_dim_type type
, unsigned pos
, __isl_take isl_id
*id
);
296 int isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff
*pma1
,
297 __isl_keep isl_pw_multi_aff
*pma2
);
299 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_add(
300 __isl_take isl_pw_multi_aff
*pma1
, __isl_take isl_pw_multi_aff
*pma2
);
302 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_intersect_domain(
303 __isl_take isl_pw_multi_aff
*pma
, __isl_take isl_set
*set
);
305 int isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff
*pma
,
306 int (*fn
)(__isl_take isl_set
*set
, __isl_take isl_multi_aff
*maff
,
307 void *user
), void *user
);
309 __isl_give isl_map
*isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff
*pma
);
310 __isl_give isl_set
*isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff
*pma
);
312 __isl_give isl_printer
*isl_printer_print_pw_multi_aff(__isl_take isl_printer
*p
,
313 __isl_keep isl_pw_multi_aff
*pma
);
315 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_from_set(__isl_take isl_set
*set
);
316 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_from_map(__isl_take isl_map
*map
);
318 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_read_from_str(isl_ctx
*ctx
,
320 void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff
*pma
);
322 #if defined(__cplusplus)