4 isl_ctx *isl_ctx_alloc_with_options(struct isl_options *opt)
6 struct isl_ctx *ctx = NULL;
11 ctx = isl_calloc_type(NULL, struct isl_ctx);
15 if (isl_hash_table_init(ctx, &ctx->name_hash, 0))
18 ctx->stats = isl_calloc_type(ctx, struct isl_stats);
25 isl_int_init(ctx->one);
26 isl_int_set_si(ctx->one, 1);
28 isl_int_init(ctx->negone);
29 isl_int_set_si(ctx->negone, -1);
31 isl_int_init(ctx->normalize_gcd);
41 struct isl_ctx *isl_ctx_alloc()
43 struct isl_options *opt;
45 opt = isl_options_new_with_defaults();
47 return isl_ctx_alloc_with_options(opt);
50 void isl_ctx_ref(struct isl_ctx *ctx)
55 void isl_ctx_deref(struct isl_ctx *ctx)
57 isl_assert(ctx, ctx->ref > 0, return);
61 void isl_ctx_free(struct isl_ctx *ctx)
65 isl_assert(ctx, ctx->ref == 0, return);
66 isl_hash_table_clear(&ctx->name_hash);
67 isl_blk_clear_cache(ctx);
68 isl_int_clear(ctx->one);
69 isl_int_clear(ctx->negone);
70 isl_int_clear(ctx->normalize_gcd);
76 struct isl_options *isl_ctx_options(isl_ctx *ctx)