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
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
21 #include <isl_reordering.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
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
{
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)
74 struct isl_vec
*sample
;
77 struct isl_blk block2
;
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.
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)
103 isl_basic_map
*cached_simple_hull
[2];
112 struct isl_basic_map
*p
[1];
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
);
165 __isl_give isl_set
*isl_set_from_underlying_set(
166 __isl_take isl_set
*set
, __isl_take isl_basic_set
*like
);
167 __isl_give isl_set
*isl_set_to_underlying_set(__isl_take isl_set
*set
);
169 __isl_give isl_map
*isl_map_realign(__isl_take isl_map
*map
,
170 __isl_take isl_reordering
*r
);
171 __isl_give isl_set
*isl_set_realign(__isl_take isl_set
*set
,
172 __isl_take isl_reordering
*r
);
174 __isl_give isl_map
*isl_map_reset(__isl_take isl_map
*map
,
175 enum isl_dim_type type
);
177 __isl_give isl_basic_set
*isl_basic_set_reset_space(
178 __isl_take isl_basic_set
*bset
, __isl_take isl_space
*dim
);
179 __isl_give isl_basic_map
*isl_basic_map_reset_space(
180 __isl_take isl_basic_map
*bmap
, __isl_take isl_space
*dim
);
181 __isl_give isl_map
*isl_map_reset_space(__isl_take isl_map
*map
,
182 __isl_take isl_space
*dim
);
184 unsigned isl_basic_map_offset(struct isl_basic_map
*bmap
,
185 enum isl_dim_type type
);
186 unsigned isl_basic_set_offset(struct isl_basic_set
*bset
,
187 enum isl_dim_type type
);
189 int isl_basic_map_may_be_set(__isl_keep isl_basic_map
*bmap
);
190 int isl_map_may_be_set(__isl_keep isl_map
*map
);
191 int isl_map_compatible_domain(struct isl_map
*map
, struct isl_set
*set
);
192 isl_bool
isl_basic_map_compatible_domain(__isl_keep isl_basic_map
*bmap
,
193 __isl_keep isl_basic_set
*bset
);
194 int isl_basic_map_compatible_range(struct isl_basic_map
*bmap
,
195 struct isl_basic_set
*bset
);
197 struct isl_basic_map
*isl_basic_map_extend_space(struct isl_basic_map
*base
,
198 __isl_take isl_space
*dim
, unsigned extra
,
199 unsigned n_eq
, unsigned n_ineq
);
200 struct isl_basic_set
*isl_basic_set_extend_space(struct isl_basic_set
*base
,
201 __isl_take isl_space
*dim
, unsigned extra
,
202 unsigned n_eq
, unsigned n_ineq
);
203 struct isl_basic_set
*isl_basic_set_add_constraints(struct isl_basic_set
*bset1
,
204 struct isl_basic_set
*bset2
, unsigned pos
);
206 struct isl_map
*isl_map_grow(struct isl_map
*map
, int n
);
207 struct isl_set
*isl_set_grow(struct isl_set
*set
, int n
);
209 isl_bool
isl_basic_set_contains(__isl_keep isl_basic_set
*bset
,
210 __isl_keep isl_vec
*vec
);
211 isl_bool
isl_basic_map_contains(__isl_keep isl_basic_map
*bmap
,
212 __isl_keep isl_vec
*vec
);
214 __isl_give isl_basic_set
*isl_basic_set_alloc_space(__isl_take isl_space
*dim
,
215 unsigned extra
, unsigned n_eq
, unsigned n_ineq
);
216 __isl_give isl_set
*isl_set_alloc_space(__isl_take isl_space
*dim
, int n
,
218 __isl_give isl_basic_map
*isl_basic_map_alloc_space(__isl_take isl_space
*dim
,
219 unsigned extra
, unsigned n_eq
, unsigned n_ineq
);
220 __isl_give isl_map
*isl_map_alloc_space(__isl_take isl_space
*dim
, int n
,
223 unsigned isl_basic_map_total_dim(const struct isl_basic_map
*bmap
);
225 int isl_basic_map_alloc_equality(struct isl_basic_map
*bmap
);
226 int isl_basic_set_alloc_equality(struct isl_basic_set
*bset
);
227 int isl_basic_set_free_inequality(struct isl_basic_set
*bset
, unsigned n
);
228 int isl_basic_map_free_equality(struct isl_basic_map
*bmap
, unsigned n
);
229 int isl_basic_set_free_equality(struct isl_basic_set
*bset
, unsigned n
);
230 int isl_basic_set_alloc_inequality(struct isl_basic_set
*bset
);
231 int isl_basic_map_alloc_inequality(struct isl_basic_map
*bmap
);
232 int isl_basic_map_free_inequality(struct isl_basic_map
*bmap
, unsigned n
);
233 int isl_basic_map_alloc_div(struct isl_basic_map
*bmap
);
234 __isl_give isl_basic_map
*isl_basic_map_insert_div(
235 __isl_take isl_basic_map
*bmap
, int pos
, __isl_keep isl_vec
*div
);
236 int isl_basic_set_alloc_div(struct isl_basic_set
*bset
);
237 int isl_basic_map_free_div(struct isl_basic_map
*bmap
, unsigned n
);
238 int isl_basic_set_free_div(struct isl_basic_set
*bset
, 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_equality(struct isl_basic_set
*bset
, unsigned pos
);
245 int isl_basic_set_drop_inequality(struct isl_basic_set
*bset
, unsigned pos
);
246 int isl_basic_map_drop_inequality(struct isl_basic_map
*bmap
, unsigned pos
);
247 __isl_give isl_basic_set
*isl_basic_set_add_eq(__isl_take isl_basic_set
*bset
,
249 __isl_give isl_basic_map
*isl_basic_map_add_eq(__isl_take isl_basic_map
*bmap
,
251 __isl_give isl_basic_set
*isl_basic_set_add_ineq(__isl_take isl_basic_set
*bset
,
253 __isl_give isl_basic_map
*isl_basic_map_add_ineq(__isl_take isl_basic_map
*bmap
,
256 int isl_inequality_negate(struct isl_basic_map
*bmap
, unsigned pos
);
258 struct isl_basic_set
*isl_basic_set_cow(struct isl_basic_set
*bset
);
259 struct isl_basic_map
*isl_basic_map_cow(struct isl_basic_map
*bmap
);
260 struct isl_set
*isl_set_cow(struct isl_set
*set
);
261 struct isl_map
*isl_map_cow(struct isl_map
*map
);
263 uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map
*bmap
);
265 struct isl_basic_map
*isl_basic_map_set_to_empty(struct isl_basic_map
*bmap
);
266 struct isl_basic_set
*isl_basic_set_set_to_empty(struct isl_basic_set
*bset
);
267 struct isl_basic_set
*isl_basic_set_order_divs(struct isl_basic_set
*bset
);
268 void isl_basic_map_swap_div(struct isl_basic_map
*bmap
, int a
, int b
);
269 void isl_basic_set_swap_div(struct isl_basic_set
*bset
, int a
, int b
);
270 struct isl_basic_map
*isl_basic_map_order_divs(struct isl_basic_map
*bmap
);
271 __isl_give isl_map
*isl_map_order_divs(__isl_take isl_map
*map
);
272 struct isl_basic_map
*isl_basic_map_align_divs(
273 struct isl_basic_map
*dst
, struct isl_basic_map
*src
);
274 struct isl_basic_set
*isl_basic_set_align_divs(
275 struct isl_basic_set
*dst
, struct isl_basic_set
*src
);
276 __isl_give isl_map
*isl_map_align_divs_to_basic_map_list(
277 __isl_take isl_map
*map
, __isl_keep isl_basic_map_list
*list
);
278 __isl_give isl_basic_map_list
*isl_basic_map_list_align_divs_to_basic_map(
279 __isl_take isl_basic_map_list
*list
, __isl_keep isl_basic_map
*bmap
);
280 __isl_give isl_basic_set
*isl_basic_set_sort_divs(
281 __isl_take isl_basic_set
*bset
);
282 __isl_give isl_basic_map
*isl_basic_map_sort_divs(
283 __isl_take isl_basic_map
*bmap
);
284 __isl_give isl_map
*isl_map_sort_divs(__isl_take isl_map
*map
);
285 struct isl_basic_map
*isl_basic_map_gauss(
286 struct isl_basic_map
*bmap
, int *progress
);
287 struct isl_basic_set
*isl_basic_set_gauss(
288 struct isl_basic_set
*bset
, int *progress
);
289 int isl_basic_map_constraint_cmp(__isl_keep isl_basic_map
*bmap
,
290 isl_int
*c1
, isl_int
*c2
);
291 __isl_give isl_basic_map
*isl_basic_map_sort_constraints(
292 __isl_take isl_basic_map
*bmap
);
293 __isl_give isl_basic_set
*isl_basic_set_sort_constraints(
294 __isl_take isl_basic_set
*bset
);
295 int isl_basic_map_plain_cmp(const __isl_keep isl_basic_map
*bmap1
,
296 const __isl_keep isl_basic_map
*bmap2
);
297 isl_bool
isl_basic_map_plain_is_equal(__isl_keep isl_basic_map
*bmap1
,
298 __isl_keep isl_basic_map
*bmap2
);
299 struct isl_basic_map
*isl_basic_map_normalize_constraints(
300 struct isl_basic_map
*bmap
);
301 struct isl_basic_set
*isl_basic_set_normalize_constraints(
302 struct isl_basic_set
*bset
);
303 struct isl_basic_map
*isl_basic_map_implicit_equalities(
304 struct isl_basic_map
*bmap
);
305 struct isl_basic_set
*isl_basic_map_underlying_set(struct isl_basic_map
*bmap
);
306 __isl_give isl_basic_set
*isl_basic_set_underlying_set(
307 __isl_take isl_basic_set
*bset
);
308 __isl_give isl_basic_set_list
*isl_basic_map_list_underlying_set(
309 __isl_take isl_basic_map_list
*list
);
310 struct isl_set
*isl_map_underlying_set(struct isl_map
*map
);
311 struct isl_basic_map
*isl_basic_map_overlying_set(struct isl_basic_set
*bset
,
312 struct isl_basic_map
*like
);
313 __isl_give isl_basic_map
*isl_basic_map_drop_constraint_involving_unknown_divs(
314 __isl_take isl_basic_map
*bmap
);
315 __isl_give isl_map
*isl_map_drop_constraint_involving_unknown_divs(
316 __isl_take isl_map
*map
);
317 __isl_give isl_basic_set
*isl_basic_set_drop_constraints_involving(
318 __isl_take isl_basic_set
*bset
, unsigned first
, unsigned n
);
319 __isl_give isl_basic_set
*isl_basic_set_drop(__isl_take isl_basic_set
*bset
,
320 enum isl_dim_type type
, unsigned first
, unsigned n
);
321 struct isl_basic_map
*isl_basic_map_drop(struct isl_basic_map
*bmap
,
322 enum isl_dim_type type
, unsigned first
, unsigned n
);
323 struct isl_set
*isl_set_drop(struct isl_set
*set
,
324 enum isl_dim_type type
, unsigned first
, unsigned n
);
325 struct isl_basic_set
*isl_basic_set_drop_dims(
326 struct isl_basic_set
*bset
, unsigned first
, unsigned n
);
327 struct isl_set
*isl_set_drop_dims(
328 struct isl_set
*set
, unsigned first
, unsigned n
);
329 struct isl_map
*isl_map_drop_inputs(
330 struct isl_map
*map
, unsigned first
, unsigned n
);
331 struct isl_map
*isl_map_drop(struct isl_map
*map
,
332 enum isl_dim_type type
, unsigned first
, unsigned n
);
333 __isl_give isl_basic_map
*isl_basic_map_drop_unrelated_constraints(
334 __isl_take isl_basic_map
*bmap
, __isl_take
int *group
);
336 __isl_give isl_basic_map
*isl_basic_map_remove_duplicate_constraints(
337 __isl_take isl_basic_map
*bmap
, int *progress
, int detect_divs
);
338 __isl_give isl_basic_map
*isl_basic_map_detect_inequality_pairs(
339 __isl_take isl_basic_map
*bmap
, int *progress
);
341 struct isl_map
*isl_map_remove_empty_parts(struct isl_map
*map
);
342 struct isl_set
*isl_set_remove_empty_parts(struct isl_set
*set
);
343 __isl_give isl_map
*isl_map_remove_obvious_duplicates(__isl_take isl_map
*map
);
345 struct isl_set
*isl_set_normalize(struct isl_set
*set
);
347 struct isl_set
*isl_set_drop_vars(
348 struct isl_set
*set
, unsigned first
, unsigned n
);
350 struct isl_basic_map
*isl_basic_map_eliminate_vars(
351 struct isl_basic_map
*bmap
, unsigned pos
, unsigned n
);
352 struct isl_basic_set
*isl_basic_set_eliminate_vars(
353 struct isl_basic_set
*bset
, unsigned pos
, unsigned n
);
355 __isl_give isl_map
*isl_map_eliminate(__isl_take isl_map
*map
,
356 enum isl_dim_type type
, unsigned first
, unsigned n
);
357 __isl_give isl_set
*isl_set_eliminate(__isl_take isl_set
*set
,
358 enum isl_dim_type type
, unsigned first
, unsigned n
);
360 int isl_basic_set_constraint_is_redundant(struct isl_basic_set
**bset
,
361 isl_int
*c
, isl_int
*opt_n
, isl_int
*opt_d
);
363 int isl_basic_map_add_div_constraint(__isl_keep isl_basic_map
*bmap
,
364 unsigned div
, int sign
);
365 int isl_basic_map_add_div_constraints(struct isl_basic_map
*bmap
, unsigned div
);
366 __isl_give isl_basic_map
*isl_basic_map_add_known_div_constraints(
367 __isl_take isl_basic_map
*bmap
);
368 struct isl_basic_map
*isl_basic_map_drop_redundant_divs(
369 struct isl_basic_map
*bmap
);
370 struct isl_basic_set
*isl_basic_set_drop_redundant_divs(
371 struct isl_basic_set
*bset
);
373 struct isl_basic_set
*isl_basic_set_recession_cone(struct isl_basic_set
*bset
);
374 struct isl_basic_set
*isl_basic_set_lineality_space(struct isl_basic_set
*bset
);
376 struct isl_basic_set
*isl_basic_set_set_rational(struct isl_basic_set
*bset
);
377 __isl_give isl_set
*isl_set_set_rational(__isl_take isl_set
*set
);
378 __isl_give isl_basic_map
*isl_basic_map_set_rational(
379 __isl_take isl_basic_map
*bmap
);
380 __isl_give isl_map
*isl_map_set_rational(__isl_take isl_map
*map
);
382 isl_bool
isl_map_is_rational(__isl_keep isl_map
*map
);
383 isl_bool
isl_set_is_rational(__isl_keep isl_set
*set
);
385 int isl_map_has_rational(__isl_keep isl_map
*map
);
386 int isl_set_has_rational(__isl_keep isl_set
*set
);
388 __isl_give isl_basic_map
*isl_basic_map_from_multi_aff2(
389 __isl_take isl_multi_aff
*maff
, int rational
);
393 struct isl_basic_set
*isl_basic_set_preimage(struct isl_basic_set
*bset
,
394 struct isl_mat
*mat
);
395 struct isl_set
*isl_set_preimage(struct isl_set
*set
, struct isl_mat
*mat
);
397 __isl_give isl_basic_map
*isl_basic_map_transform_dims(
398 __isl_take isl_basic_map
*bmap
, enum isl_dim_type type
, unsigned first
,
399 __isl_take isl_mat
*trans
);
400 __isl_give isl_basic_set
*isl_basic_set_transform_dims(
401 __isl_take isl_basic_set
*bset
, enum isl_dim_type type
, unsigned first
,
402 __isl_take isl_mat
*trans
);
404 isl_int
*isl_set_wrap_facet(__isl_keep isl_set
*set
,
405 isl_int
*facet
, isl_int
*ridge
);
407 isl_bool
isl_basic_map_contains_point(__isl_keep isl_basic_map
*bmap
,
408 __isl_keep isl_point
*point
);
409 isl_bool
isl_set_contains_point(__isl_keep isl_set
*set
,
410 __isl_keep isl_point
*point
);
412 int isl_basic_set_vars_get_sign(__isl_keep isl_basic_set
*bset
,
413 unsigned first
, unsigned n
, int *signs
);
414 int isl_set_foreach_orthant(__isl_keep isl_set
*set
,
415 int (*fn
)(__isl_take isl_set
*orthant
, int *signs
, void *user
),
418 int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map
*bmap
,
419 unsigned pos
, isl_int
*div
);
420 int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set
*bset
,
421 unsigned pos
, isl_int
*div
);
422 int isl_basic_map_is_div_constraint(__isl_keep isl_basic_map
*bmap
,
423 isl_int
*constraint
, unsigned div
);
424 int isl_basic_set_is_div_constraint(__isl_keep isl_basic_set
*bset
,
425 isl_int
*constraint
, unsigned div
);
427 __isl_give isl_basic_set
*isl_basic_set_from_local_space(
428 __isl_take isl_local_space
*ls
);
429 __isl_give isl_basic_map
*isl_basic_map_from_local_space(
430 __isl_take isl_local_space
*ls
);
431 __isl_give isl_basic_set
*isl_basic_set_expand_divs(
432 __isl_take isl_basic_set
*bset
, __isl_take isl_mat
*div
, int *exp
);
433 __isl_give isl_basic_map
*isl_basic_map_expand_divs(
434 __isl_take isl_basic_set
*bmap
, __isl_take isl_mat
*div
, int *exp
);
436 __isl_give isl_basic_map
*isl_basic_map_mark_div_unknown(
437 __isl_take isl_basic_map
*bmap
, int div
);
438 isl_bool
isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map
*bmap
,
440 isl_bool
isl_basic_set_div_is_known(__isl_keep isl_basic_set
*bset
, int div
);
441 isl_bool
isl_basic_map_div_is_known(__isl_keep isl_basic_map
*bmap
, int div
);
442 int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set
*bset
);
443 int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map
*bmap
);
444 isl_bool
isl_basic_map_divs_known(__isl_keep isl_basic_map
*bmap
);
445 isl_bool
isl_map_divs_known(__isl_keep isl_map
*map
);
446 __isl_give isl_mat
*isl_basic_set_get_divs(__isl_keep isl_basic_set
*bset
);
447 __isl_give isl_mat
*isl_basic_map_get_divs(__isl_keep isl_basic_map
*bmap
);
449 __isl_give isl_map
*isl_map_inline_foreach_basic_map(__isl_take isl_map
*map
,
450 __isl_give isl_basic_map
*(*fn
)(__isl_take isl_basic_map
*bmap
));
452 __isl_give isl_map
*isl_map_align_params_map_map_and(
453 __isl_take isl_map
*map1
, __isl_take isl_map
*map2
,
454 __isl_give isl_map
*(*fn
)(__isl_take isl_map
*map1
,
455 __isl_take isl_map
*map2
));
456 isl_bool
isl_map_align_params_map_map_and_test(__isl_keep isl_map
*map1
,
457 __isl_keep isl_map
*map2
,
458 isl_bool (*fn
)(__isl_keep isl_map
*map1
, __isl_keep isl_map
*map2
));
460 int isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map
*bmap
, int max
,
461 int (*fn
)(__isl_take isl_basic_set
*dom
, __isl_take isl_aff_list
*list
,
464 int isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set
*bset
, int max
,
465 int (*fn
)(__isl_take isl_basic_set
*dom
, __isl_take isl_aff_list
*list
,
469 __isl_give isl_set
*isl_set_substitute(__isl_take isl_set
*set
,
470 enum isl_dim_type type
, unsigned pos
, __isl_keep isl_aff
*subs
);
472 __isl_give isl_set
*isl_set_gist_params_basic_set(__isl_take isl_set
*set
,
473 __isl_take isl_basic_set
*context
);
475 int isl_map_compatible_range(__isl_keep isl_map
*map
, __isl_keep isl_set
*set
);
477 isl_bool
isl_basic_map_plain_is_non_empty(__isl_keep isl_basic_map
*bmap
);
478 isl_bool
isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map
*bmap
);
480 int isl_map_is_set(__isl_keep isl_map
*map
);
482 int isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set
*bset
,
483 unsigned dim
, isl_int
*val
);
485 __isl_give isl_map
*isl_map_plain_gist_basic_map(__isl_take isl_map
*map
,
486 __isl_take isl_basic_map
*context
);
488 __isl_give isl_basic_set
*isl_basic_set_plain_affine_hull(
489 __isl_take isl_basic_set
*bset
);
490 __isl_give isl_basic_map
*isl_basic_map_plain_affine_hull(
491 __isl_take isl_basic_map
*bmap
);
493 int isl_basic_set_dim_residue_class(struct isl_basic_set
*bset
,
494 int pos
, isl_int
*modulo
, isl_int
*residue
);
495 int isl_set_dim_residue_class(struct isl_set
*set
,
496 int pos
, isl_int
*modulo
, isl_int
*residue
);
498 __isl_give isl_basic_set
*isl_basic_set_fix(__isl_take isl_basic_set
*bset
,
499 enum isl_dim_type type
, unsigned pos
, isl_int value
);
500 __isl_give isl_basic_map
*isl_basic_map_fix(__isl_take isl_basic_map
*bmap
,
501 enum isl_dim_type type
, unsigned pos
, isl_int value
);
502 __isl_give isl_set
*isl_set_fix(__isl_take isl_set
*set
,
503 enum isl_dim_type type
, unsigned pos
, isl_int value
);
504 int isl_map_plain_is_fixed(__isl_keep isl_map
*map
,
505 enum isl_dim_type type
, unsigned pos
, isl_int
*val
);
507 int isl_basic_map_output_defining_equality(__isl_keep isl_basic_map
*bmap
,
508 int pos
, int *div
, int *ineq
);
510 __isl_give isl_basic_map
*isl_basic_map_reduce_coefficients(
511 __isl_take isl_basic_map
*bmap
);
513 __isl_give isl_basic_map
*isl_basic_map_shift_div(
514 __isl_take isl_basic_map
*bmap
, int div
, int pos
, isl_int shift
);
516 __isl_give isl_basic_map_list
*isl_map_get_basic_map_list(
517 __isl_keep isl_map
*map
);
519 __isl_give isl_map
*isl_map_fixed_power(__isl_take isl_map
*map
, isl_int exp
);
521 int isl_basic_set_count_upto(__isl_keep isl_basic_set
*bset
,
522 isl_int max
, isl_int
*count
);
523 int isl_set_count_upto(__isl_keep isl_set
*set
, isl_int max
, isl_int
*count
);