1 #include <cloog/isl/cloog.h>
4 * Allocate and initialize full state.
6 CloogState
*cloog_state_malloc(void)
8 return cloog_isl_state_malloc(NULL
);
12 * Allocate and initialize full state for isl backend.
14 CloogState
*cloog_isl_state_malloc(struct isl_ctx
*ctx
)
19 state
= cloog_core_state_malloc();
21 ctx
= isl_ctx_alloc();
22 state
->backend
= isl_alloc_type(ctx
, CloogBackend
);
23 state
->backend
->ctx
= ctx
;
24 state
->backend
->ctx_allocated
= allocated
;
29 * Free state and backend independent parts.
31 void cloog_state_free(CloogState
*state
)
33 if (state
->backend
->ctx_allocated
)
34 isl_ctx_free(state
->backend
->ctx
);
36 cloog_core_state_free(state
);