summaryrefslogtreecommitdiff
path: root/isl_mat.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2008-12-22 15:00:07 +0100
committerSven Verdoolaege <skimo@kotnet.org>2008-12-22 15:00:07 +0100
commit2b37b4aa395a360f691bb07751123dcd4388a1c6 (patch)
treebcb9015973069ee016792ba8a6426abc804b5520 /isl_mat.c
parent3eec478353729cbd4ff1b0e424a22c1803af9ab5 (diff)
downloadisl-2b37b4aa395a360f691bb07751123dcd4388a1c6.tar.gz
isl-2b37b4aa395a360f691bb07751123dcd4388a1c6.tar.bz2
isl-2b37b4aa395a360f691bb07751123dcd4388a1c6.zip
avoid increasing "extra" without also extending the div array
The "extra" variable is used to indicate both the number of extra variables in the columns beyond those in dim and the number of rows in the div array. We can therefore not increase extra, without also extending this array.
Diffstat (limited to 'isl_mat.c')
-rw-r--r--isl_mat.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/isl_mat.c b/isl_mat.c
index e6638385..3fde011c 100644
--- a/isl_mat.c
+++ b/isl_mat.c
@@ -675,6 +675,16 @@ error:
return NULL;
}
+/* Replace the variables x in bset by x' given by x = M x', with
+ * M the matrix mat.
+ *
+ * If there are fewer variables x' then there are x, then we perform
+ * the transformation in place, which that, in principle,
+ * this frees up some extra variables as the number
+ * of columns remains constant, but we would have to extend
+ * the div array too as the number of rows in this array is assumed
+ * to be equal to extra.
+ */
struct isl_basic_set *isl_basic_set_preimage(struct isl_ctx *ctx,
struct isl_basic_set *bset, struct isl_mat *mat)
{
@@ -700,7 +710,6 @@ struct isl_basic_set *isl_basic_set_preimage(struct isl_ctx *ctx,
if (!bset->dim)
goto error;
bset->dim->n_out -= mat->n_row - mat->n_col;
- bset->extra += mat->n_row - mat->n_col;
}
t = isl_mat_sub_alloc(ctx, bset->eq, 0, bset->n_eq, 0, mat->n_row);