e7966189d31ee35d3e287dde0428486d8166095b
1 import ctypes
, ctypes
.util
3 from . import _islhelper
4 from ._islhelper
import *
12 'isl_basic_set_to_str', 'isl_basic_set_constraints',
13 'isl_set_to_str', 'isl_set_basic_sets',
18 libisl
= ctypes
.CDLL(ctypes
.util
.find_library('isl'))
19 libisl
.isl_dim_set
= _islhelper
.dim_set
21 libisl
.isl_version
.restype
= ctypes
.c_char_p
22 isl_version
= libisl
.isl_version().decode().strip()[len('isl-'):]
25 mainctx
= libisl
.isl_ctx_alloc()
28 libisl
.isl_printer_get_str
.restype
= ctypes
.c_char_p
30 def isl_val_to_int(islval
):
31 islpr
= libisl
.isl_printer_to_str(mainctx
)
32 islpr
= libisl
.isl_printer_print_val(islpr
, islval
)
33 string
= libisl
.isl_printer_get_str(islpr
).decode()
36 def isl_basic_set_to_str(islbset
):
37 islpr
= libisl
.isl_printer_to_str(mainctx
)
38 islpr
= libisl
.isl_printer_print_basic_set(islpr
, islbset
)
39 string
= libisl
.isl_printer_get_str(islpr
).decode()
42 def isl_set_to_str(islset
):
43 islpr
= libisl
.isl_printer_to_str(mainctx
)
44 islpr
= libisl
.isl_printer_print_set(islpr
, islset
)
45 string
= libisl
.isl_printer_get_str(islpr
).decode()