Update isl to isl-0.18-304-g1efe43d
[polly-mirror.git] / lib / External / isl / isl_map_private.h
blob521c067c0bc2d2a8e5b508482d00a98c0c8c2397
1 /*
2 * Copyright 2008-2009 Katholieke Universiteit Leuven
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8 */
10 #ifndef ISL_MAP_PRIVATE_H
11 #define ISL_MAP_PRIVATE_H
13 #define isl_basic_set isl_basic_map
14 #define isl_maybe_isl_basic_set isl_maybe_isl_basic_map
15 #define isl_set isl_map
16 #define isl_basic_set_list isl_basic_map_list
17 #define isl_set_list isl_map_list
18 #include <isl/list.h>
19 #include <isl/set.h>
20 #include <isl/map.h>
21 #include <isl_reordering.h>
22 #include <isl/vec.h>
23 #include <isl/hash.h>
24 #include <isl_blk.h>
26 /* A "basic map" is a relation between two sets of variables,
27 * called the "in" and "out" variables.
28 * A "basic set" is a basic map with a zero-dimensional
29 * domain.
31 * It is implemented as a set with two extra fields:
32 * n_in is the number of in variables
33 * n_out is the number of out variables
34 * n_in + n_out should be equal to set.dim
36 struct isl_basic_map {
37 int ref;
38 #define ISL_BASIC_MAP_FINAL (1 << 0)
39 #define ISL_BASIC_MAP_EMPTY (1 << 1)
40 #define ISL_BASIC_MAP_NO_IMPLICIT (1 << 2)
41 #define ISL_BASIC_MAP_NO_REDUNDANT (1 << 3)
42 #define ISL_BASIC_MAP_RATIONAL (1 << 4)
43 #define ISL_BASIC_MAP_NORMALIZED (1 << 5)
44 #define ISL_BASIC_MAP_NORMALIZED_DIVS (1 << 6)
45 #define ISL_BASIC_MAP_ALL_EQUALITIES (1 << 7)
46 #define ISL_BASIC_MAP_REDUCED_COEFFICIENTS (1 << 8)
47 #define ISL_BASIC_SET_FINAL (1 << 0)
48 #define ISL_BASIC_SET_EMPTY (1 << 1)
49 #define ISL_BASIC_SET_NO_IMPLICIT (1 << 2)
50 #define ISL_BASIC_SET_NO_REDUNDANT (1 << 3)
51 #define ISL_BASIC_SET_RATIONAL (1 << 4)
52 #define ISL_BASIC_SET_NORMALIZED (1 << 5)
53 #define ISL_BASIC_SET_NORMALIZED_DIVS (1 << 6)
54 #define ISL_BASIC_SET_ALL_EQUALITIES (1 << 7)
55 #define ISL_BASIC_SET_REDUCED_COEFFICIENTS (1 << 8)
56 unsigned flags;
58 struct isl_ctx *ctx;
60 isl_space *dim;
61 unsigned extra;
63 unsigned n_eq;
64 unsigned n_ineq;
66 size_t c_size;
67 isl_int **eq;
68 isl_int **ineq;
70 unsigned n_div;
72 isl_int **div;
74 struct isl_vec *sample;
76 struct isl_blk block;
77 struct isl_blk block2;
80 #undef EL
81 #define EL isl_basic_set
83 #include <isl_list_templ.h>
85 /* A "map" is a (possibly disjoint) union of basic maps.
86 * A "set" is a (possibly disjoint) union of basic sets.
88 * Currently, the isl_set structure is identical to the isl_map structure
89 * and the library depends on this correspondence internally.
90 * However, users should not depend on this correspondence.
92 * "cached_simple_hull" contains copies of the unshifted and shifted
93 * simple hulls, if they have already been computed. Otherwise,
94 * the entries are NULL.
96 struct isl_map {
97 int ref;
98 #define ISL_MAP_DISJOINT (1 << 0)
99 #define ISL_MAP_NORMALIZED (1 << 1)
100 #define ISL_SET_DISJOINT (1 << 0)
101 #define ISL_SET_NORMALIZED (1 << 1)
102 unsigned flags;
103 isl_basic_map *cached_simple_hull[2];
105 struct isl_ctx *ctx;
107 isl_space *dim;
109 int n;
111 size_t size;
112 struct isl_basic_map *p[1];
115 #undef EL
116 #define EL isl_set
118 #include <isl_list_templ.h>
120 __isl_give isl_basic_set *isl_basic_set_alloc(isl_ctx *ctx,
121 unsigned nparam, unsigned dim, unsigned extra,
122 unsigned n_eq, unsigned n_ineq);
123 __isl_give isl_basic_set *isl_basic_set_extend(__isl_take isl_basic_set *base,
124 unsigned nparam, unsigned dim, unsigned extra,
125 unsigned n_eq, unsigned n_ineq);
126 __isl_give isl_basic_set *isl_basic_set_extend_constraints(
127 __isl_take isl_basic_set *base, unsigned n_eq, unsigned n_ineq);
128 __isl_give isl_basic_set *isl_basic_set_finalize(
129 __isl_take isl_basic_set *bset);
130 __isl_give isl_basic_set *isl_basic_set_dup(__isl_keep isl_basic_set *bset);
131 __isl_give isl_basic_set *isl_basic_set_simplify(
132 __isl_take isl_basic_set *bset);
134 __isl_give isl_basic_map *isl_basic_map_alloc(isl_ctx *ctx,
135 unsigned nparam, unsigned in, unsigned out, unsigned extra,
136 unsigned n_eq, unsigned n_ineq);
137 __isl_give isl_basic_map *isl_basic_map_mark_final(
138 __isl_take isl_basic_map *bmap);
139 __isl_give isl_basic_map *isl_basic_map_finalize(
140 __isl_take isl_basic_map *bmap);
141 __isl_give isl_basic_map *isl_basic_map_extend(__isl_take isl_basic_map *base,
142 unsigned nparam, unsigned n_in, unsigned n_out, unsigned extra,
143 unsigned n_eq, unsigned n_ineq);
144 __isl_give isl_basic_map *isl_basic_map_extend_constraints(
145 __isl_take isl_basic_map *base, unsigned n_eq, unsigned n_ineq);
146 __isl_give isl_basic_map *isl_basic_map_simplify(
147 __isl_take isl_basic_map *bmap);
149 __isl_give isl_set *isl_set_alloc(isl_ctx *ctx,
150 unsigned nparam, unsigned dim, int n, unsigned flags);
151 __isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set,
152 __isl_take isl_basic_set *bset);
153 __isl_give isl_set *isl_set_finalize(__isl_take isl_set *set);
154 __isl_give isl_set *isl_set_dup(__isl_keep isl_set *set);
156 __isl_give isl_map *isl_map_alloc(isl_ctx *ctx,
157 unsigned nparam, unsigned in, unsigned out, int n, unsigned flags);
158 __isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
159 __isl_take isl_basic_map *bmap);
160 __isl_give isl_map *isl_map_dup(__isl_keep isl_map *map);
161 __isl_give isl_map *isl_map_finalize(__isl_take isl_map *map);
163 __isl_give isl_basic_set *isl_basic_set_from_underlying_set(
164 __isl_take isl_basic_set *bset, __isl_take isl_basic_set *like);
166 __isl_give isl_map *isl_map_realign(__isl_take isl_map *map,
167 __isl_take isl_reordering *r);
168 __isl_give isl_set *isl_set_realign(__isl_take isl_set *set,
169 __isl_take isl_reordering *r);
171 __isl_give isl_map *isl_map_reset(__isl_take isl_map *map,
172 enum isl_dim_type type);
174 __isl_give isl_basic_set *isl_basic_set_reset_space(
175 __isl_take isl_basic_set *bset, __isl_take isl_space *dim);
176 __isl_give isl_basic_map *isl_basic_map_reset_space(
177 __isl_take isl_basic_map *bmap, __isl_take isl_space *dim);
178 __isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map,
179 __isl_take isl_space *dim);
181 unsigned isl_basic_map_offset(struct isl_basic_map *bmap,
182 enum isl_dim_type type);
183 unsigned isl_basic_set_offset(struct isl_basic_set *bset,
184 enum isl_dim_type type);
186 isl_bool isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap);
187 int isl_map_may_be_set(__isl_keep isl_map *map);
188 isl_bool isl_map_compatible_domain(__isl_keep isl_map *map,
189 __isl_keep isl_set *set);
190 isl_bool isl_basic_map_compatible_domain(__isl_keep isl_basic_map *bmap,
191 __isl_keep isl_basic_set *bset);
192 isl_bool isl_basic_map_compatible_range(__isl_keep isl_basic_map *bmap,
193 __isl_keep isl_basic_set *bset);
195 struct isl_basic_map *isl_basic_map_extend_space(struct isl_basic_map *base,
196 __isl_take isl_space *dim, unsigned extra,
197 unsigned n_eq, unsigned n_ineq);
198 struct isl_basic_set *isl_basic_set_extend_space(struct isl_basic_set *base,
199 __isl_take isl_space *dim, unsigned extra,
200 unsigned n_eq, unsigned n_ineq);
201 struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1,
202 struct isl_basic_set *bset2, unsigned pos);
204 struct isl_map *isl_map_grow(struct isl_map *map, int n);
205 struct isl_set *isl_set_grow(struct isl_set *set, int n);
207 isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset,
208 __isl_keep isl_vec *vec);
209 isl_bool isl_basic_map_contains(__isl_keep isl_basic_map *bmap,
210 __isl_keep isl_vec *vec);
212 __isl_give isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *dim,
213 unsigned extra, unsigned n_eq, unsigned n_ineq);
214 __isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *dim, int n,
215 unsigned flags);
216 __isl_give isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *dim,
217 unsigned extra, unsigned n_eq, unsigned n_ineq);
218 __isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *dim, int n,
219 unsigned flags);
221 int isl_basic_map_alloc_equality(struct isl_basic_map *bmap);
222 int isl_basic_set_alloc_equality(struct isl_basic_set *bset);
223 int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n);
224 int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n);
225 int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n);
226 int isl_basic_set_alloc_inequality(struct isl_basic_set *bset);
227 int isl_basic_map_alloc_inequality(struct isl_basic_map *bmap);
228 int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n);
229 int isl_basic_map_alloc_div(struct isl_basic_map *bmap);
230 __isl_give isl_basic_map *isl_basic_map_insert_div(
231 __isl_take isl_basic_map *bmap, int pos, __isl_keep isl_vec *div);
232 int isl_basic_set_alloc_div(struct isl_basic_set *bset);
233 isl_stat isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n);
234 isl_stat isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n);
235 __isl_give isl_basic_map *isl_basic_map_drop_div(
236 __isl_take isl_basic_map *bmap, unsigned div);
237 void isl_basic_map_inequality_to_equality(
238 struct isl_basic_map *bmap, unsigned pos);
239 int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos);
240 int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos);
241 int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos);
242 int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos);
243 __isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset,
244 isl_int *eq);
245 __isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap,
246 isl_int *eq);
247 __isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset,
248 isl_int *ineq);
249 __isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap,
250 isl_int *ineq);
252 __isl_give isl_basic_set *isl_basic_set_tighten_outward(
253 __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec);
255 int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos);
257 struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset);
258 struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap);
259 struct isl_set *isl_set_cow(struct isl_set *set);
260 struct isl_map *isl_map_cow(struct isl_map *map);
262 uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap);
264 __isl_give isl_set *isl_basic_set_list_union(
265 __isl_take isl_basic_set_list *list);
267 struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap);
268 struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset);
269 struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset);
270 void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b);
271 void isl_basic_set_swap_div(struct isl_basic_set *bset, int a, int b);
272 struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap);
273 __isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map);
274 struct isl_basic_map *isl_basic_map_align_divs(
275 struct isl_basic_map *dst, struct isl_basic_map *src);
276 struct isl_basic_set *isl_basic_set_align_divs(
277 struct isl_basic_set *dst, struct isl_basic_set *src);
278 __isl_give isl_map *isl_map_align_divs_to_basic_map_list(
279 __isl_take isl_map *map, __isl_keep isl_basic_map_list *list);
280 __isl_give isl_basic_map_list *isl_basic_map_list_align_divs_to_basic_map(
281 __isl_take isl_basic_map_list *list, __isl_keep isl_basic_map *bmap);
282 __isl_give isl_basic_set *isl_basic_set_sort_divs(
283 __isl_take isl_basic_set *bset);
284 __isl_give isl_basic_map *isl_basic_map_sort_divs(
285 __isl_take isl_basic_map *bmap);
286 __isl_give isl_map *isl_map_sort_divs(__isl_take isl_map *map);
287 struct isl_basic_map *isl_basic_map_gauss(
288 struct isl_basic_map *bmap, int *progress);
289 struct isl_basic_set *isl_basic_set_gauss(
290 struct isl_basic_set *bset, int *progress);
291 int isl_basic_map_constraint_cmp(__isl_keep isl_basic_map *bmap,
292 isl_int *c1, isl_int *c2);
293 __isl_give isl_basic_map *isl_basic_map_sort_constraints(
294 __isl_take isl_basic_map *bmap);
295 __isl_give isl_basic_set *isl_basic_set_sort_constraints(
296 __isl_take isl_basic_set *bset);
297 int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1,
298 __isl_keep isl_basic_map *bmap2);
299 isl_bool isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1,
300 __isl_keep isl_basic_map *bmap2);
301 struct isl_basic_map *isl_basic_map_normalize_constraints(
302 struct isl_basic_map *bmap);
303 struct isl_basic_set *isl_basic_set_normalize_constraints(
304 struct isl_basic_set *bset);
305 struct isl_basic_map *isl_basic_map_implicit_equalities(
306 struct isl_basic_map *bmap);
307 struct isl_basic_set *isl_basic_map_underlying_set(struct isl_basic_map *bmap);
308 __isl_give isl_basic_set *isl_basic_set_underlying_set(
309 __isl_take isl_basic_set *bset);
310 __isl_give isl_basic_set_list *isl_basic_map_list_underlying_set(
311 __isl_take isl_basic_map_list *list);
312 struct isl_set *isl_map_underlying_set(struct isl_map *map);
313 struct isl_basic_map *isl_basic_map_overlying_set(struct isl_basic_set *bset,
314 struct isl_basic_map *like);
315 __isl_give isl_basic_map *isl_basic_map_drop_constraint_involving_unknown_divs(
316 __isl_take isl_basic_map *bmap);
317 __isl_give isl_map *isl_map_drop_constraint_involving_unknown_divs(
318 __isl_take isl_map *map);
319 __isl_give isl_basic_set *isl_basic_set_drop_constraints_involving(
320 __isl_take isl_basic_set *bset, unsigned first, unsigned n);
321 __isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset,
322 enum isl_dim_type type, unsigned first, unsigned n);
323 struct isl_basic_map *isl_basic_map_drop(struct isl_basic_map *bmap,
324 enum isl_dim_type type, unsigned first, unsigned n);
325 struct isl_set *isl_set_drop(struct isl_set *set,
326 enum isl_dim_type type, unsigned first, unsigned n);
327 struct isl_basic_set *isl_basic_set_drop_dims(
328 struct isl_basic_set *bset, unsigned first, unsigned n);
329 struct isl_map *isl_map_drop(struct isl_map *map,
330 enum isl_dim_type type, unsigned first, unsigned n);
331 __isl_give isl_basic_map *isl_basic_map_drop_unrelated_constraints(
332 __isl_take isl_basic_map *bmap, __isl_take int *group);
334 __isl_give isl_basic_map *isl_basic_map_remove_duplicate_constraints(
335 __isl_take isl_basic_map *bmap, int *progress, int detect_divs);
336 __isl_give isl_basic_map *isl_basic_map_detect_inequality_pairs(
337 __isl_take isl_basic_map *bmap, int *progress);
339 struct isl_map *isl_map_remove_empty_parts(struct isl_map *map);
340 struct isl_set *isl_set_remove_empty_parts(struct isl_set *set);
341 __isl_give isl_map *isl_map_remove_obvious_duplicates(__isl_take isl_map *map);
343 struct isl_set *isl_set_normalize(struct isl_set *set);
345 struct isl_set *isl_set_drop_vars(
346 struct isl_set *set, unsigned first, unsigned n);
348 struct isl_basic_map *isl_basic_map_eliminate_vars(
349 struct isl_basic_map *bmap, unsigned pos, unsigned n);
350 struct isl_basic_set *isl_basic_set_eliminate_vars(
351 struct isl_basic_set *bset, unsigned pos, unsigned n);
353 __isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map,
354 enum isl_dim_type type, unsigned first, unsigned n);
355 __isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set,
356 enum isl_dim_type type, unsigned first, unsigned n);
358 int isl_basic_map_add_div_constraint(__isl_keep isl_basic_map *bmap,
359 unsigned div, int sign);
360 int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div);
361 __isl_give isl_basic_map *isl_basic_map_add_known_div_constraints(
362 __isl_take isl_basic_map *bmap);
363 struct isl_basic_map *isl_basic_map_drop_redundant_divs(
364 struct isl_basic_map *bmap);
365 struct isl_basic_set *isl_basic_set_drop_redundant_divs(
366 struct isl_basic_set *bset);
368 struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset);
369 struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset);
371 struct isl_basic_set *isl_basic_set_set_rational(struct isl_basic_set *bset);
372 __isl_give isl_set *isl_set_set_rational(__isl_take isl_set *set);
373 __isl_give isl_basic_map *isl_basic_map_set_rational(
374 __isl_take isl_basic_map *bmap);
375 __isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map);
377 isl_bool isl_map_is_rational(__isl_keep isl_map *map);
378 isl_bool isl_set_is_rational(__isl_keep isl_set *set);
380 isl_bool isl_map_has_rational(__isl_keep isl_map *map);
381 isl_bool isl_set_has_rational(__isl_keep isl_set *set);
383 __isl_give isl_basic_map *isl_basic_map_from_multi_aff2(
384 __isl_take isl_multi_aff *maff, int rational);
386 struct isl_mat;
388 struct isl_basic_set *isl_basic_set_preimage(struct isl_basic_set *bset,
389 struct isl_mat *mat);
390 struct isl_set *isl_set_preimage(struct isl_set *set, struct isl_mat *mat);
392 __isl_give isl_basic_map *isl_basic_map_transform_dims(
393 __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first,
394 __isl_take isl_mat *trans);
395 __isl_give isl_basic_set *isl_basic_set_transform_dims(
396 __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
397 __isl_take isl_mat *trans);
399 isl_int *isl_set_wrap_facet(__isl_keep isl_set *set,
400 isl_int *facet, isl_int *ridge);
402 isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
403 __isl_keep isl_point *point);
404 isl_bool isl_set_contains_point(__isl_keep isl_set *set,
405 __isl_keep isl_point *point);
407 isl_stat isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset,
408 unsigned first, unsigned n, int *signs);
409 isl_stat isl_set_foreach_orthant(__isl_keep isl_set *set,
410 isl_stat (*fn)(__isl_take isl_set *orthant, int *signs, void *user),
411 void *user);
413 int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap,
414 unsigned pos, isl_int *div);
415 int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset,
416 unsigned pos, isl_int *div);
417 isl_bool isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap,
418 isl_int *constraint, unsigned div);
419 isl_bool isl_basic_set_is_div_constraint(__isl_keep isl_basic_set *bset,
420 isl_int *constraint, unsigned div);
422 __isl_give isl_basic_set *isl_basic_set_from_local_space(
423 __isl_take isl_local_space *ls);
424 __isl_give isl_basic_map *isl_basic_map_from_local_space(
425 __isl_take isl_local_space *ls);
426 __isl_give isl_basic_set *isl_basic_set_expand_divs(
427 __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp);
428 __isl_give isl_basic_map *isl_basic_map_expand_divs(
429 __isl_take isl_basic_set *bmap, __isl_take isl_mat *div, int *exp);
431 __isl_give isl_basic_map *isl_basic_map_mark_div_unknown(
432 __isl_take isl_basic_map *bmap, int div);
433 isl_bool isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map *bmap,
434 int div);
435 isl_bool isl_basic_set_div_is_known(__isl_keep isl_basic_set *bset, int div);
436 isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div);
437 int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set *bset);
438 int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map *bmap);
439 isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap);
440 isl_bool isl_map_divs_known(__isl_keep isl_map *map);
441 __isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset);
442 __isl_give isl_mat *isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap);
444 __isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map,
445 __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap));
447 __isl_give isl_map *isl_map_align_params_map_map_and(
448 __isl_take isl_map *map1, __isl_take isl_map *map2,
449 __isl_give isl_map *(*fn)(__isl_take isl_map *map1,
450 __isl_take isl_map *map2));
451 isl_bool isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1,
452 __isl_keep isl_map *map2,
453 isl_bool (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2));
455 isl_stat isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max,
456 isl_stat (*fn)(__isl_take isl_basic_set *dom,
457 __isl_take isl_aff_list *list, void *user),
458 void *user);
459 isl_stat isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set *bset, int max,
460 isl_stat (*fn)(__isl_take isl_basic_set *dom,
461 __isl_take isl_aff_list *list, void *user),
462 void *user);
464 __isl_give isl_set *isl_set_substitute(__isl_take isl_set *set,
465 enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs);
467 __isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set,
468 __isl_take isl_basic_set *context);
470 isl_bool isl_map_compatible_range(__isl_keep isl_map *map,
471 __isl_keep isl_set *set);
473 isl_bool isl_basic_map_plain_is_non_empty(__isl_keep isl_basic_map *bmap);
474 isl_bool isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap);
476 isl_bool isl_map_is_set(__isl_keep isl_map *map);
478 isl_bool isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset,
479 unsigned dim, isl_int *val);
481 __isl_give isl_map *isl_map_plain_gist_basic_map(__isl_take isl_map *map,
482 __isl_take isl_basic_map *context);
484 __isl_give isl_basic_set *isl_basic_set_plain_affine_hull(
485 __isl_take isl_basic_set *bset);
486 __isl_give isl_basic_map *isl_basic_map_plain_affine_hull(
487 __isl_take isl_basic_map *bmap);
489 isl_stat isl_basic_set_dim_residue_class(__isl_keep isl_basic_set *bset,
490 int pos, isl_int *modulo, isl_int *residue);
491 isl_stat isl_set_dim_residue_class(__isl_keep isl_set *set,
492 int pos, isl_int *modulo, isl_int *residue);
494 __isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset,
495 enum isl_dim_type type, unsigned pos, isl_int value);
496 __isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap,
497 enum isl_dim_type type, unsigned pos, isl_int value);
498 __isl_give isl_set *isl_set_fix(__isl_take isl_set *set,
499 enum isl_dim_type type, unsigned pos, isl_int value);
500 isl_bool isl_map_plain_is_fixed(__isl_keep isl_map *map,
501 enum isl_dim_type type, unsigned pos, isl_int *val);
503 int isl_basic_map_output_defining_equality(__isl_keep isl_basic_map *bmap,
504 int pos, int *div, int *ineq);
506 __isl_give isl_basic_map *isl_basic_map_reduce_coefficients(
507 __isl_take isl_basic_map *bmap);
509 __isl_give isl_basic_map *isl_basic_map_shift_div(
510 __isl_take isl_basic_map *bmap, int div, int pos, isl_int shift);
512 __isl_give isl_basic_map_list *isl_map_get_basic_map_list(
513 __isl_keep isl_map *map);
515 __isl_give isl_map *isl_map_fixed_power(__isl_take isl_map *map, isl_int exp);
517 int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset,
518 isl_int max, isl_int *count);
519 int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count);
521 isl_bool isl_basic_map_equal_div_expr_part(__isl_keep isl_basic_map *bmap1,
522 int pos1, __isl_keep isl_basic_map *bmap2, int pos2,
523 unsigned first, unsigned n);
524 isl_bool isl_basic_map_equal_div_expr_except_constant(
525 __isl_keep isl_basic_map *bmap1, int pos1,
526 __isl_keep isl_basic_map *bmap2, int pos2);
527 __isl_give isl_basic_map *isl_basic_map_set_div_expr_constant_num_si_inplace(
528 __isl_take isl_basic_map *bmap, int div, int value);
530 #endif