From bf3f0fcbbe1f81c13bafa2e111c140f30b7636c5 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 5 Aug 2009 10:08:04 +0200 Subject: [PATCH] isl_tab: introduce parameters and divs --- isl_tab.c | 8 +++++++- isl_tab.h | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/isl_tab.c b/isl_tab.c index 885c3081..377d0b79 100644 --- a/isl_tab.c +++ b/isl_tab.c @@ -47,6 +47,8 @@ struct isl_tab *isl_tab_alloc(struct isl_ctx *ctx, tab->max_con = n_row; tab->n_col = n_var; tab->n_var = n_var; + tab->n_param = 0; + tab->n_div = 0; tab->n_dead = 0; tab->n_redundant = 0; tab->need_undo = 0; @@ -164,6 +166,8 @@ struct isl_tab *isl_tab_dup(struct isl_tab *tab) dup->max_con = tab->max_con; dup->n_col = tab->n_col; dup->n_var = tab->n_var; + dup->n_param = tab->n_param; + dup->n_div = tab->n_div; dup->n_dead = tab->n_dead; dup->n_redundant = tab->n_redundant; dup->rational = tab->rational; @@ -2000,7 +2004,9 @@ void isl_tab_dump(struct isl_tab *tab, FILE *out, int indent) fprintf(out, "%*s[", indent, ""); for (i = 0; i < tab->n_var; ++i) { if (i) - fprintf(out, ", "); + fprintf(out, (i == tab->n_param || + i == tab->n_var - tab->n_div) ? "; " + : ", "); fprintf(out, "%c%d%s", tab->var[i].is_row ? 'r' : 'c', tab->var[i].index, tab->var[i].is_zero ? " [=0]" : diff --git a/isl_tab.h b/isl_tab.h index df1b455f..a74d5907 100644 --- a/isl_tab.h +++ b/isl_tab.h @@ -68,6 +68,11 @@ struct isl_tab_undo { * since the constraint has been reduced to 0 = 0 and is therefore always * satisfied. * + * There are "n_var" variables in total. The first "n_param" of these + * are called parameters and the last "n_div" of these are called divs. + * The basic tableau operations makes no distinction between different + * kinds of variables. + * * Dead columns and redundant rows are detected on the fly. * However, the basic operations do not ensure that all dead columns * or all redundant rows are detected. @@ -83,6 +88,8 @@ struct isl_tab { unsigned n_redundant; unsigned n_var; + unsigned n_param; + unsigned n_div; unsigned n_con; unsigned n_eq; unsigned max_con; -- 2.11.4.GIT