diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-10-23 13:42:21 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-10-26 16:38:43 +0200 |
commit | 27b6c995aaab20bf3b51b4adbba4a465a48c231c (patch) | |
tree | c9af0d4632d04f484c6ca72a7da575ab7db828f3 | |
parent | a7925d1b317c04bbe41c0b59d70dd12f2f1a8174 (diff) | |
download | isl-27b6c995aaab20bf3b51b4adbba4a465a48c231c.tar.gz isl-27b6c995aaab20bf3b51b4adbba4a465a48c231c.tar.bz2 isl-27b6c995aaab20bf3b51b4adbba4a465a48c231c.zip |
rename isl_map_remove to isl_map_remove_dims
The new name is more consistent with other functions and avoids confusion
as to what is being added.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
-rw-r--r-- | bound.c | 2 | ||||
-rw-r--r-- | include/isl_map.h | 5 | ||||
-rw-r--r-- | include/isl_set.h | 9 | ||||
-rw-r--r-- | isl_constraint.c | 2 | ||||
-rw-r--r-- | isl_convex_hull.c | 6 | ||||
-rw-r--r-- | isl_map.c | 36 | ||||
-rw-r--r-- | isl_map_simplify.c | 2 | ||||
-rw-r--r-- | isl_morph.c | 4 | ||||
-rw-r--r-- | isl_sample.c | 3 | ||||
-rw-r--r-- | pip.c | 5 |
10 files changed, 28 insertions, 46 deletions
@@ -171,7 +171,7 @@ static int check_solution(__isl_take isl_pw_qpolynomial *pwqp, 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); diff --git a/include/isl_map.h b/include/isl_map.h index e9760e10..8907e484 100644 --- a/include/isl_map.h +++ b/include/isl_map.h @@ -201,7 +201,8 @@ __isl_give isl_basic_map *isl_basic_map_domain_map( __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); @@ -368,7 +369,7 @@ __isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, 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); diff --git a/include/isl_set.h b/include/isl_set.h index cbd38192..650ae6c0 100644 --- a/include/isl_set.h +++ b/include/isl_set.h @@ -134,7 +134,8 @@ __isl_give isl_basic_set *isl_basic_set_apply( __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( @@ -274,16 +275,12 @@ __isl_give isl_basic_set *isl_basic_set_project_out( 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); diff --git a/isl_constraint.c b/isl_constraint.c index 9714842e..1cce16e9 100644 --- a/isl_constraint.c +++ b/isl_constraint.c @@ -876,7 +876,7 @@ int isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset, 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; diff --git a/isl_convex_hull.c b/isl_convex_hull.c index b355cda9..8c519861 100644 --- a/isl_convex_hull.c +++ b/isl_convex_hull.c @@ -790,7 +790,7 @@ 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) @@ -869,7 +869,7 @@ static struct isl_basic_set *convex_hull_pair_elim(struct isl_basic_set *bset1, 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); @@ -1043,7 +1043,7 @@ static struct isl_basic_set *modulo_lineality(struct isl_set *set, 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); @@ -1410,15 +1410,6 @@ __isl_give isl_set *isl_set_eliminate_dims(__isl_take isl_set *set, 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) { @@ -1461,7 +1452,7 @@ error: 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) @@ -1483,14 +1474,15 @@ error: 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; @@ -1516,27 +1508,17 @@ error: 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, @@ -2529,7 +2511,7 @@ __isl_give isl_basic_map *isl_basic_map_project_out( 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); diff --git a/isl_map_simplify.c b/isl_map_simplify.c index 036b36f9..d0199c86 100644 --- a/isl_map_simplify.c +++ b/isl_map_simplify.c @@ -2258,7 +2258,7 @@ static struct isl_basic_map *drop_more_redundant_divs( 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); diff --git a/isl_morph.c b/isl_morph.c index 8bc4db82..ca404cdb 100644 --- a/isl_morph.c +++ b/isl_morph.c @@ -126,7 +126,7 @@ __isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph, 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); @@ -153,7 +153,7 @@ __isl_give isl_morph *isl_morph_remove_ran_dims(__isl_take isl_morph *morph, 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); diff --git a/isl_sample.c b/isl_sample.c index 8413a2fd..2bd7c6b2 100644 --- a/isl_sample.c +++ b/isl_sample.c @@ -782,7 +782,8 @@ static struct isl_vec *round_up_in_cone(struct isl_vec *vec, 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); @@ -111,7 +111,8 @@ isl_basic_set *plug_in_parameters(isl_basic_set *bset, struct isl_vec *params) 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); @@ -125,7 +126,7 @@ isl_set *set_plug_in_parameters(isl_set *set, struct isl_vec *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); |