1/*
2 * Copyright 2008-2009 Katholieke Universiteit Leuven
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8 */
9
10#ifndef ISL_MAP_PRIVATE_H
11#define ISL_MAP_PRIVATE_H
12
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>
25
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.
30 *
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
35 */
36struct 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;
57
58 struct isl_ctx *ctx;
59
60 isl_space *dim;
61 unsigned extra;
62
63 unsigned n_eq;
64 unsigned n_ineq;
65
66 size_t c_size;
67 isl_int **eq;
68 isl_int **ineq;
69
70 unsigned n_div;
71
72 isl_int **div;
73
74 struct isl_vec *sample;
75
76 struct isl_blk block;
77 struct isl_blk block2;
78};
79
80#undef EL
81#define EL isl_basic_set
82
83#include <isl_list_templ.h>
84
85/* A "map" is a (possibly disjoint) union of basic maps.
86 * A "set" is a (possibly disjoint) union of basic sets.
87 *
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.
91 *
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.
95 */
96struct 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];
104
105 struct isl_ctx *ctx;
106
107 isl_space *dim;
108
109 int n;
110
111 size_t size;
112 struct isl_basic_map *p[1];
113};
114
115#undef EL
116#define EL isl_set
117
118#include <isl_list_templ.h>
119
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);
130
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_constraints(
139 __isl_take isl_basic_map *base, unsigned n_eq, unsigned n_ineq);
140__isl_give isl_basic_map *isl_basic_map_simplify(
141 __isl_take isl_basic_map *bmap);
142
143__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set,
144 __isl_take isl_basic_set *bset);
145
146__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
147 __isl_take isl_basic_map *bmap);
148__isl_give isl_map *isl_map_dup(__isl_keep isl_map *map);
149
150__isl_give isl_basic_set *isl_basic_set_from_underlying_set(
151 __isl_take isl_basic_set *bset, __isl_take isl_basic_set *like);
152
153__isl_give isl_map *isl_map_realign(__isl_take isl_map *map,
154 __isl_take isl_reordering *r);
155__isl_give isl_set *isl_set_realign(__isl_take isl_set *set,
156 __isl_take isl_reordering *r);
157
158__isl_give isl_basic_map *isl_basic_map_reset(__isl_take isl_basic_map *bmap,
159 enum isl_dim_type type);
160__isl_give isl_map *isl_map_reset(__isl_take isl_map *map,
161 enum isl_dim_type type);
162
163__isl_keep isl_space *isl_basic_map_peek_space(
164 __isl_keep const isl_basic_map *bmap);
165__isl_keep isl_space *isl_basic_set_peek_space(__isl_keep isl_basic_set *bset);
166__isl_keep isl_space *isl_map_peek_space(__isl_keep const isl_map *map);
167__isl_keep isl_space *isl_set_peek_space(__isl_keep isl_set *set);
168
169__isl_give isl_basic_set *isl_basic_set_reset_space(
170 __isl_take isl_basic_set *bset, __isl_take isl_space *space);
171__isl_give isl_basic_map *isl_basic_map_reset_space(
172 __isl_take isl_basic_map *bmap, __isl_take isl_space *space);
173__isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map,
174 __isl_take isl_space *space);
175__isl_give isl_map *isl_map_reset_equal_dim_space(__isl_take isl_map *map,
176 __isl_take isl_space *space);
177
178isl_size isl_basic_map_var_offset(__isl_keep isl_basic_map *bmap,
179 enum isl_dim_type type);
180isl_size isl_basic_set_var_offset(__isl_keep isl_basic_set *bset,
181 enum isl_dim_type type);
182unsigned isl_basic_map_offset(__isl_keep isl_basic_map *bmap,
183 enum isl_dim_type type);
184unsigned isl_basic_set_offset(__isl_keep isl_basic_set *bset,
185 enum isl_dim_type type);
186
187isl_bool isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap);
188int isl_map_may_be_set(__isl_keep isl_map *map);
189isl_bool isl_map_compatible_domain(__isl_keep isl_map *map,
190 __isl_keep isl_set *set);
191isl_bool isl_basic_map_compatible_domain(__isl_keep isl_basic_map *bmap,
192 __isl_keep isl_basic_set *bset);
193isl_bool isl_basic_map_compatible_range(__isl_keep isl_basic_map *bmap,
194 __isl_keep isl_basic_set *bset);
195
196__isl_give isl_basic_map *isl_basic_map_extend(__isl_take isl_basic_map *base,
197 unsigned extra, unsigned n_eq, unsigned n_ineq);
198__isl_give isl_basic_set *isl_basic_set_extend(__isl_take isl_basic_set *base,
199 unsigned extra, unsigned n_eq, unsigned n_ineq);
200
201__isl_give isl_map *isl_map_grow(__isl_take isl_map *map, int n);
202__isl_give isl_set *isl_set_grow(__isl_take isl_set *set, int n);
203
204isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset,
205 __isl_keep isl_vec *vec);
206isl_bool isl_basic_map_contains(__isl_keep isl_basic_map *bmap,
207 __isl_keep isl_vec *vec);
208
209__isl_give isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *space,
210 unsigned extra, unsigned n_eq, unsigned n_ineq);
211__isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *space, int n,
212 unsigned flags);
213__isl_give isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *space,
214 unsigned extra, unsigned n_eq, unsigned n_ineq);
215__isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *space, int n,
216 unsigned flags);
217
218int isl_basic_map_alloc_equality(__isl_keep isl_basic_map *bmap);
219int isl_basic_set_alloc_equality(__isl_keep isl_basic_set *bset);
220__isl_give isl_basic_set *isl_basic_set_free_inequality(
221 __isl_take isl_basic_set *bset, unsigned n);
222__isl_give isl_basic_map *isl_basic_map_free_equality(
223 __isl_take isl_basic_map *bmap, unsigned n);
224__isl_give isl_basic_set *isl_basic_set_free_equality(
225 __isl_take isl_basic_set *bset, unsigned n);
226int isl_basic_set_alloc_inequality(__isl_keep isl_basic_set *bset);
227int isl_basic_map_alloc_inequality(__isl_keep isl_basic_map *bmap);
228__isl_give isl_basic_map *isl_basic_map_free_inequality(
229 __isl_take isl_basic_map *bmap, unsigned n);
230int isl_basic_map_alloc_div(__isl_keep isl_basic_map *bmap);
231__isl_give isl_basic_map *isl_basic_map_insert_div(
232 __isl_take isl_basic_map *bmap, int pos, __isl_keep isl_vec *div);
233int isl_basic_set_alloc_div(__isl_keep isl_basic_set *bset);
234isl_stat isl_basic_map_free_div(__isl_keep isl_basic_map *bmap, unsigned n);
235__isl_give isl_basic_map *isl_basic_map_drop_div(
236 __isl_take isl_basic_map *bmap, unsigned div);
237void isl_basic_map_inequality_to_equality(
238 __isl_keep isl_basic_map *bmap, unsigned pos);
239int isl_basic_map_drop_equality(__isl_keep isl_basic_map *bmap, unsigned pos);
240int isl_basic_set_drop_inequality(__isl_keep isl_basic_set *bset, unsigned pos);
241int isl_basic_map_drop_inequality(__isl_keep isl_basic_map *bmap, unsigned pos);
242__isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset,
243 isl_int *eq);
244__isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap,
245 isl_int *eq);
246__isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset,
247 isl_int *ineq);
248__isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap,
249 isl_int *ineq);
250
251__isl_give isl_basic_set *isl_basic_set_tighten_outward(
252 __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec);
253
254__isl_give isl_basic_map *isl_inequality_negate(__isl_take isl_basic_map *bmap,
255 unsigned pos);
256
257isl_bool isl_basic_map_has_single_reference(__isl_keep isl_basic_map *bmap);
258__isl_give isl_basic_set *isl_basic_set_cow(__isl_take isl_basic_set *bset);
259__isl_give isl_basic_map *isl_basic_map_cow(__isl_take isl_basic_map *bmap);
260__isl_give isl_set *isl_set_cow(__isl_take isl_set *set);
261__isl_give isl_map *isl_map_cow(__isl_take isl_map *map);
262
263uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap);
264
265__isl_give isl_set *isl_basic_set_list_union(
266 __isl_take isl_basic_set_list *list);
267
268__isl_give isl_basic_map *isl_basic_map_set_to_empty(
269 __isl_take isl_basic_map *bmap);
270__isl_give isl_basic_set *isl_basic_set_set_to_empty(
271 __isl_take isl_basic_set *bset);
272__isl_give isl_basic_map *isl_basic_map_swap_div(__isl_take isl_basic_map *bmap,
273 int a, int b);
274__isl_give isl_basic_map *isl_basic_map_order_divs(
275 __isl_take isl_basic_map *bmap);
276__isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map);
277__isl_give isl_basic_map *isl_basic_map_align_divs(
278 __isl_take isl_basic_map *dst, __isl_keep isl_basic_map *src);
279__isl_give isl_map *isl_map_align_divs_to_basic_map_list(
280 __isl_take isl_map *map, __isl_keep isl_basic_map_list *list);
281__isl_give isl_basic_map_list *isl_basic_map_list_align_divs_to_basic_map(
282 __isl_take isl_basic_map_list *list, __isl_keep isl_basic_map *bmap);
283__isl_give isl_map *isl_map_align_divs_internal(__isl_take isl_map *map);
284__isl_give isl_basic_set *isl_basic_set_sort_divs(
285 __isl_take isl_basic_set *bset);
286__isl_give isl_basic_map *isl_basic_map_sort_divs(
287 __isl_take isl_basic_map *bmap);
288__isl_give isl_map *isl_map_sort_divs(__isl_take isl_map *map);
289__isl_give isl_basic_map *isl_basic_map_gauss5(__isl_take isl_basic_map *bmap,
290 int *progress,
291 isl_stat (*swap)(unsigned a, unsigned b, void *user),
292 isl_stat (*drop)(unsigned n, void *user), void *user);
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);
297int 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);
303int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1,
304 __isl_keep isl_basic_map *bmap2);
305isl_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_set *isl_basic_set_drop_constraints_involving_unknown_divs(
323 __isl_take isl_basic_set *bset);
324__isl_give isl_basic_map *isl_basic_map_drop_constraints_involving_unknown_divs(
325 __isl_take isl_basic_map *bmap);
326__isl_give isl_map *isl_map_drop_constraints_involving_unknown_divs(
327 __isl_take isl_map *map);
328__isl_give isl_basic_map *isl_basic_map_drop_constraints_involving(
329 __isl_take isl_basic_map *bmap, unsigned first, unsigned n);
330__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving(
331 __isl_take isl_basic_set *bset, unsigned first, unsigned n);
332__isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset,
333 enum isl_dim_type type, unsigned first, unsigned n);
334__isl_give isl_basic_map *isl_basic_map_drop(__isl_take isl_basic_map *bmap,
335 enum isl_dim_type type, unsigned first, unsigned n);
336__isl_give isl_set *isl_set_drop(__isl_take isl_set *set,
337 enum isl_dim_type type, unsigned first, unsigned n);
338__isl_give isl_basic_set *isl_basic_set_drop_dims(
339 __isl_take isl_basic_set *bset, unsigned first, unsigned n);
340__isl_give isl_map *isl_map_drop(__isl_take isl_map *map,
341 enum isl_dim_type type, unsigned first, unsigned n);
342__isl_give isl_basic_map *isl_basic_map_drop_unrelated_constraints(
343 __isl_take isl_basic_map *bmap, __isl_take int *group);
344
345__isl_give isl_basic_map *isl_basic_map_eliminate_pure_unit_divs(
346 __isl_take isl_basic_map *bmap);
347__isl_give isl_basic_map *isl_basic_map_remove_duplicate_constraints(
348 __isl_take isl_basic_map *bmap, int *progress, int detect_divs);
349__isl_give isl_basic_map *isl_basic_map_detect_inequality_pairs(
350 __isl_take isl_basic_map *bmap, int *progress);
351
352__isl_give isl_map *isl_map_remove_empty_parts(__isl_take isl_map *map);
353__isl_give isl_set *isl_set_remove_empty_parts(__isl_take isl_set *set);
354__isl_give isl_map *isl_map_remove_obvious_duplicates(__isl_take isl_map *map);
355
356__isl_give isl_set *isl_set_normalize(__isl_take isl_set *set);
357
358__isl_give isl_basic_map *isl_basic_map_eliminate_vars(
359 __isl_take isl_basic_map *bmap, unsigned pos, unsigned n);
360__isl_give isl_basic_set *isl_basic_set_eliminate_vars(
361 __isl_take isl_basic_set *bset, unsigned pos, unsigned n);
362
363__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map,
364 enum isl_dim_type type, unsigned first, unsigned n);
365__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set,
366 enum isl_dim_type type, unsigned first, unsigned n);
367__isl_give isl_map *isl_map_project_onto(__isl_take isl_map *map,
368 enum isl_dim_type type, unsigned first, unsigned n);
369
370__isl_give isl_basic_map *isl_basic_map_add_div_constraint(
371 __isl_take isl_basic_map *bmap, unsigned div, int sign);
372__isl_give isl_basic_map *isl_basic_map_add_div_constraints(
373 __isl_take isl_basic_map *bmap, unsigned div);
374__isl_give isl_basic_map *isl_basic_map_add_known_div_constraints(
375 __isl_take isl_basic_map *bmap);
376__isl_give isl_basic_map *isl_basic_map_drop_redundant_divs(
377 __isl_take isl_basic_map *bmap);
378
379__isl_give isl_basic_set *isl_basic_set_recession_cone(
380 __isl_take isl_basic_set *bset);
381__isl_give isl_basic_set *isl_basic_set_lineality_space(
382 __isl_take isl_basic_set *bset);
383__isl_give isl_basic_set *isl_set_combined_lineality_space(
384 __isl_take isl_set *set);
385
386__isl_give isl_basic_set *isl_basic_set_set_integral(
387 __isl_take isl_basic_set *bset);
388__isl_give isl_basic_set *isl_basic_set_set_rational(
389 __isl_take isl_basic_set *bset);
390__isl_give isl_set *isl_set_set_rational(__isl_take isl_set *set);
391__isl_give isl_basic_map *isl_basic_map_set_rational(
392 __isl_take isl_basic_map *bmap);
393__isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map);
394
395isl_bool isl_map_is_rational(__isl_keep isl_map *map);
396isl_bool isl_set_is_rational(__isl_keep isl_set *set);
397
398isl_bool isl_map_has_rational(__isl_keep isl_map *map);
399isl_bool isl_set_has_rational(__isl_keep isl_set *set);
400
401__isl_give isl_basic_map *isl_basic_map_from_multi_aff2(
402 __isl_take isl_multi_aff *maff, int rational);
403__isl_give isl_map *isl_map_from_multi_aff_internal(
404 __isl_take isl_multi_aff *ma);
405__isl_give isl_map *isl_map_from_pw_aff_internal(__isl_take isl_pw_aff *pa);
406__isl_give isl_map *isl_map_from_pw_multi_aff_internal(
407 __isl_take isl_pw_multi_aff *pma);
408
409struct isl_mat;
410
411__isl_give isl_basic_set *isl_basic_set_preimage(
412 __isl_take isl_basic_set *bset, __isl_take isl_mat *mat);
413__isl_give isl_set *isl_set_preimage(
414 __isl_take isl_set *set, __isl_take isl_mat *mat);
415
416__isl_give isl_basic_map *isl_basic_map_transform_dims(
417 __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first,
418 __isl_take isl_mat *trans);
419__isl_give isl_basic_set *isl_basic_set_transform_dims(
420 __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
421 __isl_take isl_mat *trans);
422
423isl_int *isl_set_wrap_facet(__isl_keep isl_set *set,
424 isl_int *facet, isl_int *ridge);
425
426isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
427 __isl_keep isl_point *point);
428isl_bool isl_set_contains_point(__isl_keep isl_set *set,
429 __isl_keep isl_point *point);
430
431isl_stat isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset,
432 unsigned first, unsigned n, int *signs);
433isl_stat isl_set_foreach_orthant(__isl_keep isl_set *set,
434 isl_stat (*fn)(__isl_take isl_set *orthant, int *signs, void *user),
435 void *user);
436
437isl_bool isl_basic_set_eq_is_stride(__isl_keep isl_basic_set *bset, int i);
438
439isl_bool isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap,
440 isl_int *constraint, unsigned div);
441
442__isl_give isl_basic_set *isl_basic_set_from_local_space(
443 __isl_take isl_local_space *ls);
444__isl_give isl_basic_map *isl_basic_map_from_local_space(
445 __isl_take isl_local_space *ls);
446__isl_give isl_basic_set *isl_basic_set_expand_divs(
447 __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp);
448__isl_give isl_basic_map *isl_basic_map_expand_divs(
449 __isl_take isl_basic_set *bmap, __isl_take isl_mat *div, int *exp);
450
451isl_size isl_basic_set_n_equality(__isl_keep isl_basic_set *bset);
452isl_size isl_basic_map_n_equality(__isl_keep isl_basic_map *bmap);
453isl_size isl_basic_set_n_inequality(__isl_keep isl_basic_set *bset);
454isl_size isl_basic_map_n_inequality(__isl_keep isl_basic_map *bmap);
455
456__isl_give isl_basic_map *isl_basic_map_mark_div_unknown(
457 __isl_take isl_basic_map *bmap, int div);
458isl_bool isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map *bmap,
459 int div);
460isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div);
461int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set *bset);
462int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map *bmap);
463isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap);
464isl_bool isl_map_divs_known(__isl_keep isl_map *map);
465__isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset);
466__isl_give isl_mat *isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap);
467
468isl_bool isl_set_every_basic_set(__isl_keep isl_set *set,
469 isl_bool (*test)(__isl_keep isl_basic_set *bset, void *user),
470 void *user);
471__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map,
472 __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap));
473
474isl_stat isl_basic_set_check_no_params(__isl_keep isl_basic_set *bset);
475isl_stat isl_basic_set_check_no_locals(__isl_keep isl_basic_set *bset);
476
477isl_stat isl_basic_set_check_range(__isl_keep isl_basic_set *bset,
478 enum isl_dim_type type, unsigned first, unsigned n);
479isl_stat isl_set_check_range(__isl_keep isl_set *set,
480 enum isl_dim_type type, unsigned first, unsigned n);
481isl_stat isl_basic_map_check_range(__isl_keep isl_basic_map *bmap,
482 enum isl_dim_type type, unsigned first, unsigned n);
483isl_stat isl_map_check_named_params(__isl_keep isl_map *map);
484
485isl_bool isl_map_has_equal_params(__isl_keep isl_map *map1,
486 __isl_keep isl_map *map2);
487isl_bool isl_basic_set_space_has_equal_params(__isl_keep isl_basic_set *bset,
488 __isl_keep isl_space *space);
489isl_bool isl_set_space_has_equal_params(__isl_keep isl_set *set,
490 __isl_keep isl_space *space);
491isl_bool isl_map_space_has_equal_params(__isl_keep isl_map *map,
492 __isl_keep isl_space *space);
493
494isl_stat isl_map_align_params_bin(__isl_keep isl_map **map1,
495 __isl_keep isl_map **map2);
496isl_stat isl_map_align_params_set(__isl_keep isl_map **map,
497 __isl_keep isl_set **set);
498isl_bool isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1,
499 __isl_keep isl_map *map2,
500 isl_bool (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2));
501
502__isl_give isl_set *isl_set_substitute(__isl_take isl_set *set,
503 unsigned pos, __isl_keep isl_aff *subs);
504
505__isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set,
506 __isl_take isl_basic_set *context);
507
508isl_bool isl_map_compatible_range(__isl_keep isl_map *map,
509 __isl_keep isl_set *set);
510
511isl_bool isl_basic_map_plain_is_non_empty(__isl_keep isl_basic_map *bmap);
512isl_bool isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap);
513
514isl_bool isl_map_is_set(__isl_keep isl_map *map);
515isl_bool isl_map_is_params(__isl_keep isl_map *map);
516
517isl_bool isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset,
518 unsigned dim, isl_int *val);
519
520__isl_give isl_set *isl_set_plain_gist_basic_set(__isl_take isl_set *set,
521 __isl_take isl_basic_set *context);
522__isl_give isl_map *isl_map_plain_gist_basic_map(__isl_take isl_map *map,
523 __isl_take isl_basic_map *context);
524__isl_give isl_map *isl_map_plain_gist(__isl_take isl_map *map,
525 __isl_take isl_map *context);
526
527__isl_give isl_basic_set *isl_basic_set_plain_affine_hull(
528 __isl_take isl_basic_set *bset);
529__isl_give isl_basic_map *isl_basic_map_plain_affine_hull(
530 __isl_take isl_basic_map *bmap);
531
532isl_stat isl_basic_set_dim_residue_class(__isl_keep isl_basic_set *bset,
533 int pos, isl_int *modulo, isl_int *residue);
534isl_stat isl_set_dim_residue_class(__isl_keep isl_set *set,
535 int pos, isl_int *modulo, isl_int *residue);
536
537__isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset,
538 enum isl_dim_type type, unsigned pos, isl_int value);
539__isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap,
540 enum isl_dim_type type, unsigned pos, isl_int value);
541__isl_give isl_set *isl_set_fix(__isl_take isl_set *set,
542 enum isl_dim_type type, unsigned pos, isl_int value);
543isl_bool isl_map_plain_is_fixed(__isl_keep isl_map *map,
544 enum isl_dim_type type, unsigned pos, isl_int *val);
545
546int isl_basic_map_output_defining_equality(__isl_keep isl_basic_map *bmap,
547 int pos, int *div, int *ineq);
548
549__isl_give isl_basic_map *isl_basic_map_reduce_coefficients(
550 __isl_take isl_basic_map *bmap);
551
552__isl_give isl_basic_map *isl_basic_map_shift_div(
553 __isl_take isl_basic_map *bmap, int div, int pos, isl_int shift);
554
555int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset,
556 isl_int max, isl_int *count);
557int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count);
558
559isl_bool isl_map_space_tuple_is_equal(__isl_keep isl_map *map,
560 enum isl_dim_type type1, __isl_keep isl_space *space,
561 enum isl_dim_type type2);
562isl_bool isl_map_tuple_is_equal(__isl_keep isl_map *map1,
563 enum isl_dim_type type1, __isl_keep isl_map *map2,
564 enum isl_dim_type type2);
565isl_bool isl_map_has_space(__isl_keep isl_map *map,
566 __isl_keep isl_space *space);
567isl_bool isl_map_has_space_tuples(__isl_keep isl_map *map,
568 __isl_keep isl_space *space);
569
570isl_bool isl_basic_map_is_transformation(__isl_keep isl_basic_map *bmap);
571isl_stat isl_map_check_transformation(__isl_keep isl_map *map);
572isl_stat isl_basic_set_check_equal_space(__isl_keep isl_basic_set *bset1,
573 __isl_keep isl_basic_set *bset2);
574isl_stat isl_basic_map_check_equal_space(__isl_keep isl_basic_map *bmap1,
575 __isl_keep isl_basic_map *bmap2);
576isl_stat isl_set_basic_set_check_equal_space(__isl_keep isl_set *set,
577 __isl_keep isl_basic_set *bset);
578isl_stat isl_map_basic_map_check_equal_space(__isl_keep isl_map *map,
579 __isl_keep isl_basic_map *bmap);
580isl_stat isl_map_check_equal_space(__isl_keep isl_map *map1,
581 __isl_keep isl_map *map2);
582
583isl_bool isl_basic_map_applies_range(__isl_keep isl_basic_map *bmap1,
584 __isl_keep isl_basic_map *bmap2);
585
586__isl_give isl_mat *isl_basic_set_extract_equalities(
587 __isl_keep isl_basic_set *bset);
588
589isl_bool isl_basic_map_equal_div_expr_part(__isl_keep isl_basic_map *bmap1,
590 int pos1, __isl_keep isl_basic_map *bmap2, int pos2,
591 unsigned first, unsigned n);
592isl_bool isl_basic_map_equal_div_expr_except_constant(
593 __isl_keep isl_basic_map *bmap1, int pos1,
594 __isl_keep isl_basic_map *bmap2, int pos2);
595__isl_give isl_basic_map *isl_basic_map_set_div_expr_constant_num_si_inplace(
596 __isl_take isl_basic_map *bmap, int div, int value);
597
598#endif
599

source code of polly/lib/External/isl/isl_map_private.h