unsigned dim, isl_int value);
struct isl_basic_set *isl_basic_set_remove_dims(struct isl_basic_set *bset,
unsigned first, unsigned n);
+struct isl_basic_set *isl_basic_set_remove_divs(struct isl_basic_set *bset);
struct isl_set *isl_set_eliminate_dims(struct isl_set *set,
unsigned first, unsigned n);
struct isl_set *isl_set_remove_dims(struct isl_set *set,
unsigned first, unsigned n);
+struct isl_set *isl_set_remove_divs(struct isl_set *set);
void isl_set_dump(struct isl_set *set, FILE *out, int indent);
struct isl_set *isl_set_swap_vars(struct isl_set *set, unsigned n);
int i, j, k;
unsigned total;
+ if (n == 0)
+ return bmap;
if (!bmap)
return NULL;
total = bmap->nparam + bmap->n_in + bmap->n_out + bmap->n_div;
{
int i;
+ if (!set)
+ return NULL;
if (n == 0)
return set;
return set;
}
+struct isl_basic_set *isl_basic_set_remove_divs(struct isl_basic_set *bset)
+{
+ bset = isl_basic_set_eliminate_vars(bset, bset->nparam + bset->dim,
+ bset->n_div);
+ if (!bset)
+ return NULL;
+ bset->n_div = 0;
+ return bset;
+}
+
+struct isl_set *isl_set_remove_divs(struct isl_set *set)
+{
+ int i;
+
+ if (!set)
+ return NULL;
+ if (set->n == 0)
+ return set;
+
+ set = isl_set_cow(set);
+ if (!set)
+ return NULL;
+
+ for (i = 0; i < set->n; ++i) {
+ set->p[i] = isl_basic_set_remove_divs(set->p[i]);
+ if (!set->p[i])
+ goto error;
+ }
+ return set;
+error:
+ isl_set_free(set);
+ return NULL;
+}
+
/* Project out n inputs starting at first using Fourier-Motzkin */
struct isl_map *isl_map_remove_inputs(struct isl_map *map,
unsigned first, unsigned n)