isl_schedule_node_get_schedule_depth: return isl_size
[isl.git] / isl_map_private.h
blobe40ae79067ac1ab715331fa15886dd42df296340
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_SORTED (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_SORTED (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_constraints(
124 __isl_take isl_basic_set *base, unsigned n_eq, unsigned n_ineq);
125 __isl_give isl_basic_set *isl_basic_set_finalize(
126 __isl_take isl_basic_set *bset);
127 __isl_give isl_basic_set *isl_basic_set_dup(__isl_keep isl_basic_set *bset);
128 __isl_give isl_basic_set *isl_basic_set_simplify(
129 __isl_take isl_basic_set *bset);
131 __isl_give isl_basic_map *isl_basic_map_alloc(isl_ctx *ctx,
132 unsigned nparam, unsigned in, unsigned out, unsigned extra,
133 unsigned n_eq, unsigned n_ineq);
134 __isl_give isl_basic_map *isl_basic_map_mark_final(
135 __isl_take isl_basic_map *bmap);
136 __isl_give isl_basic_map *isl_basic_map_finalize(
137 __isl_take isl_basic_map *bmap);
138 __isl_give isl_basic_map *isl_basic_map_extend(__isl_take isl_basic_map *base,
139 unsigned nparam, unsigned n_in, unsigned n_out, unsigned extra,
140 unsigned n_eq, unsigned n_ineq);
141 __isl_give isl_basic_map *isl_basic_map_extend_constraints(
142 __isl_take isl_basic_map *base, unsigned n_eq, unsigned n_ineq);
143 __isl_give isl_basic_map *isl_basic_map_simplify(
144 __isl_take isl_basic_map *bmap);
146 __isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set,
147 __isl_take isl_basic_set *bset);
149 __isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
150 __isl_take isl_basic_map *bmap);
151 __isl_give isl_map *isl_map_dup(__isl_keep isl_map *map);
153 __isl_give isl_basic_set *isl_basic_set_from_underlying_set(
154 __isl_take isl_basic_set *bset, __isl_take isl_basic_set *like);
156 __isl_give isl_map *isl_map_realign(__isl_take isl_map *map,
157 __isl_take isl_reordering *r);
158 __isl_give isl_set *isl_set_realign(__isl_take isl_set *set,
159 __isl_take isl_reordering *r);
161 __isl_give isl_basic_map *isl_basic_map_reset(__isl_take isl_basic_map *bmap,
162 enum isl_dim_type type);
163 __isl_give isl_map *isl_map_reset(__isl_take isl_map *map,
164 enum isl_dim_type type);
166 __isl_keep isl_space *isl_basic_map_peek_space(
167 __isl_keep const isl_basic_map *bmap);
168 __isl_keep isl_space *isl_basic_set_peek_space(__isl_keep isl_basic_set *bset);
169 __isl_keep isl_space *isl_map_peek_space(__isl_keep const isl_map *map);
170 __isl_keep isl_space *isl_set_peek_space(__isl_keep isl_set *set);
172 __isl_give isl_basic_set *isl_basic_set_reset_space(
173 __isl_take isl_basic_set *bset, __isl_take isl_space *dim);
174 __isl_give isl_basic_map *isl_basic_map_reset_space(
175 __isl_take isl_basic_map *bmap, __isl_take isl_space *dim);
176 __isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map,
177 __isl_take isl_space *space);
178 __isl_give isl_map *isl_map_reset_equal_dim_space(__isl_take isl_map *map,
179 __isl_take isl_space *space);
181 int isl_basic_map_var_offset(__isl_keep isl_basic_map *bmap,
182 enum isl_dim_type type);
183 int isl_basic_set_var_offset(__isl_keep isl_basic_set *bset,
184 enum isl_dim_type type);
185 unsigned isl_basic_map_offset(__isl_keep isl_basic_map *bmap,
186 enum isl_dim_type type);
187 unsigned isl_basic_set_offset(__isl_keep isl_basic_set *bset,
188 enum isl_dim_type type);
190 isl_bool isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap);
191 int isl_map_may_be_set(__isl_keep isl_map *map);
192 isl_bool isl_map_compatible_domain(__isl_keep isl_map *map,
193 __isl_keep isl_set *set);
194 isl_bool isl_basic_map_compatible_domain(__isl_keep isl_basic_map *bmap,
195 __isl_keep isl_basic_set *bset);
196 isl_bool isl_basic_map_compatible_range(__isl_keep isl_basic_map *bmap,
197 __isl_keep isl_basic_set *bset);
199 __isl_give isl_basic_map *isl_basic_map_extend_space(
200 __isl_take isl_basic_map *base, __isl_take isl_space *space,
201 unsigned extra, unsigned n_eq, unsigned n_ineq);
202 __isl_give isl_basic_set *isl_basic_set_extend_space(
203 __isl_take isl_basic_set *base,
204 __isl_take isl_space *dim, unsigned extra,
205 unsigned n_eq, unsigned n_ineq);
206 struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1,
207 struct isl_basic_set *bset2, unsigned pos);
209 __isl_give isl_map *isl_map_grow(__isl_take isl_map *map, int n);
210 struct isl_set *isl_set_grow(struct isl_set *set, int n);
212 isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset,
213 __isl_keep isl_vec *vec);
214 isl_bool isl_basic_map_contains(__isl_keep isl_basic_map *bmap,
215 __isl_keep isl_vec *vec);
217 __isl_give isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *dim,
218 unsigned extra, unsigned n_eq, unsigned n_ineq);
219 __isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *dim, int n,
220 unsigned flags);
221 __isl_give isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *space,
222 unsigned extra, unsigned n_eq, unsigned n_ineq);
223 __isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *dim, int n,
224 unsigned flags);
226 int isl_basic_map_alloc_equality(struct isl_basic_map *bmap);
227 int isl_basic_set_alloc_equality(struct isl_basic_set *bset);
228 int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n);
229 int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n);
230 int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n);
231 int isl_basic_set_alloc_inequality(__isl_keep isl_basic_set *bset);
232 int isl_basic_map_alloc_inequality(__isl_keep isl_basic_map *bmap);
233 int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n);
234 int isl_basic_map_alloc_div(struct isl_basic_map *bmap);
235 __isl_give isl_basic_map *isl_basic_map_insert_div(
236 __isl_take isl_basic_map *bmap, int pos, __isl_keep isl_vec *div);
237 int isl_basic_set_alloc_div(struct isl_basic_set *bset);
238 isl_stat isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n);
239 __isl_give isl_basic_map *isl_basic_map_drop_div(
240 __isl_take isl_basic_map *bmap, unsigned div);
241 void isl_basic_map_inequality_to_equality(
242 struct isl_basic_map *bmap, unsigned pos);
243 int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos);
244 int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos);
245 int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos);
246 __isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset,
247 isl_int *eq);
248 __isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap,
249 isl_int *eq);
250 __isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset,
251 isl_int *ineq);
252 __isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap,
253 isl_int *ineq);
255 __isl_give isl_basic_set *isl_basic_set_tighten_outward(
256 __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec);
258 __isl_give isl_basic_map *isl_inequality_negate(__isl_take isl_basic_map *bmap,
259 unsigned pos);
261 __isl_give isl_basic_set *isl_basic_set_cow(__isl_take isl_basic_set *bset);
262 __isl_give isl_basic_map *isl_basic_map_cow(__isl_take isl_basic_map *bmap);
263 __isl_give isl_set *isl_set_cow(__isl_take isl_set *set);
264 __isl_give isl_map *isl_map_cow(__isl_take isl_map *map);
266 uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap);
268 __isl_give isl_set *isl_basic_set_list_union(
269 __isl_take isl_basic_set_list *list);
271 __isl_give isl_basic_map *isl_basic_map_set_to_empty(
272 __isl_take isl_basic_map *bmap);
273 __isl_give isl_basic_set *isl_basic_set_set_to_empty(
274 __isl_take isl_basic_set *bset);
275 struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset);
276 __isl_give isl_basic_map *isl_basic_map_swap_div(__isl_take isl_basic_map *bmap,
277 int a, int b);
278 __isl_give isl_basic_map *isl_basic_map_order_divs(
279 __isl_take isl_basic_map *bmap);
280 __isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map);
281 __isl_give isl_basic_map *isl_basic_map_align_divs(
282 __isl_take isl_basic_map *dst, __isl_keep isl_basic_map *src);
283 __isl_give isl_map *isl_map_align_divs_to_basic_map_list(
284 __isl_take isl_map *map, __isl_keep isl_basic_map_list *list);
285 __isl_give isl_basic_map_list *isl_basic_map_list_align_divs_to_basic_map(
286 __isl_take isl_basic_map_list *list, __isl_keep isl_basic_map *bmap);
287 __isl_give isl_map *isl_map_align_divs_internal(__isl_take isl_map *map);
288 __isl_give isl_basic_set *isl_basic_set_sort_divs(
289 __isl_take isl_basic_set *bset);
290 __isl_give isl_basic_map *isl_basic_map_sort_divs(
291 __isl_take isl_basic_map *bmap);
292 __isl_give isl_map *isl_map_sort_divs(__isl_take isl_map *map);
293 __isl_give isl_basic_map *isl_basic_map_gauss(__isl_take isl_basic_map *bmap,
294 int *progress);
295 __isl_give isl_basic_set *isl_basic_set_gauss(
296 __isl_take isl_basic_set *bset, int *progress);
297 int isl_basic_map_constraint_cmp(__isl_keep isl_basic_map *bmap,
298 isl_int *c1, isl_int *c2);
299 __isl_give isl_basic_map *isl_basic_map_sort_constraints(
300 __isl_take isl_basic_map *bmap);
301 __isl_give isl_basic_set *isl_basic_set_sort_constraints(
302 __isl_take isl_basic_set *bset);
303 int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1,
304 __isl_keep isl_basic_map *bmap2);
305 isl_bool isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1,
306 __isl_keep isl_basic_map *bmap2);
307 __isl_give isl_basic_map *isl_basic_map_normalize_constraints(
308 __isl_take isl_basic_map *bmap);
309 __isl_give isl_basic_set *isl_basic_set_normalize_constraints(
310 __isl_take isl_basic_set *bset);
311 __isl_give isl_basic_map *isl_basic_map_implicit_equalities(
312 __isl_take isl_basic_map *bmap);
313 __isl_give isl_basic_set *isl_basic_map_underlying_set(
314 __isl_take isl_basic_map *bmap);
315 __isl_give isl_basic_set *isl_basic_set_underlying_set(
316 __isl_take isl_basic_set *bset);
317 __isl_give isl_basic_set_list *isl_basic_map_list_underlying_set(
318 __isl_take isl_basic_map_list *list);
319 __isl_give isl_set *isl_map_underlying_set(__isl_take isl_map *map);
320 __isl_give isl_basic_map *isl_basic_map_overlying_set(
321 __isl_take isl_basic_set *bset, __isl_take isl_basic_map *like);
322 __isl_give isl_basic_map *isl_basic_map_drop_constraint_involving_unknown_divs(
323 __isl_take isl_basic_map *bmap);
324 __isl_give isl_map *isl_map_drop_constraint_involving_unknown_divs(
325 __isl_take isl_map *map);
326 __isl_give isl_basic_map *isl_basic_map_drop_constraints_involving(
327 __isl_take isl_basic_map *bmap, unsigned first, unsigned n);
328 __isl_give isl_basic_set *isl_basic_set_drop_constraints_involving(
329 __isl_take isl_basic_set *bset, unsigned first, unsigned n);
330 __isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset,
331 enum isl_dim_type type, unsigned first, unsigned n);
332 __isl_give isl_basic_map *isl_basic_map_drop(__isl_take isl_basic_map *bmap,
333 enum isl_dim_type type, unsigned first, unsigned n);
334 __isl_give isl_set *isl_set_drop(__isl_take isl_set *set,
335 enum isl_dim_type type, unsigned first, unsigned n);
336 __isl_give isl_basic_set *isl_basic_set_drop_dims(
337 __isl_take isl_basic_set *bset, unsigned first, unsigned n);
338 __isl_give isl_map *isl_map_drop(__isl_take isl_map *map,
339 enum isl_dim_type type, unsigned first, unsigned n);
340 __isl_give isl_basic_map *isl_basic_map_drop_unrelated_constraints(
341 __isl_take isl_basic_map *bmap, __isl_take int *group);
343 __isl_give isl_basic_map *isl_basic_map_remove_duplicate_constraints(
344 __isl_take isl_basic_map *bmap, int *progress, int detect_divs);
345 __isl_give isl_basic_map *isl_basic_map_detect_inequality_pairs(
346 __isl_take isl_basic_map *bmap, int *progress);
348 __isl_give isl_map *isl_map_remove_empty_parts(__isl_take isl_map *map);
349 struct isl_set *isl_set_remove_empty_parts(struct isl_set *set);
350 __isl_give isl_map *isl_map_remove_obvious_duplicates(__isl_take isl_map *map);
352 struct isl_set *isl_set_normalize(struct isl_set *set);
354 struct isl_set *isl_set_drop_vars(
355 struct isl_set *set, unsigned first, unsigned n);
357 __isl_give isl_basic_map *isl_basic_map_eliminate_vars(
358 __isl_take isl_basic_map *bmap, unsigned pos, unsigned n);
359 struct isl_basic_set *isl_basic_set_eliminate_vars(
360 struct isl_basic_set *bset, unsigned pos, unsigned n);
362 __isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map,
363 enum isl_dim_type type, unsigned first, unsigned n);
364 __isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set,
365 enum isl_dim_type type, unsigned first, unsigned n);
366 __isl_give isl_map *isl_map_project_onto(__isl_take isl_map *map,
367 enum isl_dim_type type, unsigned first, unsigned n);
369 __isl_give isl_basic_map *isl_basic_map_add_div_constraint(
370 __isl_take isl_basic_map *bmap, unsigned div, int sign);
371 __isl_give isl_basic_map *isl_basic_map_add_div_constraints(
372 __isl_take isl_basic_map *bmap, unsigned div);
373 __isl_give isl_basic_map *isl_basic_map_add_known_div_constraints(
374 __isl_take isl_basic_map *bmap);
375 __isl_give isl_basic_map *isl_basic_map_drop_redundant_divs(
376 __isl_take isl_basic_map *bmap);
378 __isl_give isl_basic_set *isl_basic_set_recession_cone(
379 __isl_take isl_basic_set *bset);
380 __isl_give isl_basic_set *isl_basic_set_lineality_space(
381 __isl_take isl_basic_set *bset);
382 __isl_give isl_basic_set *isl_set_combined_lineality_space(
383 __isl_take isl_set *set);
385 __isl_give isl_basic_set *isl_basic_set_set_integral(
386 __isl_take isl_basic_set *bset);
387 __isl_give isl_basic_set *isl_basic_set_set_rational(
388 __isl_take isl_basic_set *bset);
389 __isl_give isl_set *isl_set_set_rational(__isl_take isl_set *set);
390 __isl_give isl_basic_map *isl_basic_map_set_rational(
391 __isl_take isl_basic_map *bmap);
392 __isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map);
394 isl_bool isl_map_is_rational(__isl_keep isl_map *map);
395 isl_bool isl_set_is_rational(__isl_keep isl_set *set);
397 isl_bool isl_map_has_rational(__isl_keep isl_map *map);
398 isl_bool isl_set_has_rational(__isl_keep isl_set *set);
400 __isl_give isl_basic_map *isl_basic_map_from_multi_aff2(
401 __isl_take isl_multi_aff *maff, int rational);
402 __isl_give isl_map *isl_map_from_multi_aff_internal(
403 __isl_take isl_multi_aff *ma);
404 __isl_give isl_map *isl_map_from_pw_aff_internal(__isl_take isl_pw_aff *pa);
406 struct isl_mat;
408 __isl_give isl_basic_set *isl_basic_set_preimage(
409 __isl_take isl_basic_set *bset, __isl_take isl_mat *mat);
410 __isl_give isl_set *isl_set_preimage(
411 __isl_take isl_set *set, __isl_take isl_mat *mat);
413 __isl_give isl_basic_map *isl_basic_map_transform_dims(
414 __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first,
415 __isl_take isl_mat *trans);
416 __isl_give isl_basic_set *isl_basic_set_transform_dims(
417 __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
418 __isl_take isl_mat *trans);
420 isl_int *isl_set_wrap_facet(__isl_keep isl_set *set,
421 isl_int *facet, isl_int *ridge);
423 isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
424 __isl_keep isl_point *point);
425 isl_bool isl_set_contains_point(__isl_keep isl_set *set,
426 __isl_keep isl_point *point);
428 isl_stat isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset,
429 unsigned first, unsigned n, int *signs);
430 isl_stat isl_set_foreach_orthant(__isl_keep isl_set *set,
431 isl_stat (*fn)(__isl_take isl_set *orthant, int *signs, void *user),
432 void *user);
434 isl_bool isl_basic_set_eq_is_stride(__isl_keep isl_basic_set *bset, int i);
436 isl_bool isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap,
437 isl_int *constraint, unsigned div);
438 isl_bool isl_basic_set_is_div_constraint(__isl_keep isl_basic_set *bset,
439 isl_int *constraint, unsigned div);
441 __isl_give isl_basic_set *isl_basic_set_from_local_space(
442 __isl_take isl_local_space *ls);
443 __isl_give isl_basic_map *isl_basic_map_from_local_space(
444 __isl_take isl_local_space *ls);
445 __isl_give isl_basic_set *isl_basic_set_expand_divs(
446 __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp);
447 __isl_give isl_basic_map *isl_basic_map_expand_divs(
448 __isl_take isl_basic_set *bmap, __isl_take isl_mat *div, int *exp);
450 int isl_basic_set_n_equality(__isl_keep isl_basic_set *bset);
451 int isl_basic_map_n_equality(__isl_keep isl_basic_map *bmap);
452 int isl_basic_set_n_inequality(__isl_keep isl_basic_set *bset);
453 int isl_basic_map_n_inequality(__isl_keep isl_basic_map *bmap);
455 __isl_give isl_basic_map *isl_basic_map_mark_div_unknown(
456 __isl_take isl_basic_map *bmap, int div);
457 isl_bool isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map *bmap,
458 int div);
459 isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div);
460 int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set *bset);
461 int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map *bmap);
462 isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap);
463 isl_bool isl_map_divs_known(__isl_keep isl_map *map);
464 __isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset);
465 __isl_give isl_mat *isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap);
467 __isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map,
468 __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap));
470 isl_stat isl_basic_set_check_no_params(__isl_keep isl_basic_set *bset);
471 isl_stat isl_basic_set_check_no_locals(__isl_keep isl_basic_set *bset);
473 isl_stat isl_basic_set_check_range(__isl_keep isl_basic_set *bset,
474 enum isl_dim_type type, unsigned first, unsigned n);
475 isl_stat isl_basic_map_check_range(__isl_keep isl_basic_map *bmap,
476 enum isl_dim_type type, unsigned first, unsigned n);
477 isl_stat isl_map_check_named_params(__isl_keep isl_map *map);
479 isl_bool isl_map_has_equal_params(__isl_keep isl_map *map1,
480 __isl_keep isl_map *map2);
481 isl_bool isl_basic_set_space_has_equal_params(__isl_keep isl_basic_set *bset,
482 __isl_keep isl_space *space);
483 isl_bool isl_set_space_has_equal_params(__isl_keep isl_set *set,
484 __isl_keep isl_space *space);
485 isl_bool isl_map_space_has_equal_params(__isl_keep isl_map *map,
486 __isl_keep isl_space *space);
488 __isl_give isl_map *isl_map_align_params_map_map_and(
489 __isl_take isl_map *map1, __isl_take isl_map *map2,
490 __isl_give isl_map *(*fn)(__isl_take isl_map *map1,
491 __isl_take isl_map *map2));
492 isl_bool isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1,
493 __isl_keep isl_map *map2,
494 isl_bool (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2));
496 __isl_give isl_set *isl_set_substitute(__isl_take isl_set *set,
497 enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs);
499 __isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set,
500 __isl_take isl_basic_set *context);
502 isl_bool isl_map_compatible_range(__isl_keep isl_map *map,
503 __isl_keep isl_set *set);
505 isl_bool isl_basic_map_plain_is_non_empty(__isl_keep isl_basic_map *bmap);
506 isl_bool isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap);
508 isl_bool isl_map_is_set(__isl_keep isl_map *map);
509 isl_bool isl_map_is_params(__isl_keep isl_map *map);
511 isl_bool isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset,
512 unsigned dim, isl_int *val);
514 __isl_give isl_set *isl_set_plain_gist_basic_set(__isl_take isl_set *set,
515 __isl_take isl_basic_set *context);
516 __isl_give isl_map *isl_map_plain_gist_basic_map(__isl_take isl_map *map,
517 __isl_take isl_basic_map *context);
518 __isl_give isl_map *isl_map_plain_gist(__isl_take isl_map *map,
519 __isl_take isl_map *context);
521 __isl_give isl_basic_set *isl_basic_set_plain_affine_hull(
522 __isl_take isl_basic_set *bset);
523 __isl_give isl_basic_map *isl_basic_map_plain_affine_hull(
524 __isl_take isl_basic_map *bmap);
526 isl_stat isl_basic_set_dim_residue_class(__isl_keep isl_basic_set *bset,
527 int pos, isl_int *modulo, isl_int *residue);
528 isl_stat isl_set_dim_residue_class(__isl_keep isl_set *set,
529 int pos, isl_int *modulo, isl_int *residue);
531 __isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset,
532 enum isl_dim_type type, unsigned pos, isl_int value);
533 __isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap,
534 enum isl_dim_type type, unsigned pos, isl_int value);
535 __isl_give isl_set *isl_set_fix(__isl_take isl_set *set,
536 enum isl_dim_type type, unsigned pos, isl_int value);
537 isl_bool isl_map_plain_is_fixed(__isl_keep isl_map *map,
538 enum isl_dim_type type, unsigned pos, isl_int *val);
540 int isl_basic_map_output_defining_equality(__isl_keep isl_basic_map *bmap,
541 int pos, int *div, int *ineq);
543 __isl_give isl_basic_map *isl_basic_map_reduce_coefficients(
544 __isl_take isl_basic_map *bmap);
546 __isl_give isl_basic_map *isl_basic_map_shift_div(
547 __isl_take isl_basic_map *bmap, int div, int pos, isl_int shift);
549 int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset,
550 isl_int max, isl_int *count);
551 int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count);
553 isl_stat isl_map_check_equal_tuples(__isl_keep isl_map *map);
555 __isl_give isl_mat *isl_basic_set_extract_equalities(
556 __isl_keep isl_basic_set *bset);
558 isl_bool isl_basic_map_equal_div_expr_part(__isl_keep isl_basic_map *bmap1,
559 int pos1, __isl_keep isl_basic_map *bmap2, int pos2,
560 unsigned first, unsigned n);
561 isl_bool isl_basic_map_equal_div_expr_except_constant(
562 __isl_keep isl_basic_map *bmap1, int pos1,
563 __isl_keep isl_basic_map *bmap2, int pos2);
564 __isl_give isl_basic_map *isl_basic_map_set_div_expr_constant_num_si_inplace(
565 __isl_take isl_basic_map *bmap, int div, int value);
567 #endif