summaryrefslogtreecommitdiffstats
path: root/polly/lib/External/isl/isl_mat.c
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/External/isl/isl_mat.c')
-rw-r--r--polly/lib/External/isl/isl_mat.c43
1 files changed, 28 insertions, 15 deletions
diff --git a/polly/lib/External/isl/isl_mat.c b/polly/lib/External/isl/isl_mat.c
index 0cb67723a47..483eaf078e9 100644
--- a/polly/lib/External/isl/isl_mat.c
+++ b/polly/lib/External/isl/isl_mat.c
@@ -1235,53 +1235,66 @@ static int transform(isl_ctx *ctx, isl_int **q, unsigned n,
return 0;
}
-/* Replace the variables x of type "type" starting at "first" in "bset"
+/* Replace the variables x of type "type" starting at "first" in "bmap"
* by x' with x = M x' with M the matrix trans.
* That is, replace the corresponding coefficients c by c M.
*
* The transformation matrix should be a square matrix.
*/
-__isl_give isl_basic_set *isl_basic_set_transform_dims(
- __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
+__isl_give isl_basic_map *isl_basic_map_transform_dims(
+ __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first,
__isl_take isl_mat *trans)
{
isl_ctx *ctx;
unsigned pos;
- bset = isl_basic_set_cow(bset);
- if (!bset || !trans)
+ bmap = isl_basic_map_cow(bmap);
+ if (!bmap || !trans)
goto error;
- ctx = isl_basic_set_get_ctx(bset);
+ ctx = isl_basic_map_get_ctx(bmap);
if (trans->n_row != trans->n_col)
isl_die(trans->ctx, isl_error_invalid,
"expecting square transformation matrix", goto error);
- if (first + trans->n_row > isl_basic_set_dim(bset, type))
+ if (first + trans->n_row > isl_basic_map_dim(bmap, type))
isl_die(trans->ctx, isl_error_invalid,
"oversized transformation matrix", goto error);
- pos = isl_basic_set_offset(bset, type) + first;
+ pos = isl_basic_map_offset(bmap, type) + first;
- if (transform(ctx, bset->eq, bset->n_eq, pos, isl_mat_copy(trans)) < 0)
+ if (transform(ctx, bmap->eq, bmap->n_eq, pos, isl_mat_copy(trans)) < 0)
goto error;
- if (transform(ctx, bset->ineq, bset->n_ineq, pos,
+ if (transform(ctx, bmap->ineq, bmap->n_ineq, pos,
isl_mat_copy(trans)) < 0)
goto error;
- if (transform(ctx, bset->div, bset->n_div, 1 + pos,
+ if (transform(ctx, bmap->div, bmap->n_div, 1 + pos,
isl_mat_copy(trans)) < 0)
goto error;
- ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED);
- ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED_DIVS);
+ ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED);
+ ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS);
isl_mat_free(trans);
- return bset;
+ return bmap;
error:
isl_mat_free(trans);
- isl_basic_set_free(bset);
+ isl_basic_map_free(bmap);
return NULL;
}
+/* Replace the variables x of type "type" starting at "first" in "bset"
+ * by x' with x = M x' with M the matrix trans.
+ * That is, replace the corresponding coefficients c by c M.
+ *
+ * The transformation matrix should be a square matrix.
+ */
+__isl_give isl_basic_set *isl_basic_set_transform_dims(
+ __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first,
+ __isl_take isl_mat *trans)
+{
+ return isl_basic_map_transform_dims(bset, type, first, trans);
+}
+
void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent)
{
int i, j;
OpenPOWER on IntegriCloud