int i, r, n;
dom = isl_pw_qpolynomial_domain(isl_pw_qpolynomial_copy(pwqp));
- context = isl_set_remove(isl_set_copy(dom), isl_dim_set,
+ context = isl_set_remove_dims(isl_set_copy(dom), isl_dim_set,
0, isl_set_dim(dom, isl_dim_set));
context = isl_set_remove_divs(context);
context = set_bounds(context);
__isl_take isl_basic_map *bmap);
__isl_give isl_basic_map *isl_basic_map_range_map(
__isl_take isl_basic_map *bmap);
-struct isl_basic_map *isl_basic_map_remove(struct isl_basic_map *bmap,
+__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);
struct isl_basic_map *isl_basic_map_from_basic_set(struct isl_basic_set *bset,
struct isl_dim *dim);
enum isl_dim_type type, unsigned first, unsigned n);
__isl_give isl_basic_map *isl_basic_map_remove_divs(
__isl_take isl_basic_map *bmap);
-struct isl_map *isl_map_remove(struct isl_map *map,
+__isl_give isl_map *isl_map_remove_dims(__isl_take isl_map *map,
enum isl_dim_type type, unsigned first, unsigned n);
struct isl_map *isl_map_remove_inputs(struct isl_map *map,
unsigned first, unsigned n);
__isl_take isl_basic_map *bmap);
__isl_give isl_basic_set *isl_basic_set_affine_hull(
__isl_take isl_basic_set *bset);
-__isl_give isl_basic_set *isl_basic_set_remove(__isl_take isl_basic_set *bset,
+__isl_give isl_basic_set *isl_basic_set_remove_dims(
+ __isl_take isl_basic_set *bset,
enum isl_dim_type type, unsigned first, unsigned n);
struct isl_basic_set *isl_basic_set_simplify(struct isl_basic_set *bset);
__isl_give isl_basic_set *isl_basic_set_detect_equalities(
enum isl_dim_type type, unsigned first, unsigned n);
__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set,
enum isl_dim_type type, unsigned first, unsigned n);
-struct isl_basic_set *isl_basic_set_remove_dims(struct isl_basic_set *bset,
- unsigned first, unsigned n);
__isl_give isl_basic_set *isl_basic_set_remove_divs(
__isl_take isl_basic_set *bset);
struct isl_set *isl_set_eliminate_dims(struct isl_set *set,
unsigned first, unsigned n);
-__isl_give isl_set *isl_set_remove(__isl_take isl_set *bset,
+__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset,
enum isl_dim_type type, unsigned first, unsigned n);
-struct isl_set *isl_set_remove_dims(struct isl_set *set,
- unsigned first, unsigned n);
__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set);
__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set,
enum isl_dim_type type, unsigned first, unsigned n);
lower = isl_basic_set_constraint(isl_basic_set_copy(bset),
&bset->eq[i]);
upper = isl_constraint_copy(lower);
- context = isl_basic_set_remove(isl_basic_set_copy(bset),
+ context = isl_basic_set_remove_dims(isl_basic_set_copy(bset),
type, pos, 1);
if (!lower || !upper || !context)
goto error;
static struct isl_set *set_project_out(struct isl_ctx *ctx,
struct isl_set *set, unsigned n)
{
- return isl_set_remove_dims(set, isl_set_n_dim(set) - n, n);
+ return isl_set_remove_dims(set, isl_dim_set, isl_set_n_dim(set) - n, n);
}
static struct isl_basic_set *convex_hull_0d(struct isl_set *set)
isl_int_set_si(hull->eq[k][2*(1+dim)+j], 1);
}
hull = isl_basic_set_set_rational(hull);
- hull = isl_basic_set_remove_dims(hull, dim, 2*(1+dim));
+ hull = isl_basic_set_remove_dims(hull, isl_dim_set, dim, 2*(1+dim));
hull = isl_basic_set_remove_redundancies(hull);
isl_basic_set_free(bset1);
isl_basic_set_free(bset2);
Q = isl_mat_lin_to_aff(Q);
set = isl_set_preimage(set, U);
- set = isl_set_remove_dims(set, total - lin_dim, lin_dim);
+ set = isl_set_remove_dims(set, isl_dim_set, total - lin_dim, lin_dim);
hull = uset_convex_hull(set);
hull = isl_basic_set_preimage(hull, Q);
return isl_set_eliminate(set, isl_dim_set, first, n);
}
-/* Project out n dimensions starting at first using Fourier-Motzkin */
-struct isl_set *isl_set_remove_dims(struct isl_set *set,
- unsigned first, unsigned n)
-{
- set = isl_set_eliminate_dims(set, first, n);
- set = isl_set_drop_dims(set, first, n);
- return set;
-}
-
__isl_give isl_basic_map *isl_basic_map_remove_divs(
__isl_take isl_basic_map *bmap)
{
return NULL;
}
-struct isl_basic_map *isl_basic_map_remove(struct isl_basic_map *bmap,
+struct isl_basic_map *isl_basic_map_remove_dims(struct isl_basic_map *bmap,
enum isl_dim_type type, unsigned first, unsigned n)
{
if (!bmap)
return NULL;
}
-__isl_give isl_basic_set *isl_basic_set_remove(__isl_take isl_basic_set *bset,
+__isl_give isl_basic_set *isl_basic_set_remove_dims(
+ __isl_take isl_basic_set *bset,
enum isl_dim_type type, unsigned first, unsigned n)
{
return (isl_basic_set *)
- isl_basic_map_remove((isl_basic_map *)bset, type, first, n);
+ isl_basic_map_remove_dims((isl_basic_map *)bset, type, first, n);
}
-struct isl_map *isl_map_remove(struct isl_map *map,
+struct isl_map *isl_map_remove_dims(struct isl_map *map,
enum isl_dim_type type, unsigned first, unsigned n)
{
int i;
return NULL;
}
-__isl_give isl_set *isl_set_remove(__isl_take isl_set *bset,
+__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset,
enum isl_dim_type type, unsigned first, unsigned n)
{
- return (isl_set *)isl_map_remove((isl_map *)bset, type, first, n);
+ return (isl_set *)isl_map_remove_dims((isl_map *)bset, type, first, n);
}
/* 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)
{
- return isl_map_remove(map, isl_dim_in, first, n);
-}
-
-/* Project out n dimensions starting at first using Fourier-Motzkin */
-struct isl_basic_set *isl_basic_set_remove_dims(struct isl_basic_set *bset,
- unsigned first, unsigned n)
-{
- unsigned nparam = isl_basic_set_n_param(bset);
- bset = isl_basic_set_eliminate_vars(bset, nparam + first, n);
- bset = isl_basic_set_drop_dims(bset, first, n);
- return bset;
+ return isl_map_remove_dims(map, isl_dim_in, first, n);
}
static void dump_term(struct isl_basic_map *bmap,
return NULL;
if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL))
- return isl_basic_map_remove(bmap, type, first, n);
+ return isl_basic_map_remove_dims(bmap, type, first, n);
isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type),
goto error);
if (remove < 0)
return bmap;
- bmap = isl_basic_map_remove(bmap, isl_dim_div, remove, 1);
+ bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, remove, 1);
return isl_basic_map_drop_redundant_divs(bmap);
error:
free(pairs);
dom_offset = 1 + isl_dim_offset(morph->dom->dim, type);
- morph->dom = isl_basic_set_remove(morph->dom, type, first, n);
+ morph->dom = isl_basic_set_remove_dims(morph->dom, type, first, n);
morph->map = isl_mat_drop_cols(morph->map, dom_offset + first, n);
ran_offset = 1 + isl_dim_offset(morph->ran->dim, type);
- morph->ran = isl_basic_set_remove(morph->ran, type, first, n);
+ morph->ran = isl_basic_set_remove_dims(morph->ran, type, first, n);
morph->map = isl_mat_drop_rows(morph->map, ran_offset + first, n);
total = isl_basic_set_total_dim(cone);
cone = isl_basic_set_preimage(cone, U);
- cone = isl_basic_set_remove_dims(cone, 0, total - (vec->size - 1));
+ cone = isl_basic_set_remove_dims(cone, isl_dim_set,
+ 0, total - (vec->size - 1));
cone = shift_cone(cone, vec);
bset = isl_basic_set_fix(bset,
isl_dim_param, i, params->el[1 + i]);
- bset = isl_basic_set_remove(bset, isl_dim_param, 0, params->size - 1);
+ bset = isl_basic_set_remove_dims(bset,
+ isl_dim_param, 0, params->size - 1);
isl_vec_free(params);
for (i = 0; i < params->size - 1; ++i)
set = isl_set_fix(set, isl_dim_param, i, params->el[1 + i]);
- set = isl_set_remove(set, isl_dim_param, 0, params->size - 1);
+ set = isl_set_remove_dims(set, isl_dim_param, 0, params->size - 1);
isl_vec_free(params);