diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2009-07-23 11:40:43 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2009-08-04 19:21:09 +0200 |
commit | 2c1ad1eb806859edb46e9013fda9c5750bc4388b (patch) | |
tree | 27f37287cf6583ae86cc38c7c407471edad9dc7c /isl_tab.c | |
parent | 3923eaa917b3404f894b533910b1ebe309c5522a (diff) | |
download | isl-2c1ad1eb806859edb46e9013fda9c5750bc4388b.tar.gz isl-2c1ad1eb806859edb46e9013fda9c5750bc4388b.tar.bz2 isl-2c1ad1eb806859edb46e9013fda9c5750bc4388b.zip |
isl_tab.c: simplify add_eq
Diffstat (limited to 'isl_tab.c')
-rw-r--r-- | isl_tab.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -972,13 +972,12 @@ static struct isl_tab *add_eq(struct isl_tab *tab, isl_int *eq) goto error; r = tab->con[r].index; - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (isl_int_is_zero(tab->mat->row[r][2 + i])) - continue; - pivot(tab, r, i); - kill_col(tab, i); - break; - } + i = isl_seq_first_non_zero(tab->mat->row[r] + 2 + tab->n_dead, + tab->n_col - tab->n_dead); + isl_assert(tab->mat->ctx, i >= 0, goto error); + i += tab->n_dead; + pivot(tab, r, i); + kill_col(tab, i); tab->n_eq++; return tab; |