isl_ctx: add negone
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 13 Mar 2009 23:39:50 +0000 (00:39 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 20 Mar 2009 15:46:53 +0000 (16:46 +0100)
include/isl_ctx.h.in
isl_ctx.c

index 59b0e50..e59a6c2 100644 (file)
@@ -43,6 +43,7 @@ struct isl_ctx {
        int                     ref;
 
        isl_int                 one;
+       isl_int                 negone;
 
        int                     n_cached;
        struct isl_blk          cache[ISL_BLK_CACHE_SIZE];
index a556c6e..9ee369f 100644 (file)
--- a/isl_ctx.c
+++ b/isl_ctx.c
@@ -20,6 +20,9 @@ struct isl_ctx *isl_ctx_alloc()
        isl_int_init(ctx->one);
        isl_int_set_si(ctx->one, 1);
 
+       isl_int_init(ctx->negone);
+       isl_int_set_si(ctx->negone, -1);
+
        ctx->n_cached = 0;
 
 #ifdef ISL_POLYLIB
@@ -53,5 +56,6 @@ void isl_ctx_free(struct isl_ctx *ctx)
        isl_hash_table_clear(&ctx->name_hash);
        isl_blk_clear_cache(ctx);
        isl_int_clear(ctx->one);
+       isl_int_clear(ctx->negone);
        free(ctx);
 }