drop isl_map_drop_redundant_divs
[isl.git] / isl_map_private.h
blob887fdd9999ecb27934e2291a81ac4556467f417f
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_dup(__isl_keep isl_set *set);
155 __isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
156 __isl_take isl_basic_map *bmap);
157 __isl_give isl_map *isl_map_dup(__isl_keep isl_map *map);
159 __isl_give isl_basic_set *isl_basic_set_from_underlying_set(
160 __isl_take isl_basic_set *bset, __isl_take isl_basic_set *like);
162 __isl_give isl_map *isl_map_realign(__isl_take isl_map *map,
163 __isl_take isl_reordering *r);
164 __isl_give isl_set *isl_set_realign(__isl_take isl_set *set,
165 __isl_take isl_reordering *r);
167 __isl_give isl_map *isl_map_reset(__isl_take isl_map *map,
168 enum isl_dim_type type);
170 __isl_give isl_basic_set *isl_basic_set_reset_space(
171 __isl_take isl_basic_set *bset, __isl_take isl_space *dim);
172 __isl_give isl_basic_map *isl_basic_map_reset_space(
173 __isl_take isl_basic_map *bmap, __isl_take isl_space *dim);
174 __isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map,
175 __isl_take isl_space *dim);
177 unsigned isl_basic_map_offset(struct isl_basic_map *bmap,
178 enum isl_dim_type type);
179 unsigned isl_basic_set_offset(struct isl_basic_set *bset,
180 enum isl_dim_type type);
182 isl_bool isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap);
183 int isl_map_may_be_set(__isl_keep isl_map *map);
184 isl_bool isl_map_compatible_domain(__isl_keep isl_map *map,
185 __isl_keep isl_set *set);
186 isl_bool isl_basic_map_compatible_domain(__isl_keep isl_basic_map *bmap,
187 __isl_keep isl_basic_set *bset);
188 isl_bool isl_basic_map_compatible_range(__isl_keep isl_basic_map *bmap,
189 __isl_keep isl_basic_set *bset);
191 struct isl_basic_map *isl_basic_map_extend_space(struct isl_basic_map *base,
192 __isl_take isl_space *dim, unsigned extra,
193 unsigned n_eq, unsigned n_ineq);
194 struct isl_basic_set *isl_basic_set_extend_space(struct isl_basic_set *base,
195 __isl_take isl_space *dim, unsigned extra,
196 unsigned n_eq, unsigned n_ineq);
197 struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1,
198 struct isl_basic_set *bset2, unsigned pos);
200 struct isl_map *isl_map_grow(struct isl_map *map, int n);
201 struct isl_set *isl_set_grow(struct isl_set *set, int n);
203 isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset,
204 __isl_keep isl_vec *vec);
205 isl_bool isl_basic_map_contains(__isl_keep isl_basic_map *bmap,
206 __isl_keep isl_vec *vec);
208 __isl_give isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *dim,
209 unsigned extra, unsigned n_eq, unsigned n_ineq);
210 __isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *dim, int n,
211 unsigned flags);
212 __isl_give isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *dim,
213 unsigned extra, unsigned n_eq, unsigned n_ineq);
214 __isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *dim, int n,
215 unsigned flags);
217 int isl_basic_map_alloc_equality(struct isl_basic_map *bmap);
218 int isl_basic_set_alloc_equality(struct isl_basic_set *bset);
219 int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n);
220 int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n);
221 int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n);
222 int isl_basic_set_alloc_inequality(struct isl_basic_set *bset);
223 int isl_basic_map_alloc_inequality(struct isl_basic_map *bmap);
224 int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n);
225 int isl_basic_map_alloc_div(struct isl_basic_map *bmap);
226 __isl_give isl_basic_map *isl_basic_map_insert_div(
227 __isl_take isl_basic_map *bmap, int pos, __isl_keep isl_vec *div);
228 int isl_basic_set_alloc_div(struct isl_basic_set *bset);
229 isl_stat isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n);
230 __isl_give isl_basic_map *isl_basic_map_drop_div(
231 __isl_take isl_basic_map *bmap, unsigned div);
232 void isl_basic_map_inequality_to_equality(
233 struct isl_basic_map *bmap, unsigned pos);
234 int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos);
235 int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos);
236 int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos);
237 int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos);
238 __isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset,
239 isl_int *eq);
240 __isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap,
241 isl_int *eq);
242 __isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset,
243 isl_int *ineq);
244 __isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap,
245 isl_int *ineq);
247 __isl_give isl_basic_set *isl_basic_set_tighten_outward(
248 __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec);
250 int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos);
252 struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset);
253 struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap);
254 struct isl_set *isl_set_cow(struct isl_set *set);
255 struct isl_map *isl_map_cow(struct isl_map *map);
257 uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap);
259 __isl_give isl_set *isl_basic_set_list_union(
260 __isl_take isl_basic_set_list *list);
262 struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap);
263 struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset);
264 struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset);
265 void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b);
266 void isl_basic_set_swap_div(struct isl_basic_set *bset, int a, int b);
267 struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap);
268 __isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map);
269 struct isl_basic_map *isl_basic_map_align_divs(
270 struct isl_basic_map *dst, struct isl_basic_map *src);
271 __isl_give isl_map *isl_map_align_divs_to_basic_map_list(
272 __isl_take isl_map *map, __isl_keep isl_basic_map_list *list);
273 __isl_give isl_basic_map_list *isl_basic_map_list_align_divs_to_basic_map(
274 __isl_take isl_basic_map_list *list, __isl_keep isl_basic_map *bmap);
275 __isl_give isl_basic_set *isl_basic_set_sort_divs(
276 __isl_take isl_basic_set *bset);
277 __isl_give isl_basic_map *isl_basic_map_sort_divs(
278 __isl_take isl_basic_map *bmap);
279 __isl_give isl_map *isl_map_sort_divs(__isl_take isl_map *map);
280 struct isl_basic_map *isl_basic_map_gauss(
281 struct isl_basic_map *bmap, int *progress);
282 struct isl_basic_set *isl_basic_set_gauss(
283 struct isl_basic_set *bset, int *progress);
284 int isl_basic_map_constraint_cmp(__isl_keep isl_basic_map *bmap,
285 isl_int *c1, isl_int *c2);
286 __isl_give isl_basic_map *isl_basic_map_sort_constraints(
287 __isl_take isl_basic_map *bmap);
288 __isl_give isl_basic_set *isl_basic_set_sort_constraints(
289 __isl_take isl_basic_set *bset);
290 int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1,
291 __isl_keep isl_basic_map *bmap2);
292 isl_bool isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1,
293 __isl_keep isl_basic_map *bmap2);
294 struct isl_basic_map *isl_basic_map_normalize_constraints(
295 struct isl_basic_map *bmap);
296 struct isl_basic_set *isl_basic_set_normalize_constraints(
297 struct isl_basic_set *bset);
298 struct isl_basic_map *isl_basic_map_implicit_equalities(
299 struct isl_basic_map *bmap);
300 struct isl_basic_set *isl_basic_map_underlying_set(struct isl_basic_map *bmap);
301 __isl_give isl_basic_set *isl_basic_set_underlying_set(
302 __isl_take isl_basic_set *bset);
303 __isl_give isl_basic_set_list *isl_basic_map_list_underlying_set(
304 __isl_take isl_basic_map_list *list);
305 struct isl_set *isl_map_underlying_set(struct isl_map *map);
306 struct isl_basic_map *isl_basic_map_overlying_set(struct isl_basic_set *bset,
307 struct isl_basic_map *like);
308 __isl_give isl_basic_map *isl_basic_map_drop_constraint_involving_unknown_divs(
309 __isl_take isl_basic_map *bmap);
310 __isl_give isl_map *isl_map_drop_constraint_involving_unknown_divs(
311 __isl_take isl_map *map);
312 __isl_give isl_basic_set *isl_basic_set_drop_constraints_involving(
313 __isl_take isl_basic_set *bset, unsigned first, unsigned n);
314 __isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset,
315 enum isl_dim_type type, unsigned first, unsigned n);
316 struct isl_basic_map *isl_basic_map_drop(struct isl_basic_map *bmap,
317 enum isl_dim_type type, unsigned first, unsigned n);
318 struct isl_set *isl_set_drop(struct isl_set *set,
319 enum isl_dim_type type, unsigned first, unsigned n);
320 struct isl_basic_set *isl_basic_set_drop_dims(
321 struct isl_basic_set *bset, unsigned first, unsigned n);
322 struct isl_map *isl_map_drop(struct isl_map *map,
323 enum isl_dim_type type, unsigned first, unsigned n);
324 __isl_give isl_basic_map *isl_basic_map_drop_unrelated_constraints(
325 __isl_take isl_basic_map *bmap, __isl_take int *group);
327 __isl_give isl_basic_map *isl_basic_map_remove_duplicate_constraints(
328 __isl_take isl_basic_map *bmap, int *progress, int detect_divs);
329 __isl_give isl_basic_map *isl_basic_map_detect_inequality_pairs(
330 __isl_take isl_basic_map *bmap, int *progress);
332 struct isl_map *isl_map_remove_empty_parts(struct isl_map *map);
333 struct isl_set *isl_set_remove_empty_parts(struct isl_set *set);
334 __isl_give isl_map *isl_map_remove_obvious_duplicates(__isl_take isl_map *map);
336 struct isl_set *isl_set_normalize(struct isl_set *set);
338 struct isl_set *isl_set_drop_vars(
339 struct isl_set *set, unsigned first, unsigned n);
341 struct isl_basic_map *isl_basic_map_eliminate_vars(
342 struct isl_basic_map *bmap, unsigned pos, unsigned n);
343 struct isl_basic_set *isl_basic_set_eliminate_vars(
344 struct isl_basic_set *bset, unsigned pos, unsigned n);
346 __isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map,
347 enum isl_dim_type type, unsigned first, unsigned n);
348 __isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set,
349 enum isl_dim_type type, unsigned first, unsigned n);
351 int isl_basic_map_add_div_constraint(__isl_keep isl_basic_map *bmap,
352 unsigned div, int sign);
353 int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div);
354 __isl_give isl_basic_map *isl_basic_map_add_known_div_constraints(
355 __isl_take isl_basic_map *bmap);
356 struct isl_basic_map *isl_basic_map_drop_redundant_divs(
357 struct isl_basic_map *bmap);
358 struct isl_basic_set *isl_basic_set_drop_redundant_divs(
359 struct isl_basic_set *bset);
361 struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset);
362 struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset);
364 struct isl_basic_set *isl_basic_set_set_rational(struct isl_basic_set *bset);
365 __isl_give isl_set *isl_set_set_rational(__isl_take isl_set *set);
366 __isl_give isl_basic_map *isl_basic_map_set_rational(
367 __isl_take isl_basic_map *bmap);
368 __isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map);
370 isl_bool isl_map_is_rational(__isl_keep isl_map *map);
371 isl_bool isl_set_is_rational(__isl_keep isl_set *set);
373 isl_bool isl_map_has_rational(__isl_keep isl_map *map);
374 isl_bool isl_set_has_rational(__isl_keep isl_set *set);
376 __isl_give isl_basic_map *isl_basic_map_from_multi_aff2(
377 __isl_take isl_multi_aff *maff, int rational);
379 struct isl_mat;
381 struct isl_basic_set *isl_basic_set_preimage(struct isl_basic_set *bset,
382 struct isl_mat *mat);
383 struct isl_set *isl_set_preimage(struct isl_set *set, struct isl_mat *mat);
385 __isl_give isl_basic_map *isl_basic_map_transform_dims(
386 __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first,
387 __isl_take isl_mat *trans);
388 __isl_give isl_basic_set *isl_basic_set_transform_dims(
389 __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
390 __isl_take isl_mat *trans);
392 isl_int *isl_set_wrap_facet(__isl_keep isl_set *set,
393 isl_int *facet, isl_int *ridge);
395 isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
396 __isl_keep isl_point *point);
397 isl_bool isl_set_contains_point(__isl_keep isl_set *set,
398 __isl_keep isl_point *point);
400 isl_stat isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset,
401 unsigned first, unsigned n, int *signs);
402 isl_stat isl_set_foreach_orthant(__isl_keep isl_set *set,
403 isl_stat (*fn)(__isl_take isl_set *orthant, int *signs, void *user),
404 void *user);
406 int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap,
407 unsigned pos, isl_int *div);
408 int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset,
409 unsigned pos, isl_int *div);
410 isl_bool isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap,
411 isl_int *constraint, unsigned div);
412 isl_bool isl_basic_set_is_div_constraint(__isl_keep isl_basic_set *bset,
413 isl_int *constraint, unsigned div);
415 __isl_give isl_basic_set *isl_basic_set_from_local_space(
416 __isl_take isl_local_space *ls);
417 __isl_give isl_basic_map *isl_basic_map_from_local_space(
418 __isl_take isl_local_space *ls);
419 __isl_give isl_basic_set *isl_basic_set_expand_divs(
420 __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp);
421 __isl_give isl_basic_map *isl_basic_map_expand_divs(
422 __isl_take isl_basic_set *bmap, __isl_take isl_mat *div, int *exp);
424 __isl_give isl_basic_map *isl_basic_map_mark_div_unknown(
425 __isl_take isl_basic_map *bmap, int div);
426 isl_bool isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map *bmap,
427 int div);
428 isl_bool isl_basic_set_div_is_known(__isl_keep isl_basic_set *bset, int div);
429 isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div);
430 int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set *bset);
431 int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map *bmap);
432 isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap);
433 isl_bool isl_map_divs_known(__isl_keep isl_map *map);
434 __isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset);
435 __isl_give isl_mat *isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap);
437 __isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map,
438 __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap));
440 __isl_give isl_map *isl_map_align_params_map_map_and(
441 __isl_take isl_map *map1, __isl_take isl_map *map2,
442 __isl_give isl_map *(*fn)(__isl_take isl_map *map1,
443 __isl_take isl_map *map2));
444 isl_bool isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1,
445 __isl_keep isl_map *map2,
446 isl_bool (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2));
448 isl_stat isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max,
449 isl_stat (*fn)(__isl_take isl_basic_set *dom,
450 __isl_take isl_aff_list *list, void *user),
451 void *user);
452 isl_stat isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set *bset, int max,
453 isl_stat (*fn)(__isl_take isl_basic_set *dom,
454 __isl_take isl_aff_list *list, void *user),
455 void *user);
457 __isl_give isl_set *isl_set_substitute(__isl_take isl_set *set,
458 enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs);
460 __isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set,
461 __isl_take isl_basic_set *context);
463 isl_bool isl_map_compatible_range(__isl_keep isl_map *map,
464 __isl_keep isl_set *set);
466 isl_bool isl_basic_map_plain_is_non_empty(__isl_keep isl_basic_map *bmap);
467 isl_bool isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap);
469 isl_bool isl_map_is_set(__isl_keep isl_map *map);
471 isl_bool isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset,
472 unsigned dim, isl_int *val);
474 __isl_give isl_map *isl_map_plain_gist_basic_map(__isl_take isl_map *map,
475 __isl_take isl_basic_map *context);
477 __isl_give isl_basic_set *isl_basic_set_plain_affine_hull(
478 __isl_take isl_basic_set *bset);
479 __isl_give isl_basic_map *isl_basic_map_plain_affine_hull(
480 __isl_take isl_basic_map *bmap);
482 isl_stat isl_basic_set_dim_residue_class(__isl_keep isl_basic_set *bset,
483 int pos, isl_int *modulo, isl_int *residue);
484 isl_stat isl_set_dim_residue_class(__isl_keep isl_set *set,
485 int pos, isl_int *modulo, isl_int *residue);
487 __isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset,
488 enum isl_dim_type type, unsigned pos, isl_int value);
489 __isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap,
490 enum isl_dim_type type, unsigned pos, isl_int value);
491 __isl_give isl_set *isl_set_fix(__isl_take isl_set *set,
492 enum isl_dim_type type, unsigned pos, isl_int value);
493 isl_bool isl_map_plain_is_fixed(__isl_keep isl_map *map,
494 enum isl_dim_type type, unsigned pos, isl_int *val);
496 int isl_basic_map_output_defining_equality(__isl_keep isl_basic_map *bmap,
497 int pos, int *div, int *ineq);
499 __isl_give isl_basic_map *isl_basic_map_reduce_coefficients(
500 __isl_take isl_basic_map *bmap);
502 __isl_give isl_basic_map *isl_basic_map_shift_div(
503 __isl_take isl_basic_map *bmap, int div, int pos, isl_int shift);
505 __isl_give isl_basic_map_list *isl_map_get_basic_map_list(
506 __isl_keep isl_map *map);
508 __isl_give isl_map *isl_map_fixed_power(__isl_take isl_map *map, isl_int exp);
510 int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset,
511 isl_int max, isl_int *count);
512 int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count);
514 isl_bool isl_basic_map_equal_div_expr_part(__isl_keep isl_basic_map *bmap1,
515 int pos1, __isl_keep isl_basic_map *bmap2, int pos2,
516 unsigned first, unsigned n);
517 isl_bool isl_basic_map_equal_div_expr_except_constant(
518 __isl_keep isl_basic_map *bmap1, int pos1,
519 __isl_keep isl_basic_map *bmap2, int pos2);
520 __isl_give isl_basic_map *isl_basic_map_set_div_expr_constant_num_si_inplace(
521 __isl_take isl_basic_map *bmap, int div, int value);
523 #endif