__isl_give isl_set *isl_set_eliminate(
__isl_take isl_set *set, enum isl_dim_type type,
unsigned first, unsigned n);
+ __isl_give isl_basic_map *isl_basic_map_eliminate(
+ __isl_take isl_basic_map *bmap,
+ enum isl_dim_type type,
+ unsigned first, unsigned n);
Eliminate the coefficients for the given dimensions from the constraints,
without removing the dimensions.
__isl_give isl_basic_map *isl_basic_map_remove_dims(
__isl_take isl_basic_map *bmap,
enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_eliminate(
+ __isl_take isl_basic_map *bmap,
+ enum isl_dim_type type, unsigned first, unsigned n);
__isl_give isl_basic_map *isl_basic_map_from_basic_set(
__isl_take isl_basic_set *bset, __isl_take isl_space *dim);
struct isl_basic_set *isl_basic_set_from_basic_map(struct isl_basic_map *bmap);
(struct isl_basic_map *)bset, pos, n);
}
+/* Eliminate the specified n dimensions starting at first from the
+ * constraints using Fourier-Motzkin. The dimensions themselves
+ * are not removed.
+ */
+__isl_give isl_basic_map *isl_basic_map_eliminate(
+ __isl_take isl_basic_map *bmap,
+ enum isl_dim_type type, unsigned first, unsigned n)
+{
+ if (!bmap)
+ return NULL;
+ if (n == 0)
+ return bmap;
+
+ if (first + n > isl_basic_map_dim(bmap, type))
+ isl_die(bmap->ctx, isl_error_invalid,
+ "index out of bounds", goto error);
+
+ first += isl_basic_map_offset(bmap, type) - 1;
+ return isl_basic_map_eliminate_vars(bmap, first, n);
+error:
+ isl_basic_map_free(bmap);
+ return NULL;
+}
+
/* Don't assume equalities are in order, because align_divs
* may have changed the order of the divs.
*/