Coverage Report

Created: 2018-08-19 14:04

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/polly/lib/External/isl/isl_map_private.h
Line
Count
Source
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
1.49M
#define isl_basic_set isl_basic_map
14
1.58k
#define isl_maybe_isl_basic_set isl_maybe_isl_basic_map
15
456k
#define isl_set   isl_map
16
3.96k
#define isl_basic_set_list  isl_basic_map_list
17
5.16k
#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
 */
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;
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
 */
96
struct isl_map {
97
  int ref;
98
690k
#define ISL_MAP_DISJOINT    (1 << 0)
99
#define ISL_MAP_NORMALIZED    (1 << 1)
100
3.42k
#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(__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);
133
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);
148
149
__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set,
150
  __isl_take isl_basic_set *bset);
151
152
__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
153
  __isl_take isl_basic_map *bmap);
154
__isl_give isl_map *isl_map_dup(__isl_keep isl_map *map);
155
156
__isl_give isl_basic_set *isl_basic_set_from_underlying_set(
157
  __isl_take isl_basic_set *bset, __isl_take isl_basic_set *like);
158
159
__isl_give isl_map *isl_map_realign(__isl_take isl_map *map,
160
  __isl_take isl_reordering *r);
161
__isl_give isl_set *isl_set_realign(__isl_take isl_set *set,
162
  __isl_take isl_reordering *r);
163
164
__isl_give isl_basic_map *isl_basic_map_reset(__isl_take isl_basic_map *bmap,
165
  enum isl_dim_type type);
166
__isl_give isl_map *isl_map_reset(__isl_take isl_map *map,
167
  enum isl_dim_type type);
168
169
__isl_keep isl_space *isl_basic_map_peek_space(
170
  __isl_keep const isl_basic_map *bmap);
171
__isl_keep isl_space *isl_basic_set_peek_space(__isl_keep isl_basic_set *bset);
172
__isl_keep isl_space *isl_map_peek_space(__isl_keep const isl_map *map);
173
174
__isl_give isl_basic_set *isl_basic_set_reset_space(
175
  __isl_take isl_basic_set *bset, __isl_take isl_space *dim);
176
__isl_give isl_basic_map *isl_basic_map_reset_space(
177
  __isl_take isl_basic_map *bmap, __isl_take isl_space *dim);
178
__isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map,
179
  __isl_take isl_space *dim);
180
__isl_give isl_map *isl_map_reset_equal_dim_space(__isl_take isl_map *map,
181
  __isl_take isl_space *space);
182
183
unsigned isl_basic_map_offset(struct isl_basic_map *bmap,
184
          enum isl_dim_type type);
185
unsigned isl_basic_set_offset(__isl_keep isl_basic_set *bset,
186
          enum isl_dim_type type);
187
188
isl_bool isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap);
189
int isl_map_may_be_set(__isl_keep isl_map *map);
190
isl_bool isl_map_compatible_domain(__isl_keep isl_map *map,
191
  __isl_keep 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
isl_bool isl_basic_map_compatible_range(__isl_keep isl_basic_map *bmap,
195
  __isl_keep isl_basic_set *bset);
196
197
__isl_give isl_basic_map *isl_basic_map_extend_space(
198
  __isl_take isl_basic_map *base, __isl_take isl_space *dim,
199
  unsigned extra, unsigned n_eq, unsigned n_ineq);
200
__isl_give isl_basic_set *isl_basic_set_extend_space(
201
  __isl_take isl_basic_set *base,
202
    __isl_take isl_space *dim, unsigned extra,
203
    unsigned n_eq, unsigned n_ineq);
204
struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1,
205
    struct isl_basic_set *bset2, unsigned pos);
206
207
__isl_give isl_map *isl_map_grow(__isl_take isl_map *map, int n);
208
struct isl_set *isl_set_grow(struct isl_set *set, int n);
209
210
isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset,
211
  __isl_keep isl_vec *vec);
212
isl_bool isl_basic_map_contains(__isl_keep isl_basic_map *bmap,
213
  __isl_keep isl_vec *vec);
214
215
__isl_give isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *dim,
216
    unsigned extra, unsigned n_eq, unsigned n_ineq);
217
__isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *dim, int n,
218
  unsigned flags);
219
__isl_give isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *dim,
220
    unsigned extra, unsigned n_eq, unsigned n_ineq);
221
__isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *dim, int n,
222
  unsigned flags);
223
224
int isl_basic_map_alloc_equality(struct isl_basic_map *bmap);
225
int isl_basic_set_alloc_equality(struct isl_basic_set *bset);
226
int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n);
227
int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n);
228
int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n);
229
int isl_basic_set_alloc_inequality(__isl_keep isl_basic_set *bset);
230
int isl_basic_map_alloc_inequality(__isl_keep isl_basic_map *bmap);
231
int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n);
232
int isl_basic_map_alloc_div(struct isl_basic_map *bmap);
233
__isl_give isl_basic_map *isl_basic_map_insert_div(
234
  __isl_take isl_basic_map *bmap, int pos, __isl_keep isl_vec *div);
235
int isl_basic_set_alloc_div(struct isl_basic_set *bset);
236
isl_stat isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n);
237
__isl_give isl_basic_map *isl_basic_map_drop_div(
238
  __isl_take isl_basic_map *bmap, unsigned div);
239
void isl_basic_map_inequality_to_equality(
240
    struct isl_basic_map *bmap, unsigned pos);
241
int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos);
242
int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos);
243
int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos);
244
__isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset,
245
  isl_int *eq);
246
__isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap,
247
  isl_int *eq);
248
__isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset,
249
  isl_int *ineq);
250
__isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap,
251
  isl_int *ineq);
252
253
__isl_give isl_basic_set *isl_basic_set_tighten_outward(
254
  __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec);
255
256
int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos);
257
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
263
uint32_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
struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset);
273
void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b);
274
void isl_basic_set_swap_div(struct isl_basic_set *bset, int a, int b);
275
__isl_give isl_basic_map *isl_basic_map_order_divs(
276
  __isl_take isl_basic_map *bmap);
277
__isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map);
278
__isl_give isl_basic_map *isl_basic_map_align_divs(
279
  __isl_take isl_basic_map *dst, __isl_keep isl_basic_map *src);
280
__isl_give isl_map *isl_map_align_divs_to_basic_map_list(
281
  __isl_take isl_map *map, __isl_keep isl_basic_map_list *list);
282
__isl_give isl_basic_map_list *isl_basic_map_list_align_divs_to_basic_map(
283
  __isl_take isl_basic_map_list *list, __isl_keep isl_basic_map *bmap);
284
__isl_give isl_map *isl_map_align_divs_internal(__isl_take isl_map *map);
285
__isl_give isl_basic_set *isl_basic_set_sort_divs(
286
  __isl_take isl_basic_set *bset);
287
__isl_give isl_basic_map *isl_basic_map_sort_divs(
288
  __isl_take isl_basic_map *bmap);
289
__isl_give isl_map *isl_map_sort_divs(__isl_take isl_map *map);
290
__isl_give isl_basic_map *isl_basic_map_gauss(__isl_take isl_basic_map *bmap,
291
  int *progress);
292
__isl_give isl_basic_set *isl_basic_set_gauss(
293
  __isl_take isl_basic_set *bset, int *progress);
294
int isl_basic_map_constraint_cmp(__isl_keep isl_basic_map *bmap,
295
  isl_int *c1, isl_int *c2);
296
__isl_give isl_basic_map *isl_basic_map_sort_constraints(
297
  __isl_take isl_basic_map *bmap);
298
__isl_give isl_basic_set *isl_basic_set_sort_constraints(
299
  __isl_take isl_basic_set *bset);
300
int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1,
301
  __isl_keep isl_basic_map *bmap2);
302
isl_bool isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1,
303
  __isl_keep isl_basic_map *bmap2);
304
__isl_give isl_basic_map *isl_basic_map_normalize_constraints(
305
  __isl_take isl_basic_map *bmap);
306
__isl_give isl_basic_set *isl_basic_set_normalize_constraints(
307
  __isl_take isl_basic_set *bset);
308
__isl_give isl_basic_map *isl_basic_map_implicit_equalities(
309
  __isl_take isl_basic_map *bmap);
310
__isl_give isl_basic_set *isl_basic_map_underlying_set(
311
  __isl_take isl_basic_map *bmap);
312
__isl_give isl_basic_set *isl_basic_set_underlying_set(
313
    __isl_take isl_basic_set *bset);
314
__isl_give isl_basic_set_list *isl_basic_map_list_underlying_set(
315
  __isl_take isl_basic_map_list *list);
316
__isl_give isl_set *isl_map_underlying_set(__isl_take isl_map *map);
317
__isl_give isl_basic_map *isl_basic_map_overlying_set(
318
  __isl_take isl_basic_set *bset, __isl_take isl_basic_map *like);
319
__isl_give isl_basic_map *isl_basic_map_drop_constraint_involving_unknown_divs(
320
  __isl_take isl_basic_map *bmap);
321
__isl_give isl_map *isl_map_drop_constraint_involving_unknown_divs(
322
  __isl_take isl_map *map);
323
__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving(
324
  __isl_take isl_basic_set *bset, unsigned first, unsigned n);
325
__isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset,
326
  enum isl_dim_type type, unsigned first, unsigned n);
327
__isl_give isl_basic_map *isl_basic_map_drop(__isl_take isl_basic_map *bmap,
328
  enum isl_dim_type type, unsigned first, unsigned n);
329
__isl_give isl_set *isl_set_drop(__isl_take isl_set *set,
330
  enum isl_dim_type type, unsigned first, unsigned n);
331
__isl_give isl_basic_set *isl_basic_set_drop_dims(
332
  __isl_take isl_basic_set *bset, unsigned first, unsigned n);
333
__isl_give isl_map *isl_map_drop(__isl_take isl_map *map,
334
  enum isl_dim_type type, unsigned first, unsigned n);
335
__isl_give isl_basic_map *isl_basic_map_drop_unrelated_constraints(
336
  __isl_take isl_basic_map *bmap, __isl_take int *group);
337
338
__isl_give isl_basic_map *isl_basic_map_remove_duplicate_constraints(
339
  __isl_take isl_basic_map *bmap, int *progress, int detect_divs);
340
__isl_give isl_basic_map *isl_basic_map_detect_inequality_pairs(
341
  __isl_take isl_basic_map *bmap, int *progress);
342
343
__isl_give isl_map *isl_map_remove_empty_parts(__isl_take isl_map *map);
344
struct isl_set *isl_set_remove_empty_parts(struct isl_set *set);
345
__isl_give isl_map *isl_map_remove_obvious_duplicates(__isl_take isl_map *map);
346
347
struct isl_set *isl_set_normalize(struct isl_set *set);
348
349
struct isl_set *isl_set_drop_vars(
350
    struct isl_set *set, unsigned first, unsigned n);
351
352
__isl_give isl_basic_map *isl_basic_map_eliminate_vars(
353
  __isl_take isl_basic_map *bmap, unsigned pos, unsigned n);
354
struct isl_basic_set *isl_basic_set_eliminate_vars(
355
  struct isl_basic_set *bset, unsigned pos, unsigned n);
356
357
__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map,
358
  enum isl_dim_type type, unsigned first, unsigned n);
359
__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set,
360
  enum isl_dim_type type, unsigned first, unsigned n);
361
__isl_give isl_map *isl_map_project_onto(__isl_take isl_map *map,
362
  enum isl_dim_type type, unsigned first, unsigned n);
363
364
int isl_basic_map_add_div_constraint(__isl_keep isl_basic_map *bmap,
365
  unsigned div, int sign);
366
int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div);
367
__isl_give isl_basic_map *isl_basic_map_add_known_div_constraints(
368
  __isl_take isl_basic_map *bmap);
369
__isl_give isl_basic_map *isl_basic_map_drop_redundant_divs(
370
  __isl_take isl_basic_map *bmap);
371
372
__isl_give isl_basic_set *isl_basic_set_recession_cone(
373
  __isl_take isl_basic_set *bset);
374
__isl_give isl_basic_set *isl_basic_set_lineality_space(
375
  __isl_take isl_basic_set *bset);
376
__isl_give isl_basic_set *isl_set_combined_lineality_space(
377
  __isl_take isl_set *set);
378
379
__isl_give isl_basic_set *isl_basic_set_set_integral(
380
  __isl_take isl_basic_set *bset);
381
__isl_give isl_basic_set *isl_basic_set_set_rational(
382
  __isl_take isl_basic_set *bset);
383
__isl_give isl_set *isl_set_set_rational(__isl_take isl_set *set);
384
__isl_give isl_basic_map *isl_basic_map_set_rational(
385
  __isl_take isl_basic_map *bmap);
386
__isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map);
387
388
isl_bool isl_map_is_rational(__isl_keep isl_map *map);
389
isl_bool isl_set_is_rational(__isl_keep isl_set *set);
390
391
isl_bool isl_map_has_rational(__isl_keep isl_map *map);
392
isl_bool isl_set_has_rational(__isl_keep isl_set *set);
393
394
__isl_give isl_basic_map *isl_basic_map_from_multi_aff2(
395
  __isl_take isl_multi_aff *maff, int rational);
396
__isl_give isl_map *isl_map_from_multi_aff_internal(
397
  __isl_take isl_multi_aff *ma);
398
__isl_give isl_map *isl_map_from_pw_aff_internal(__isl_take isl_pw_aff *pa);
399
400
struct isl_mat;
401
402
__isl_give isl_basic_set *isl_basic_set_preimage(
403
  __isl_take isl_basic_set *bset, __isl_take isl_mat *mat);
404
__isl_give isl_set *isl_set_preimage(
405
  __isl_take isl_set *set, __isl_take isl_mat *mat);
406
407
__isl_give isl_basic_map *isl_basic_map_transform_dims(
408
  __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first,
409
  __isl_take isl_mat *trans);
410
__isl_give isl_basic_set *isl_basic_set_transform_dims(
411
  __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
412
  __isl_take isl_mat *trans);
413
414
isl_int *isl_set_wrap_facet(__isl_keep isl_set *set,
415
  isl_int *facet, isl_int *ridge);
416
417
isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
418
  __isl_keep isl_point *point);
419
isl_bool isl_set_contains_point(__isl_keep isl_set *set,
420
  __isl_keep isl_point *point);
421
422
isl_stat isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset,
423
  unsigned first, unsigned n, int *signs);
424
isl_stat isl_set_foreach_orthant(__isl_keep isl_set *set,
425
  isl_stat (*fn)(__isl_take isl_set *orthant, int *signs, void *user),
426
  void *user);
427
428
isl_bool isl_basic_set_eq_is_stride(__isl_keep isl_basic_set *bset, int i);
429
430
int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap,
431
  unsigned pos, isl_int *div);
432
int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset,
433
  unsigned pos, isl_int *div);
434
isl_bool isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap,
435
  isl_int *constraint, unsigned div);
436
isl_bool isl_basic_set_is_div_constraint(__isl_keep isl_basic_set *bset,
437
  isl_int *constraint, unsigned div);
438
439
__isl_give isl_basic_set *isl_basic_set_from_local_space(
440
  __isl_take isl_local_space *ls);
441
__isl_give isl_basic_map *isl_basic_map_from_local_space(
442
  __isl_take isl_local_space *ls);
443
__isl_give isl_basic_set *isl_basic_set_expand_divs(
444
  __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp);
445
__isl_give isl_basic_map *isl_basic_map_expand_divs(
446
  __isl_take isl_basic_set *bmap, __isl_take isl_mat *div, int *exp);
447
448
int isl_basic_set_n_equality(__isl_keep isl_basic_set *bset);
449
int isl_basic_map_n_equality(__isl_keep isl_basic_map *bmap);
450
int isl_basic_set_n_inequality(__isl_keep isl_basic_set *bset);
451
int isl_basic_map_n_inequality(__isl_keep isl_basic_map *bmap);
452
453
__isl_give isl_basic_map *isl_basic_map_mark_div_unknown(
454
  __isl_take isl_basic_map *bmap, int div);
455
isl_bool isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map *bmap,
456
  int div);
457
isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div);
458
int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set *bset);
459
int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map *bmap);
460
isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap);
461
isl_bool isl_map_divs_known(__isl_keep isl_map *map);
462
__isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset);
463
__isl_give isl_mat *isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap);
464
465
__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map,
466
  __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap));
467
468
isl_stat isl_map_check_named_params(__isl_keep isl_map *map);
469
470
isl_bool isl_map_has_equal_params(__isl_keep isl_map *map1,
471
  __isl_keep isl_map *map2);
472
isl_bool isl_basic_set_space_has_equal_params(__isl_keep isl_basic_set *bset,
473
  __isl_keep isl_space *space);
474
isl_bool isl_set_space_has_equal_params(__isl_keep isl_set *set,
475
  __isl_keep isl_space *space);
476
isl_bool isl_map_space_has_equal_params(__isl_keep isl_map *map,
477
  __isl_keep isl_space *space);
478
479
__isl_give isl_map *isl_map_align_params_map_map_and(
480
  __isl_take isl_map *map1, __isl_take isl_map *map2,
481
  __isl_give isl_map *(*fn)(__isl_take isl_map *map1,
482
            __isl_take isl_map *map2));
483
isl_bool isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1,
484
  __isl_keep isl_map *map2,
485
  isl_bool (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2));
486
487
__isl_give isl_set *isl_set_substitute(__isl_take isl_set *set,
488
  enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs);
489
490
__isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set,
491
  __isl_take isl_basic_set *context);
492
493
isl_bool isl_map_compatible_range(__isl_keep isl_map *map,
494
  __isl_keep isl_set *set);
495
496
isl_bool isl_basic_map_plain_is_non_empty(__isl_keep isl_basic_map *bmap);
497
isl_bool isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap);
498
499
isl_bool isl_map_is_set(__isl_keep isl_map *map);
500
isl_bool isl_map_is_params(__isl_keep isl_map *map);
501
502
isl_bool isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset,
503
  unsigned dim, isl_int *val);
504
505
__isl_give isl_set *isl_set_plain_gist_basic_set(__isl_take isl_set *set,
506
  __isl_take isl_basic_set *context);
507
__isl_give isl_map *isl_map_plain_gist_basic_map(__isl_take isl_map *map,
508
  __isl_take isl_basic_map *context);
509
__isl_give isl_map *isl_map_plain_gist(__isl_take isl_map *map,
510
  __isl_take isl_map *context);
511
512
__isl_give isl_basic_set *isl_basic_set_plain_affine_hull(
513
  __isl_take isl_basic_set *bset);
514
__isl_give isl_basic_map *isl_basic_map_plain_affine_hull(
515
  __isl_take isl_basic_map *bmap);
516
517
isl_stat isl_basic_set_dim_residue_class(__isl_keep isl_basic_set *bset,
518
  int pos, isl_int *modulo, isl_int *residue);
519
isl_stat isl_set_dim_residue_class(__isl_keep isl_set *set,
520
  int pos, isl_int *modulo, isl_int *residue);
521
522
__isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset,
523
  enum isl_dim_type type, unsigned pos, isl_int value);
524
__isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap,
525
  enum isl_dim_type type, unsigned pos, isl_int value);
526
__isl_give isl_set *isl_set_fix(__isl_take isl_set *set,
527
  enum isl_dim_type type, unsigned pos, isl_int value);
528
isl_bool isl_map_plain_is_fixed(__isl_keep isl_map *map,
529
  enum isl_dim_type type, unsigned pos, isl_int *val);
530
531
int isl_basic_map_output_defining_equality(__isl_keep isl_basic_map *bmap,
532
  int pos, int *div, int *ineq);
533
534
__isl_give isl_basic_map *isl_basic_map_reduce_coefficients(
535
  __isl_take isl_basic_map *bmap);
536
537
__isl_give isl_basic_map *isl_basic_map_shift_div(
538
  __isl_take isl_basic_map *bmap, int div, int pos, isl_int shift);
539
540
int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset,
541
  isl_int max, isl_int *count);
542
int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count);
543
544
__isl_give isl_mat *isl_basic_set_extract_equalities(
545
  __isl_keep isl_basic_set *bset);
546
547
isl_bool isl_basic_map_equal_div_expr_part(__isl_keep isl_basic_map *bmap1,
548
  int pos1, __isl_keep isl_basic_map *bmap2, int pos2,
549
  unsigned first, unsigned n);
550
isl_bool isl_basic_map_equal_div_expr_except_constant(
551
  __isl_keep isl_basic_map *bmap1, int pos1,
552
  __isl_keep isl_basic_map *bmap2, int pos2);
553
__isl_give isl_basic_map *isl_basic_map_set_div_expr_constant_num_si_inplace(
554
  __isl_take isl_basic_map *bmap, int div, int value);
555
556
#endif