* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
*/
-#include "isl_ctx.h"
-#include "isl_vec.h"
+#include <isl_ctx_private.h>
+#include <isl/vec.h>
static struct isl_options *find_nested_options(struct isl_arg *arg,
void *opt, struct isl_arg *wanted)
if (!ctx)
goto error;
- if (isl_hash_table_init(ctx, &ctx->name_hash, 0))
+ if (isl_hash_table_init(ctx, &ctx->id_table, 0))
goto error;
ctx->stats = isl_calloc_type(ctx, struct isl_stats);
isl_int_init(ctx->normalize_gcd);
ctx->n_cached = 0;
+ ctx->n_miss = 0;
ctx->error = isl_error_none;
if (!ctx)
return;
isl_assert(ctx, ctx->ref == 0, return);
- isl_hash_table_clear(&ctx->name_hash);
+ isl_hash_table_clear(&ctx->id_table);
isl_blk_clear_cache(ctx);
isl_int_clear(ctx->zero);
isl_int_clear(ctx->one);
{
ctx->error = isl_error_none;
}
+
+void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error)
+{
+ if (ctx)
+ ctx->error = error;
+}
+
+void isl_ctx_abort(isl_ctx *ctx)
+{
+ if (ctx)
+ ctx->abort = 1;
+}
+
+void isl_ctx_resume(isl_ctx *ctx)
+{
+ if (ctx)
+ ctx->abort = 0;
+}
+
+int isl_ctx_aborted(isl_ctx *ctx)
+{
+ return ctx ? ctx->abort : -1;
+}