7 #if defined(__cplusplus)
11 /* A "basic set" is a basic map with a zero-dimensional
14 struct isl_basic_set
{
16 #define ISL_BASIC_SET_FINAL (1 << 0)
17 #define ISL_BASIC_SET_EMPTY (1 << 1)
18 #define ISL_BASIC_SET_NO_IMPLICIT (1 << 2)
19 #define ISL_BASIC_SET_NO_REDUNDANT (1 << 3)
20 #define ISL_BASIC_SET_RATIONAL (1 << 4)
21 #define ISL_BASIC_SET_NORMALIZED (1 << 5)
22 #define ISL_BASIC_SET_NORMALIZED_DIVS (1 << 6)
23 #define ISL_BASIC_SET_ALL_EQUALITIES (1 << 7)
42 struct isl_vec
*sample
;
45 struct isl_blk block2
;
48 /* A "set" is a (possibly disjoint) union of basic sets.
50 * See the documentation of isl_map.
54 #define ISL_SET_DISJOINT (1 << 0)
55 #define ISL_SET_NORMALIZED (1 << 1)
65 struct isl_basic_set
*p
[0];
68 unsigned isl_basic_set_n_dim(const struct isl_basic_set
*bset
);
69 unsigned isl_basic_set_n_param(const struct isl_basic_set
*bset
);
70 unsigned isl_basic_set_total_dim(const struct isl_basic_set
*bset
);
71 unsigned isl_basic_set_dim(const struct isl_basic_set
*bset
,
72 enum isl_dim_type type
);
74 unsigned isl_set_n_dim(const struct isl_set
*set
);
75 unsigned isl_set_n_param(const struct isl_set
*set
);
76 unsigned isl_set_dim(const struct isl_set
*set
, enum isl_dim_type type
);
78 struct isl_dim
*isl_basic_set_get_dim(struct isl_basic_set
*bset
);
79 struct isl_dim
*isl_set_get_dim(struct isl_set
*set
);
81 struct isl_basic_set
*isl_basic_set_alloc(struct isl_ctx
*ctx
,
82 unsigned nparam
, unsigned dim
, unsigned extra
,
83 unsigned n_eq
, unsigned n_ineq
);
84 struct isl_basic_set
*isl_basic_set_extend(struct isl_basic_set
*base
,
85 unsigned nparam
, unsigned dim
, unsigned extra
,
86 unsigned n_eq
, unsigned n_ineq
);
87 struct isl_basic_set
*isl_basic_set_extend_constraints(
88 struct isl_basic_set
*base
, unsigned n_eq
, unsigned n_ineq
);
89 struct isl_basic_set
*isl_basic_set_finalize(struct isl_basic_set
*bset
);
90 void isl_basic_set_free(struct isl_basic_set
*bset
);
91 struct isl_basic_set
*isl_basic_set_copy(struct isl_basic_set
*bset
);
92 struct isl_basic_set
*isl_basic_set_dup(struct isl_basic_set
*bset
);
93 struct isl_basic_set
*isl_basic_set_empty(struct isl_dim
*dim
);
94 struct isl_basic_set
*isl_basic_set_empty_like(struct isl_basic_set
*bset
);
95 struct isl_basic_set
*isl_basic_set_universe(struct isl_dim
*dim
);
96 struct isl_basic_set
*isl_basic_set_universe_like(struct isl_basic_set
*bset
);
97 struct isl_basic_set
*isl_basic_set_interval(struct isl_ctx
*ctx
,
98 isl_int min
, isl_int max
);
99 void isl_basic_set_dump(struct isl_basic_set
*bset
,
100 FILE *out
, int indent
);
101 struct isl_basic_set
*isl_basic_set_swap_vars(
102 struct isl_basic_set
*bset
, unsigned n
);
103 struct isl_basic_set
*isl_basic_set_intersect(
104 struct isl_basic_set
*bset1
,
105 struct isl_basic_set
*bset2
);
106 struct isl_basic_set
*isl_basic_set_apply(
107 struct isl_basic_set
*bset
,
108 struct isl_basic_map
*bmap
);
109 struct isl_basic_set
*isl_basic_set_affine_hull(struct isl_basic_set
*bset
);
110 struct isl_basic_set
*isl_basic_set_simplify(struct isl_basic_set
*bset
);
111 struct isl_basic_set
*isl_basic_set_product(struct isl_basic_set_list
*list
);
113 #define ISL_FORMAT_POLYLIB 1
114 #define ISL_FORMAT_OMEGA 2
115 struct isl_basic_set
*isl_basic_set_read_from_file(struct isl_ctx
*ctx
,
116 FILE *input
, unsigned nparam
, unsigned input_format
);
117 struct isl_basic_set
*isl_basic_set_read_from_str(struct isl_ctx
*ctx
,
118 const char *str
, unsigned nparam
, unsigned input_format
);
119 struct isl_set
*isl_set_read_from_file(struct isl_ctx
*ctx
,
120 FILE *input
, unsigned nparam
, unsigned input_format
);
121 #define ISL_FORMAT_POLYLIB_CONSTRAINTS 3
122 void isl_basic_set_print(struct isl_basic_set
*bset
, FILE *out
, int indent
,
123 const char *prefix
, const char *suffix
, unsigned output_format
);
124 void isl_set_print(struct isl_set
*set
, FILE *out
, int indent
,
125 unsigned output_format
);
126 struct isl_basic_set
*isl_basic_set_fix_si(struct isl_basic_set
*bset
,
127 enum isl_dim_type type
, unsigned pos
, int value
);
129 struct isl_basic_set
*isl_basic_set_from_underlying_set(
130 struct isl_basic_set
*bset
, struct isl_basic_set
*like
);
131 struct isl_set
*isl_set_from_underlying_set(
132 struct isl_set
*set
, struct isl_basic_set
*like
);
133 struct isl_set
*isl_set_to_underlying_set(struct isl_set
*set
);
135 int isl_basic_set_is_equal(
136 struct isl_basic_set
*bset1
, struct isl_basic_set
*bset2
);
138 struct isl_set
*isl_basic_set_lexmin(struct isl_basic_set
*bset
);
139 struct isl_set
*isl_basic_set_union(
140 struct isl_basic_set
*bset1
,
141 struct isl_basic_set
*bset2
);
143 int isl_basic_set_compare_at(struct isl_basic_set
*bset1
,
144 struct isl_basic_set
*bset2
, int pos
);
146 int isl_basic_set_is_universe(struct isl_basic_set
*bset
);
147 int isl_basic_set_fast_is_empty(struct isl_basic_set
*bset
);
148 int isl_basic_set_is_empty(struct isl_basic_set
*bset
);
150 struct isl_set
*isl_set_alloc(struct isl_ctx
*ctx
,
151 unsigned nparam
, unsigned dim
, int n
, unsigned flags
);
152 struct isl_set
*isl_set_extend(struct isl_set
*base
,
153 unsigned nparam
, unsigned dim
);
154 struct isl_set
*isl_set_empty(struct isl_dim
*dim
);
155 struct isl_set
*isl_set_empty_like(struct isl_set
*set
);
156 struct isl_set
*isl_set_universe(struct isl_dim
*dim
);
157 struct isl_set
*isl_set_add(struct isl_set
*set
, struct isl_basic_set
*bset
);
158 struct isl_set
*isl_set_finalize(struct isl_set
*set
);
159 struct isl_set
*isl_set_copy(struct isl_set
*set
);
160 void isl_set_free(struct isl_set
*set
);
161 struct isl_set
*isl_set_dup(struct isl_set
*set
);
162 struct isl_set
*isl_set_from_basic_set(struct isl_basic_set
*bset
);
163 struct isl_basic_set
*isl_set_affine_hull(struct isl_set
*set
);
164 struct isl_basic_set
*isl_set_convex_hull(struct isl_set
*set
);
165 struct isl_basic_set
*isl_set_simple_hull(struct isl_set
*set
);
166 struct isl_basic_set
*isl_set_bounded_simple_hull(struct isl_set
*set
);
168 struct isl_set
*isl_set_union_disjoint(
169 struct isl_set
*set1
, struct isl_set
*set2
);
170 struct isl_set
*isl_set_union(struct isl_set
*set1
, struct isl_set
*set2
);
171 struct isl_set
*isl_set_product(struct isl_set
*set1
, struct isl_set
*set2
);
172 struct isl_set
*isl_set_intersect(struct isl_set
*set1
, struct isl_set
*set2
);
173 struct isl_set
*isl_set_subtract(struct isl_set
*set1
, struct isl_set
*set2
);
174 struct isl_set
*isl_set_apply(struct isl_set
*set
, struct isl_map
*map
);
175 struct isl_set
*isl_set_fix_dim_si(struct isl_set
*set
,
176 unsigned dim
, int value
);
177 struct isl_set
*isl_set_lower_bound_dim(struct isl_set
*set
,
178 unsigned dim
, isl_int value
);
179 struct isl_basic_set
*isl_basic_set_remove_dims(struct isl_basic_set
*bset
,
180 unsigned first
, unsigned n
);
181 struct isl_basic_set
*isl_basic_set_remove_divs(struct isl_basic_set
*bset
);
182 struct isl_set
*isl_set_eliminate_dims(struct isl_set
*set
,
183 unsigned first
, unsigned n
);
184 struct isl_set
*isl_set_remove_dims(struct isl_set
*set
,
185 unsigned first
, unsigned n
);
186 struct isl_set
*isl_set_remove_divs(struct isl_set
*set
);
188 void isl_set_dump(struct isl_set
*set
, FILE *out
, int indent
);
189 struct isl_set
*isl_set_swap_vars(struct isl_set
*set
, unsigned n
);
190 int isl_set_is_empty(struct isl_set
*set
);
191 int isl_set_is_subset(struct isl_set
*set1
, struct isl_set
*set2
);
192 int isl_set_is_equal(struct isl_set
*set1
, struct isl_set
*set2
);
194 struct isl_set
*isl_basic_set_compute_divs(struct isl_basic_set
*bset
);
195 struct isl_set
*isl_set_compute_divs(struct isl_set
*set
);
197 struct isl_basic_set
*isl_set_copy_basic_set(struct isl_set
*set
);
198 struct isl_set
*isl_set_drop_basic_set(struct isl_set
*set
,
199 struct isl_basic_set
*bset
);
201 int isl_set_fast_dim_is_fixed(struct isl_set
*set
, unsigned dim
, isl_int
*val
);
202 int isl_set_fast_dim_has_fixed_lower_bound(struct isl_set
*set
,
203 unsigned dim
, isl_int
*val
);
205 struct isl_basic_set
*isl_basic_set_gist(struct isl_basic_set
*bset
,
206 struct isl_basic_set
*context
);
207 struct isl_set
*isl_set_gist(struct isl_set
*set
,
208 struct isl_basic_set
*context
);
209 int isl_basic_set_dim_residue_class(struct isl_basic_set
*bset
,
210 int pos
, isl_int
*modulo
, isl_int
*residue
);
212 struct isl_set
*isl_set_coalesce(struct isl_set
*set
);
214 int isl_set_fast_is_equal(struct isl_set
*set1
, struct isl_set
*set2
);
215 int isl_set_fast_is_disjoint(struct isl_set
*set1
, struct isl_set
*set2
);
217 uint32_t isl_set_get_hash(struct isl_set
*set
);
219 int isl_set_dim_is_unique(struct isl_set
*set
, unsigned dim
);
221 #if defined(__cplusplus)