return NULL;
}
-static struct isl_set *isl_set_add_equality(struct isl_set *set, isl_int *c)
+static struct isl_set *isl_set_add_basic_set_equality(struct isl_set *set, isl_int *c)
{
int i;
while (bounds->n_row > 1) {
slice = isl_set_copy(set);
- slice = isl_set_add_equality(slice, bounds->row[0]);
+ slice = isl_set_add_basic_set_equality(slice, bounds->row[0]);
face = isl_set_affine_hull(slice);
if (!face)
goto error;
bset1 = homogeneous_map(bset1, isl_mat_copy(T2));
bset2 = homogeneous_map(bset2, T2);
set = isl_set_alloc_dim(isl_basic_set_get_dim(bset1), 2, 0);
- set = isl_set_add(set, bset1);
- set = isl_set_add(set, bset2);
+ set = isl_set_add_basic_set(set, bset1);
+ set = isl_set_add_basic_set(set, bset2);
hull = uset_convex_hull(set);
hull = isl_basic_set_preimage(hull, T);
if (lin->n_eq < isl_basic_set_total_dim(lin)) {
struct isl_set *set;
set = isl_set_alloc_dim(isl_basic_set_get_dim(bset1), 2, 0);
- set = isl_set_add(set, bset1);
- set = isl_set_add(set, bset2);
+ set = isl_set_add_basic_set(set, bset1);
+ set = isl_set_add_basic_set(set, bset2);
return modulo_lineality(set, lin);
}
isl_basic_set_free(lin);
lin = isl_set_alloc_dim(isl_set_get_dim(set), set->n, 0);
for (i = 0; i < set->n; ++i)
- lin = isl_set_add(lin,
+ lin = isl_set_add_basic_set(lin,
isl_basic_set_lineality_space(isl_basic_set_copy(set->p[i])));
isl_set_free(set);
return isl_set_affine_hull(lin);
break;
}
if (t->n_eq < isl_basic_set_total_dim(t)) {
- set = isl_set_add(set, convex_hull);
+ set = isl_set_add_basic_set(set, convex_hull);
return modulo_lineality(set, t);
}
isl_basic_set_free(t);
if (!dup)
return NULL;
for (i = 0; i < set->n; ++i)
- dup = isl_set_add(dup, isl_basic_set_copy(set->p[i]));
+ dup = isl_set_add_basic_set(dup, isl_basic_set_copy(set->p[i]));
return dup;
}
isl_basic_set_free(bset);
return NULL;
}
- return isl_set_add(set, bset);
+ return isl_set_add_basic_set(set, bset);
}
struct isl_map *isl_map_from_basic_map(struct isl_basic_map *bmap)
isl_basic_map_free(bmap);
return NULL;
}
- return isl_map_add(map, bmap);
+ return isl_map_add_basic_map(map, bmap);
}
-struct isl_set *isl_set_add(struct isl_set *set, struct isl_basic_set *bset)
+__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set,
+ __isl_take isl_basic_set *bset)
{
- return (struct isl_set *)isl_map_add((struct isl_map *)set,
+ return (struct isl_set *)isl_map_add_basic_map((struct isl_map *)set,
(struct isl_basic_map *)bset);
}
if (isl_basic_map_is_empty(part))
isl_basic_map_free(part);
else
- result = isl_map_add(result, part);
+ result = isl_map_add_basic_map(result, part);
if (!result)
goto error;
}
if (isl_basic_map_is_empty(part))
isl_basic_map_free(part);
else
- result = isl_map_add(result, part);
+ result = isl_map_add_basic_map(result, part);
if (!result)
goto error;
}
map = isl_map_alloc_dim(isl_dim_copy(dims), dim + equal, ISL_MAP_DISJOINT);
for (i = 0; i < dim; ++i)
- map = isl_map_add(map,
+ map = isl_map_add_basic_map(map,
isl_basic_map_less_at(isl_dim_copy(dims), i));
if (equal)
- map = isl_map_add(map,
+ map = isl_map_add_basic_map(map,
isl_basic_map_equal(isl_dim_copy(dims), dim));
isl_dim_free(dims);
map = isl_map_alloc_dim(isl_dim_copy(dims), dim + equal, ISL_MAP_DISJOINT);
for (i = 0; i < dim; ++i)
- map = isl_map_add(map,
+ map = isl_map_add_basic_map(map,
isl_basic_map_more_at(isl_dim_copy(dims), i));
if (equal)
- map = isl_map_add(map,
+ map = isl_map_add_basic_map(map,
isl_basic_map_equal(isl_dim_copy(dims), dim));
isl_dim_free(dims);
if (!dim)
return NULL;
map = isl_map_alloc_dim(isl_dim_copy(dim), 1, ISL_MAP_DISJOINT);
- map = isl_map_add(map, isl_basic_map_universe(dim));
+ map = isl_map_add_basic_map(map, isl_basic_map_universe(dim));
return map;
}
if (!dim)
return NULL;
set = isl_set_alloc_dim(isl_dim_copy(dim), 1, ISL_MAP_DISJOINT);
- set = isl_set_add(set, isl_basic_set_universe(dim));
+ set = isl_set_add_basic_set(set, isl_basic_set_universe(dim));
return set;
}
return NULL;
dup = isl_map_alloc_dim(isl_dim_copy(map->dim), map->n, map->flags);
for (i = 0; i < map->n; ++i)
- dup = isl_map_add(dup, isl_basic_map_copy(map->p[i]));
+ dup = isl_map_add_basic_map(dup, isl_basic_map_copy(map->p[i]));
return dup;
}
-struct isl_map *isl_map_add(struct isl_map *map, struct isl_basic_map *bmap)
+__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map,
+ __isl_take isl_basic_map *bmap)
{
if (!bmap || !map)
goto error;
if (!map)
goto error;
for (i = 0; i < map1->n; ++i) {
- map = isl_map_add(map,
+ map = isl_map_add_basic_map(map,
isl_basic_map_copy(map1->p[i]));
if (!map)
goto error;
}
for (i = 0; i < map2->n; ++i) {
- map = isl_map_add(map,
+ map = isl_map_add_basic_map(map,
isl_basic_map_copy(map2->p[i]));
if (!map)
goto error;
goto error;
for (i = 0; i < map->n; ++i)
for (j = 0; j < set->n; ++j) {
- result = isl_map_add(result,
+ result = isl_map_add_basic_map(result,
isl_basic_map_intersect_range(
isl_basic_map_copy(map->p[i]),
isl_basic_set_copy(set->p[j])));
goto error;
for (i = 0; i < map1->n; ++i)
for (j = 0; j < map2->n; ++j) {
- result = isl_map_add(result,
+ result = isl_map_add_basic_map(result,
isl_basic_map_apply_range(
isl_basic_map_copy(map1->p[i]),
isl_basic_map_copy(map2->p[j])));
if (!result)
goto error;
for (i = 0; i < map->n; ++i)
- result = isl_set_add(result,
+ result = isl_set_add_basic_set(result,
isl_basic_map_deltas(isl_basic_map_copy(map->p[i])));
isl_map_free(map);
return result;
static struct isl_map *map_identity(struct isl_dim *dim)
{
struct isl_map *map = isl_map_alloc_dim(dim, 1, ISL_MAP_DISJOINT);
- return isl_map_add(map, basic_map_identity(isl_dim_copy(dim)));
+ return isl_map_add_basic_map(map, basic_map_identity(isl_dim_copy(dim)));
}
struct isl_map *isl_map_identity(struct isl_dim *set_dim)
map = isl_map_alloc_dim(isl_dim_copy(bmap1->dim), 2, 0);
if (!map)
goto error;
- map = isl_map_add(map, bmap1);
- map = isl_map_add(map, bmap2);
+ map = isl_map_add_basic_map(map, bmap1);
+ map = isl_map_add_basic_map(map, bmap2);
return map;
error:
isl_basic_map_free(bmap1);
if (isl_basic_map_is_empty(part))
isl_basic_map_free(part);
else
- result = isl_map_add(result, part);
+ result = isl_map_add_basic_map(result, part);
if (!result)
goto error;
}