39#define STATUS_ERROR -1
40#define STATUS_REDUNDANT 1
42#define STATUS_SEPARATE 3
44#define STATUS_ADJ_EQ 5
45#define STATUS_ADJ_INEQ 6
82 for (k = 0; k < bmap_i->n_eq; ++k) {
83 for (l = 0; l < 2; ++l) {
85 eq[2 * k + l] =
status_in(bmap_i->eq[k], tab_j);
105 unsigned n_eq = bmap_i->n_eq;
111 for (k = 0; k < bmap_i->n_ineq; ++k) {
116 ineq[k] =
status_in(bmap_i->ineq[k], tab_j);
129static int any(
int *con,
unsigned len,
int status)
133 for (i = 0; i < len ; ++i)
134 if (con[i] == status)
142static int find(
int *con,
unsigned len,
int status)
146 for (i = 0; i < len ; ++i)
147 if (con[i] == status)
152static int count(
int *con,
unsigned len,
int status)
157 for (i = 0; i < len ; ++i)
158 if (con[i] == status)
163static int all(
int *con,
unsigned len,
int status)
167 for (i = 0; i < len ; ++i) {
170 if (con[i] != status)
229 return any(info->
ineq, n_ineq, status);
257 return find(info->
ineq, n_ineq, status);
281 return count(info->
ineq, n_ineq, status);
291 for (i = 0; i < 2 * info->
bmap->
n_eq; ++i) {
333 return hull ? 0 : -1;
346 for (i = 0; i <
n; ++i) {
437 for (k = 0; k < info->
bmap->
n_eq; ++k) {
487 return n_new > n_old;
516 struct isl_tab *fused_tab = NULL;
518 unsigned extra_rows = extra ? extra->n_row : 0;
519 unsigned n_eq, n_ineq;
525 return fuse(j, i, info, extra, detect_equalities, check_number);
539 for (k = 0; k < info[i].
bmap->
n_div; ++k) {
553 for (k = 0; k < extra_rows; ++k) {
560 if (detect_equalities)
566 }
else if (extra_rows > 0) {
583 info[i].
bmap = fused;
584 info[i].
tab = fused_tab;
653 if (l < info[j].bmap->n_ineq)
657 if (k < info[i].bmap->n_ineq) {
662 return fuse(i, j, info, NULL, 0, 0);
680 for (k = 0; k < bmap->
n_eq; ++k) {
696 for (k = 0; k < bmap->
n_ineq; ++k) {
775 if (n_eq_i < 0 || n_ineq_j < 0 || n_extra < 0)
794 for (k = 0; k < n_ineq_j; ++k) {
800 for (k = 0; k < n_extra; ++k) {
807 super =
contains(&info[j], info[i].tab);
811 return fuse(i, j, info, extra, 0, 0);
830 int len = T->n_col - 1;
843 for (j = 1; j < T->n_row; ++j) {
859 int *affected,
int total)
863 for (i = 0; i <
total; ++i) {
921 info->
bmap->
ineq[ineq][0], v->el[0]);
924 info->
bmap->
ineq[ineq][0], v->el[0]);
970 int n,
int *relaxed,
int l)
1000 for (i = 0; i <
total; ++i)
1005 if (
any(relaxed,
n, i))
1055 for (l = 0; l < info[i].
bmap->
n_div; ++l)
1061 for (l = 0; l <
n; ++l)
1063 info[i].
bmap->
ineq[relax[l]][0], 1);
1123 unsigned n_eq = info[i].
bmap->
n_eq;
1125 for (l = 0; l <
n; ++l)
1130 for (l = 0; l <
n; ++l)
1133 for (l = 0; l <
n; ++l) {
1141 for (l = 0; l <
n; ++l) {
1148 super =
contains(&info[j], info[i].tab);
1160 return extend(i, j,
n, relax, info);
1193 for (k = 0; k < info->
bmap->
n_eq; ++k) {
1276 for (i = 1; i < wraps->
mat->
n_col; ++i)
1297 ineq = wraps->
mat->
row[w + 1];
1350 unsigned len = 1 +
total;
1357 for (l = 0; l < bmap->
n_ineq; ++l) {
1359 if ((!add_valid && is_valid) ||
1372 if (!added && !is_valid)
1377 for (l = 0; l < bmap->
n_eq; ++l) {
1383 for (
m = 0;
m < 2; ++
m) {
1435 struct isl_tab *tab,
int keep)
1439 for (i = wraps->
mat->
n_row - 1; i >= first; --i) {
1493 if (n_eq < 0 || n_ineq < 0)
1495 for (l = 0; l < n_ineq; ++l) {
1644 "info[i].ineq should have exactly one STATUS_ADJ_INEQ",
1650 if (
total < 0 || n_eq_i < 0 || n_ineq_i < 0)
1659 if (!
bound || !set_j)
1713 int count_i, count_j;
1719 if (count_i != 1 && count_j != 1)
1725 if (!cut_i && !cut_j && count_i == 1 && count_j == 1)
1726 return fuse(i, j, info, NULL, 0, 0);
1728 if (count_i == 1 && !cut_i)
1731 if (count_j == 1 && !cut_j)
1781 if (!set_i || !set_j || !
bound)
1798 bound->el, set_j) < 0)
1804 change =
fuse(i, j, info, wraps.
mat, 0, 0);
1896 for (k = 0; k < info[i].
bmap->
n_eq; ++k) {
1897 for (l = 0; l < 2; ++l) {
1928 return fuse(i, j, info, wraps->
mat, 0, 1);
2072 for (k = 0; k < info[i].
bmap->
n_eq; ++k) {
2073 for (l = 0; l < 2; ++l) {
2083 info[i].bmap->
eq[k]);
2301 int detect_equalities = 0;
2313 detect_equalities = 1;
2326 if (!set_i || !set_j || !
bound)
2354 change =
fuse(i, j, info, wraps.
mat, detect_equalities, 0);
2373 info->
eq = info->
ineq = NULL;
2553 if (info[i].bmap->n_ineq && !info[i].
ineq)
2561 if (info[j].bmap->n_ineq && !info[j].
ineq)
2569 if (info[i].bmap->n_eq && !info[i].
eq)
2575 if (info[j].bmap->n_eq && !info[j].
eq)
2662 if (
total < 0 || n_div < 0)
2725 if (r < 0 || valid < 0)
2730 info->
bmap, div, 0);
2757 for (i = 0; i <
n; ++i) {
2761 if (known >= 0 && known)
2804 if (cst < 0 || !cst)
2809 if (cst >= 0 && cst)
2811 if (cst < 0 || !cst) {
2873 for (i = 0; i < info1->
bmap->
n_div; ++i) {
2900 if (i < info1->bmap->n_div)
2976 if (!bmap1 || !bmap2)
2978 if (bmap1->n_div != bmap2->n_div)
2981 if (bmap1->n_div == 0)
2985 if (known < 0 || !known)
2988 if (known < 0 || !known)
2994 for (i = 0; i < bmap1->n_div; ++i)
3013 for (i = n_ineq; i < bmap->n_ineq; ++i)
3072 for (i = 0; i <
n; ++i) {
3073 if (!expanded[i].cst) {
3077 info->
bmap, expanded[i].
pos - o_div);
3091 if (expanded[i].cst &&
3146 "original tableau does not correspond "
3147 "to original basic map",
goto error);
3154 for (i = 0; i <
n; ++i) {
3169 for (i = 0; i <
n; ++i) {
3171 expanded[i].
pos, &expanded[i].
val);
3172 if (expanded[i].cst < 0)
3174 if (expanded[i].cst)
3190 for (i = 0; i < n_ineq; ++i) {
3227 if (
total < 0 || n_div < 0)
3231 n = n_div - extra_var;
3235 if (extra_var && !expanded)
3240 for (j = 0; j < n_div; ++j) {
3241 if (i <
n && exp[i] == j) {
3245 expanded[k++].
pos =
pos + j;
3248 for (k = 0; k < extra_var; ++k)
3253 for (k = 0; k < extra_var; ++k)
3303 if (known < 0 || !known) {
3323 info[i].
bmap = bmap_i;
3363 info_i = i >= 0 ? &info[i] : &info_local;
3448 if (!div_i || !div_j)
3453 if ((div_i->
n_row && !exp1) || (div_j->
n_row && !exp2))
3460 if (div->n_row == div_j->
n_row)
3462 i, j, info, div, exp1);
3522 if (
equal < 0 ||
equal || empty < 0 || empty) {
3524 if (
equal < 0 || empty < 0)
3597 if (
total < 0 || n_div < 0)
3601 for (i = 0; i < n_div; ++i)
3637 if (!
hull || n_div_i < 0 || n_div_j < 0 ||
total < 0)
3648 list = isl_aff_list_alloc(ctx, n_div_i);
3651 for (i = 0; i < n_div_i; ++i) {
3662 if (n_div_i - i <= n_div_j - j)
3677 list = isl_aff_list_add(list,
aff);
3689 isl_aff_list_free(list);
3710 __isl_keep isl_aff_list *list,
int dim,
int extra_var)
3717 n = isl_aff_list_n_aff(list);
3718 if (!info->
bmap ||
n < 0)
3720 for (i = 0; i <
n; ++i) {
3724 aff = isl_aff_list_get_aff(list, i);
3738 for (j = d; j > i; --j)
3765 n = isl_aff_list_n_aff(list);
3775 for (i = 0; i <
n; ++i) {
3776 aff = isl_aff_list_get_aff(list, i);
3813 n = isl_aff_list_n_aff(list);
3817 extra_var =
n - (info->
tab->
n_var - dim);
3855 if (dim < 0 || n_div < 0)
3858 if (
add_subs(&info[j], list, dim) < 0)
3866 info[j].
bmap = bmap_j;
3903 if (n_div_i < 0 || n_div_j < 0)
3905 if (n_div_i <= n_div_j)
3907 if (info[j].bmap->n_eq == 0)
3920 if (
equal < 0 || empty < 0)
3922 if (
equal || empty) {
3930 n = isl_aff_list_n_aff(list);
3933 else if (
n < n_div_i)
3938 isl_aff_list_free(list);
3960 if (known < 0 || !known)
3963 if (known < 0 || !known)
4012 same =
same_divs(info[i].bmap, info[j].bmap);
4020 if (!preserve && info[i].bmap->n_div == info[j].
bmap->
n_div) {
4037 return a >
b ?
a :
b;
4055 int start1,
int end1,
int start2,
int end2)
4059 for (i = end1 - 1; i >= start1; --i) {
4060 if (info[i].removed)
4062 for (j =
isl_max(i + 1, start2); j < end2; ++j) {
4065 if (info[j].removed)
4067 if (info[i].removed)
4069 "basic map unexpectedly removed",
4103 for (end =
n; end > 0; end = start) {
4105 while (start >= 1 &&
4106 info[start - 1].hull_hash == info[start].hull_hash)
4137 for (i =
n - 1; i >= 0; --i) {
4138 if (info[i].removed) {
4140 if (i !=
map->n - 1)
4154 if (!info[i].modified) {
4160 info[i].
bmap = NULL;
4218 for (i = 0; i <
map->n; ++i) {
4239 for (i =
map->n - 1; i >= 0; --i)
__isl_null isl_aff * isl_aff_free(__isl_take isl_aff *aff)
__isl_give isl_aff * isl_aff_nan_on_domain(__isl_take isl_local_space *ls)
__isl_export isl_bool isl_aff_is_cst(__isl_keep isl_aff *aff)
__isl_give isl_aff * isl_aff_copy(__isl_keep isl_aff *aff)
__isl_export __isl_give isl_aff * isl_aff_floor(__isl_take isl_aff *aff)
isl_size isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type)
__isl_export __isl_give isl_aff * isl_aff_sub(__isl_take isl_aff *aff1, __isl_take isl_aff *aff2)
__isl_export __isl_give isl_val * isl_aff_get_constant_val(__isl_keep isl_aff *aff)
isl_bool isl_aff_is_nan(__isl_keep isl_aff *aff)
isl_bool isl_basic_map_has_defining_equality(__isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos, __isl_give isl_constraint **c)
__isl_null isl_constraint * isl_constraint_free(__isl_take isl_constraint *c)
#define isl_die(ctx, errno, msg, code)
#define isl_alloc_array(ctx, type, n)
#define isl_calloc_array(ctx, type, n)
#define ISL_F_ISSET(p, f)
isl_bool isl_bool_not(isl_bool b)
__isl_export __isl_give ISL_HMAP __isl_take ISL_KEY __isl_take ISL_VAL * val
void GMPZAPI() sub(mp_int rop, mp_int op1, mp_int op2)
__isl_give isl_aff * isl_aff_substitute_equalities(__isl_take isl_aff *aff, __isl_take isl_basic_set *eq)
__isl_give isl_basic_map * isl_basic_map_plain_affine_hull(__isl_take isl_basic_map *bmap)
static isl_stat shift_div(struct isl_coalesce_info *info, int div, isl_int shift)
static enum isl_change check_facets(int i, int j, struct isl_coalesce_info *info)
static enum isl_ineq_type type_of_relaxed(struct isl_tab *tab, isl_int *ineq)
static isl_stat copy_ineq(struct isl_tab *tab, __isl_keep isl_basic_map *bmap)
static enum isl_change coalesce_with_subs(int i, int j, struct isl_coalesce_info *info, __isl_keep isl_aff_list *list)
static isl_stat add_sub_vars(struct isl_coalesce_info *info, __isl_keep isl_aff_list *list, int dim, int extra_var)
static enum isl_change check_adj_eq(int i, int j, struct isl_coalesce_info *info)
static enum isl_change coalesce_local_pair_reuse(int i, int j, struct isl_coalesce_info *info)
static isl_stat shift_if_cst_int(struct isl_coalesce_info *info, int div, __isl_keep isl_aff *shift)
static enum isl_change check_single_adj_eq(int i, int j, struct isl_coalesce_info *info)
static isl_stat add_valid_wraps_around_facet(struct isl_wraps *wraps, struct isl_coalesce_info *info, int k, isl_int *bound, __isl_keep isl_set *set)
static void clear(struct isl_coalesce_info *info)
__isl_give isl_set * isl_set_coalesce(__isl_take isl_set *set)
static int all_valid_or_cut(struct isl_coalesce_info *info)
static __isl_give isl_basic_map * add_valid_constraints(__isl_take isl_basic_map *bmap, struct isl_coalesce_info *info, unsigned len)
static isl_stat add_subs(struct isl_coalesce_info *info, __isl_keep isl_aff_list *list, int dim)
static void set_eq_status_in(struct isl_coalesce_info *info, struct isl_tab *tab)
static isl_stat add_selected_wraps(struct isl_wraps *wraps, struct isl_coalesce_info *info, isl_int *bound, __isl_keep isl_set *set, int add_valid)
static __isl_give isl_map * update_basic_maps(__isl_take isl_map *map, int n, struct isl_coalesce_info *info)
static enum isl_change wrap_in_facets(int i, int j, int n, struct isl_coalesce_info *info)
static isl_stat wraps_mark_failed(struct isl_wraps *wraps)
static enum isl_change coalesce_subset_with_equalities(int i, int j, struct isl_coalesce_info *info)
static enum isl_change coalesce_with_expanded_divs(__isl_keep isl_basic_map *bmap, int i, int j, struct isl_coalesce_info *info, __isl_keep isl_mat *div, int *exp)
static int coalesce_range(isl_ctx *ctx, struct isl_coalesce_info *info, int start1, int end1, int start2, int end2)
static enum isl_change can_wrap_in_facet(int i, int j, int k, struct isl_coalesce_info *info, int wrap_facet)
static int coalesce_info_set_hull_hash(struct isl_coalesce_info *info)
static int find(int *con, unsigned len, int status)
static int find_eq(struct isl_coalesce_info *info, int status)
static enum isl_change is_relaxed_extension(int i, int j, int n, int *relax, struct isl_coalesce_info *info)
static isl_bool contains(struct isl_coalesce_info *info, struct isl_tab *tab)
static int * ineq_status_in(__isl_keep isl_basic_map *bmap_i, struct isl_tab *tab_i, struct isl_tab *tab_j)
static int number_of_constraints_increases(int i, int j, struct isl_coalesce_info *info, __isl_keep isl_basic_map *bmap, struct isl_tab *tab)
static isl_stat add_wraps_around_facet(struct isl_wraps *wraps, struct isl_coalesce_info *info, int k, isl_int *bound, __isl_keep isl_set *set)
static isl_bool is_affected(__isl_keep isl_basic_map *bmap, int ineq, int *affected, int total)
static int all_ineq_valid_or_single_adj_ineq(struct isl_coalesce_info *info)
static enum isl_change can_wrap_in_set(int i, int j, struct isl_coalesce_info *info)
static enum isl_change check_adj_ineq(int i, int j, struct isl_coalesce_info *info)
static enum isl_change check_eq_adj_eq(int i, int j, struct isl_coalesce_info *info)
static enum isl_change coalesce_local_pair(int i, int j, struct isl_coalesce_info *info)
static void set_ineq_status_in(struct isl_coalesce_info *info, struct isl_tab *tab)
static __isl_give isl_vec * try_tightening(struct isl_coalesce_info *info, int ineq, __isl_take isl_vec *v)
static isl_stat add_wraps(struct isl_wraps *wraps, struct isl_coalesce_info *info, isl_int *bound, __isl_keep isl_set *set)
static int find_ineq(struct isl_coalesce_info *info, int status)
static void wraps_free(struct isl_wraps *wraps)
static isl_stat add_sub_equalities(struct isl_tab *tab, __isl_keep isl_aff_list *list, int dim)
static int status_in(isl_int *ineq, struct isl_tab *tab)
static enum isl_change try_wrap_in_facets(int i, int j, struct isl_coalesce_info *info, struct isl_wraps *wraps, __isl_keep isl_set *set_i)
static isl_stat add_selected_wraps_around_facet(struct isl_wraps *wraps, struct isl_coalesce_info *info, int k, isl_int *bound, __isl_keep isl_set *set, int add_valid)
static isl_bool has_nested_div(__isl_keep isl_basic_map *bmap)
static isl_stat expand_tab(struct isl_coalesce_info *info, int *exp, __isl_take isl_basic_map *bmap)
static enum isl_change coalesce_after_aligning_divs(__isl_keep isl_basic_map *bmap_i, int i, int j, struct isl_coalesce_info *info)
static isl_stat harmonize_stride_divs(struct isl_coalesce_info *info1, struct isl_coalesce_info *info2)
static isl_stat normalize_stride_div(struct isl_coalesce_info *info, int div)
static enum isl_change separating_equality(int i, int j, struct isl_coalesce_info *info)
static int any_eq(struct isl_coalesce_info *info, int status)
static int count_eq(struct isl_coalesce_info *info, int status)
static int isl_max(int a, int b)
static void init_status(struct isl_coalesce_info *info)
static enum isl_change check_coalesce_eq(int i, int j, struct isl_coalesce_info *info)
static enum isl_change invert_change(enum isl_change change)
static int all(int *con, unsigned len, int status)
static enum isl_change coalesce_divs(int i, int j, struct isl_coalesce_info *info)
static int count_ineq(struct isl_coalesce_info *info, int status)
static isl_stat tighten_on_relaxed_facet(struct isl_coalesce_info *info, int n, int *relaxed, int l)
static int count(int *con, unsigned len, int status)
static int coalesce(isl_ctx *ctx, int n, struct isl_coalesce_info *info)
static isl_stat wrap_in_facet(struct isl_wraps *wraps, int w, struct isl_coalesce_info *info_j, __isl_keep isl_set *set_i, struct isl_tab_undo *snap)
__isl_give isl_map * isl_map_coalesce(__isl_take isl_map *map)
static isl_stat wraps_update_max(struct isl_wraps *wraps, struct isl_coalesce_info *info)
static enum isl_change check_wrap(int i, int j, struct isl_coalesce_info *info)
static isl_bool has_redundant_cuts(struct isl_coalesce_info *info)
static isl_stat wraps_init(struct isl_wraps *wraps, __isl_take isl_mat *mat, struct isl_coalesce_info *info, int i, int j)
static int * eq_status_in(__isl_keep isl_basic_map *bmap_i, struct isl_tab *tab_j)
static enum isl_change is_adj_ineq_extension(int i, int j, struct isl_coalesce_info *info)
static isl_stat harmonize_divs_with_hulls(struct isl_coalesce_info *info1, struct isl_coalesce_info *info2, __isl_keep isl_basic_set *eq1, __isl_keep isl_basic_set *eq2)
static isl_stat check_wraps(struct isl_wraps *wraps, int first, struct isl_tab *tab, int keep)
static enum isl_change check_coalesce_into_eq(int i, int j, struct isl_coalesce_info *info)
static void exchange(struct isl_coalesce_info *info1, struct isl_coalesce_info *info2)
static __isl_give isl_aff_list * set_up_substitutions(__isl_keep isl_basic_map *bmap_i, __isl_keep isl_basic_map *bmap_j, __isl_take isl_basic_map *hull)
static int not_unique_unit_row(__isl_keep isl_mat *T, int row)
static void clear_status(struct isl_coalesce_info *info)
static isl_bool all_cut_by_one(int i, int j, struct isl_coalesce_info *info, int *list)
static isl_bool same_divs(__isl_keep isl_basic_map *bmap1, __isl_keep isl_basic_map *bmap2)
static int allow_wrap(struct isl_wraps *wraps, int row)
static enum isl_change check_ineq_adj_eq(int i, int j, struct isl_coalesce_info *info)
static enum isl_change extend(int i, int j, int n, int *relax, struct isl_coalesce_info *info)
static isl_stat fix_constant_divs(struct isl_coalesce_info *info, int n, struct isl_expanded *expanded)
static void drop(struct isl_coalesce_info *info)
static int any_ineq(struct isl_coalesce_info *info, int status)
static __isl_give isl_set * set_from_updated_bmap(__isl_keep isl_basic_map *bmap, struct isl_tab *tab)
static int any(int *con, unsigned len, int status)
static isl_stat harmonize_divs(struct isl_coalesce_info *info1, struct isl_coalesce_info *info2)
static enum isl_change is_adj_ineq_extension_with_wraps(int i, int j, int k, struct isl_coalesce_info *info, __isl_keep isl_mat *extra)
static isl_stat tab_insert_divs(struct isl_coalesce_info *info, int n, struct isl_expanded *expanded, __isl_take isl_basic_map *bmap)
static enum isl_change coalesce_pair(int i, int j, struct isl_coalesce_info *info)
static void clear_coalesce_info(int n, struct isl_coalesce_info *info)
static enum isl_change coalesce_expand_tab_divs(__isl_take isl_basic_map *bmap, int i, int j, struct isl_coalesce_info *info, __isl_keep isl_mat *div, int *exp)
static int add_wrap(struct isl_wraps *wraps, int w, isl_int *bound, isl_int *ineq, unsigned len, __isl_keep isl_set *set, int negate)
void isl_constraint_get_constant(__isl_keep isl_constraint *constraint, isl_int *v)
void isl_constraint_get_coefficient(__isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos, isl_int *v)
isl_bool isl_constraint_is_div_equality(__isl_keep isl_constraint *constraint, unsigned div)
isl_int * isl_set_wrap_facet(__isl_keep isl_set *set, isl_int *facet, isl_int *ridge)
__isl_give isl_mat * isl_mat_variable_compression(__isl_take isl_mat *B, __isl_give isl_mat **T2)
#define isl_int_is_zero(i)
#define isl_int_is_one(i)
#define isl_int_is_negone(i)
#define isl_int_neg(r, i)
#define isl_int_add_ui(r, i, j)
#define isl_int_add(r, i, j)
#define isl_int_fdiv_r(r, i, j)
#define isl_int_abs_gt(i, j)
#define isl_int_set(r, i)
#define isl_int_set_si(r, i)
#define isl_int_sub_ui(r, i, j)
#define isl_int_fdiv_q(r, i, j)
#define isl_int_sub(r, i, j)
__isl_give isl_mat * isl_merge_divs(__isl_keep isl_mat *div1, __isl_keep isl_mat *div2, int *exp1, int *exp2)
__isl_give isl_map * isl_map_sort_divs(__isl_take isl_map *map)
isl_bool isl_local_space_div_is_known(__isl_keep isl_local_space *ls, int div)
__isl_give isl_basic_map * isl_basic_map_free_inequality(__isl_take isl_basic_map *bmap, unsigned n)
__isl_give isl_basic_map * isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap, isl_int *ineq)
isl_bool isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1, __isl_keep isl_basic_map *bmap2)
isl_size isl_basic_map_n_equality(__isl_keep isl_basic_map *bmap)
isl_size isl_basic_map_n_inequality(__isl_keep isl_basic_map *bmap)
isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div)
__isl_give isl_basic_map * isl_basic_map_add_div_constraints(__isl_take isl_basic_map *bmap, unsigned pos)
unsigned isl_basic_map_offset(__isl_keep isl_basic_map *bmap, enum isl_dim_type type)
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
isl_bool isl_basic_map_equal_div_expr_part(__isl_keep isl_basic_map *bmap1, int pos1, __isl_keep isl_basic_map *bmap2, int pos2, unsigned first, unsigned n)
__isl_give isl_basic_map * isl_basic_map_set_div_expr_constant_num_si_inplace(__isl_take isl_basic_map *bmap, int div, int value)
int isl_basic_map_alloc_div(__isl_keep isl_basic_map *bmap)
int isl_basic_map_alloc_inequality(__isl_keep isl_basic_map *bmap)
__isl_give isl_map * isl_map_cow(__isl_take isl_map *map)
__isl_give isl_basic_map * isl_basic_map_mark_div_unknown(__isl_take isl_basic_map *bmap, int div)
__isl_give isl_basic_set * isl_basic_map_underlying_set(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_cow(__isl_take isl_basic_map *bmap)
__isl_give isl_mat * isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap)
__isl_give isl_basic_set * isl_basic_set_cow(__isl_take isl_basic_set *bset)
__isl_give isl_map * isl_map_remove_empty_parts(__isl_take isl_map *map)
int isl_basic_map_alloc_equality(__isl_keep isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_expand_divs(__isl_take isl_basic_map *bmap, __isl_take isl_mat *div, int *exp)
uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap)
isl_bool isl_basic_map_equal_div_expr_except_constant(__isl_keep isl_basic_map *bmap1, int pos1, __isl_keep isl_basic_map *bmap2, int pos2)
__isl_give isl_basic_map * isl_basic_map_extend_constraints(__isl_take isl_basic_map *base, unsigned n_eq, unsigned n_ineq)
isl_bool isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_extend(__isl_take isl_basic_map *base, unsigned extra, unsigned n_eq, unsigned n_ineq)
__isl_give isl_basic_map * isl_basic_map_swap_div(__isl_take isl_basic_map *bmap, int a, int b)
__isl_give isl_basic_map * isl_basic_map_alloc_space(__isl_take isl_space *space, unsigned extra, unsigned n_eq, unsigned n_ineq)
#define ISL_BASIC_MAP_NO_REDUNDANT
__isl_give isl_basic_map * isl_basic_map_simplify(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_finalize(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_gauss(__isl_take isl_basic_map *bmap, int *progress)
__isl_give isl_basic_map * isl_basic_map_detect_inequality_pairs(__isl_take isl_basic_map *bmap, int *progress)
__isl_give isl_basic_map * isl_basic_map_reduce_coefficients(__isl_take isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_shift_div(__isl_take isl_basic_map *bmap, int div, int pos, isl_int shift)
#define ISL_BASIC_MAP_RATIONAL
__isl_give isl_basic_map * isl_basic_map_eliminate_pure_unit_divs(__isl_take isl_basic_map *bmap)
#define ISL_BASIC_MAP_NO_IMPLICIT
__isl_give isl_basic_map * isl_basic_map_mark_final(__isl_take isl_basic_map *bmap)
#define ISL_BASIC_MAP_FINAL
__isl_give isl_mat * isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row, unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col)
static struct isl_arg_choice bound[]
static struct isl_arg_choice fuse[]
int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len)
int isl_seq_first_non_zero(isl_int *p, unsigned len)
void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd)
void isl_seq_clr(isl_int *p, unsigned len)
void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len)
int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len)
void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len)
void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len)
void isl_seq_abs_max(isl_int *p, unsigned len, isl_int *max)
static __isl_keep isl_space * nested(__isl_keep isl_space *space, enum isl_dim_type type)
int isl_tab_detect_redundant(struct isl_tab *tab)
void isl_tab_free(struct isl_tab *tab)
int isl_tab_insert_var(struct isl_tab *tab, int r)
int isl_tab_extend_vars(struct isl_tab *tab, unsigned n_new)
int isl_tab_is_redundant(struct isl_tab *tab, int con)
int isl_tab_mark_rational(struct isl_tab *tab)
isl_stat isl_tab_add_eq(struct isl_tab *tab, isl_int *eq)
int isl_tab_relax(struct isl_tab *tab, int con)
struct isl_tab_undo * isl_tab_snap(struct isl_tab *tab)
int isl_tab_unrestrict(struct isl_tab *tab, int con)
int isl_tab_is_equality(struct isl_tab *tab, int con)
__isl_give isl_basic_set * isl_basic_set_update_from_tab(__isl_take isl_basic_set *bset, struct isl_tab *tab)
isl_stat isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq)
isl_ctx * isl_tab_get_ctx(struct isl_tab *tab)
isl_stat isl_tab_detect_constants(struct isl_tab *tab)
__isl_give isl_basic_map * isl_tab_make_equalities_explicit(struct isl_tab *tab, __isl_take isl_basic_map *bmap)
isl_bool isl_tab_is_constant(struct isl_tab *tab, int var, isl_int *value)
enum isl_ineq_type isl_tab_ineq_type(struct isl_tab *tab, isl_int *ineq)
int isl_tab_shift_var(struct isl_tab *tab, int pos, isl_int shift)
int isl_tab_detect_implicit_equalities(struct isl_tab *tab)
__isl_give struct isl_tab * isl_tab_from_basic_map(__isl_keep isl_basic_map *bmap, int track)
isl_stat isl_tab_rollback(struct isl_tab *tab, struct isl_tab_undo *snap)
int isl_tab_select_facet(struct isl_tab *tab, int con)
int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new)
__isl_give isl_basic_map * isl_basic_map_update_from_tab(__isl_take isl_basic_map *bmap, struct isl_tab *tab)
static __isl_give isl_union_map * total(__isl_take isl_union_map *umap, __isl_give isl_map *(*fn)(__isl_take isl_map *))
isl_stat isl_val_get_num_isl_int(__isl_keep isl_val *v, isl_int *n)
__isl_give isl_vec * isl_vec_cow(__isl_take isl_vec *vec)
__isl_give isl_aff * isl_local_space_get_div(__isl_keep isl_local_space *ls, int pos)
__isl_null isl_local_space * isl_local_space_free(__isl_take isl_local_space *ls)
__isl_give isl_local_space * isl_local_space_copy(__isl_keep isl_local_space *ls)
__isl_give isl_local_space * isl_local_space_wrap(__isl_take isl_local_space *ls)
isl_bool isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap)
__isl_give isl_basic_map * isl_basic_map_drop_constraints_involving_dims(__isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first, unsigned n)
__isl_null isl_basic_map * isl_basic_map_free(__isl_take isl_basic_map *bmap)
isl_ctx * isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap)
isl_size isl_basic_map_dim(__isl_keep isl_basic_map *bmap, enum isl_dim_type type)
isl_ctx * isl_map_get_ctx(__isl_keep isl_map *map)
__isl_give isl_local_space * isl_basic_map_get_local_space(__isl_keep isl_basic_map *bmap)
__isl_give isl_basic_set * isl_basic_map_wrap(__isl_take isl_basic_map *bmap)
__isl_null isl_map * isl_map_free(__isl_take isl_map *map)
__isl_give isl_basic_map * isl_basic_map_copy(__isl_keep isl_basic_map *bmap)
__isl_export __isl_give isl_basic_map * isl_basic_map_intersect(__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2)
struct isl_basic_set isl_basic_set
__isl_give isl_mat * isl_mat_copy(__isl_keep isl_mat *mat)
isl_size isl_mat_rows(__isl_keep isl_mat *mat)
__isl_give isl_mat * isl_mat_drop_rows(__isl_take isl_mat *mat, unsigned row, unsigned n)
__isl_null isl_mat * isl_mat_free(__isl_take isl_mat *mat)
__isl_give isl_mat * isl_mat_alloc(isl_ctx *ctx, unsigned n_row, unsigned n_col)
isl_ctx * isl_mat_get_ctx(__isl_keep isl_mat *mat)
__isl_give isl_vec * isl_vec_mat_product(__isl_take isl_vec *vec, __isl_take isl_mat *mat)
int isl_options_get_coalesce_preserve_locals(isl_ctx *ctx)
int isl_options_get_coalesce_bounded_wrapping(isl_ctx *ctx)
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
__isl_null isl_set * isl_set_free(__isl_take isl_set *set)
isl_bool isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1, __isl_keep isl_basic_set *bset2)
__isl_constructor __isl_give isl_set * isl_set_from_basic_set(__isl_take isl_basic_set *bset)
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
static __isl_give isl_set * set_from_map(__isl_take isl_map *map)
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
struct isl_basic_map * bmap
static Signature set_to_map
__isl_null isl_val * isl_val_free(__isl_take isl_val *v)
__isl_export isl_bool isl_val_is_zero(__isl_keep isl_val *v)
__isl_export isl_bool isl_val_is_int(__isl_keep isl_val *v)
isl_ctx * isl_vec_get_ctx(__isl_keep isl_vec *vec)
__isl_null isl_vec * isl_vec_free(__isl_take isl_vec *vec)
__isl_give isl_vec * isl_vec_alloc(isl_ctx *ctx, unsigned size)