summaryrefslogtreecommitdiff
path: root/isl_tab.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2011-03-17 09:59:00 +0100
committerSven Verdoolaege <skimo@kotnet.org>2011-03-18 12:12:10 +0100
commit5d62e96a2f406d00644db6e1711ad0fe042b9e06 (patch)
tree8f69c46925436d35ccc8e5f55a3758353cc2d50e /isl_tab.c
parent0dcb90aef1a2934609fdce9d8cf527af8b558d43 (diff)
downloadisl-5d62e96a2f406d00644db6e1711ad0fe042b9e06.tar.gz
isl-5d62e96a2f406d00644db6e1711ad0fe042b9e06.tar.bz2
isl-5d62e96a2f406d00644db6e1711ad0fe042b9e06.zip
rudimentary support for asynchronous termination of computations
Most operations end up using a tableau at some point, so we currently only check for the termination condition during pivoting. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'isl_tab.c')
-rw-r--r--isl_tab.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/isl_tab.c b/isl_tab.c
index e45ee880..f418517f 100644
--- a/isl_tab.c
+++ b/isl_tab.c
@@ -7,6 +7,7 @@
* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
*/
+#include <isl_ctx_private.h>
#include <isl_mat_private.h>
#include "isl_map_private.h"
#include "isl_tab.h"
@@ -1083,6 +1084,11 @@ int isl_tab_pivot(struct isl_tab *tab, int row, int col)
struct isl_tab_var *var;
unsigned off = 2 + tab->M;
+ if (tab->mat->ctx->abort) {
+ isl_ctx_set_error(tab->mat->ctx, isl_error_abort);
+ return -1;
+ }
+
isl_int_swap(mat->row[row][0], mat->row[row][off + col]);
sgn = isl_int_sgn(mat->row[row][0]);
if (sgn < 0) {