1 import ctypes
, ctypes
.util
11 libisl
= ctypes
.CDLL(ctypes
.util
.find_library('isl'))
13 libisl
.isl_printer_get_str
.restype
= ctypes
.c_char_p
14 libisl
.isl_dim_set
= _isl
.isl_dim_set
21 def __init__(self
, ptr
):
25 def _as_parameter_(self
):
29 class Context(IslObject
):
32 ptr
= libisl
.isl_ctx_alloc()
35 #comment out so does not delete itself after being created
37 # libisl.isl_ctx_free(self)
39 def __eq__(self
, other
):
40 if not isinstance(other
, Context
):
42 return self
._ptr
== other
._ptr
45 class BasicSet(IslObject
):
48 ls
= libisl
.isl_basic_set_get_local_space(self
)
49 ctx
= libisl
.isl_local_space_get_ctx(ls
)
50 p
= libisl
.isl_printer_to_str(ctx
)
51 p
= libisl
.isl_printer_print_basic_set(p
, self
)
52 string
= libisl
.isl_printer_get_str(p
).decode()
56 libisl
.isl_basic_set_free(self
)