3 isl
= cdll
.LoadLibrary("libisl.so")
4 libc
= cdll
.LoadLibrary("libc.so.6")
6 class Error(Exception):
10 defaultInstance
= None
13 ptr
= isl
.isl_ctx_alloc()
17 isl
.isl_ctx_free(self
)
20 return c_void_p(self
.ptr
)
23 def getDefaultInstance():
24 if Context
.defaultInstance
== None:
25 Context
.defaultInstance
= Context()
26 return Context
.defaultInstance
28 isl
.isl_ctx_alloc
.restype
= c_void_p
29 isl
.isl_ctx_free
.argtypes
= [Context
]
31 class union_pw_multi_aff(object):
32 def __init__(self
, *args
, **keywords
):
34 self
.ctx
= keywords
["ctx"]
35 self
.ptr
= keywords
["ptr"]
37 if len(args
) == 1 and args
[0].__class
__ is pw_multi_aff
:
38 self
.ctx
= Context
.getDefaultInstance()
39 self
.ptr
= isl
.isl_union_pw_multi_aff_from_pw_multi_aff(isl
.isl_pw_multi_aff_copy(args
[0].ptr
))
41 if len(args
) == 1 and type(args
[0]) == str:
42 self
.ctx
= Context
.getDefaultInstance()
43 self
.ptr
= isl
.isl_union_pw_multi_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
45 if len(args
) == 1 and args
[0].__class
__ is union_pw_aff
:
46 self
.ctx
= Context
.getDefaultInstance()
47 self
.ptr
= isl
.isl_union_pw_multi_aff_from_union_pw_aff(isl
.isl_union_pw_aff_copy(args
[0].ptr
))
51 if hasattr(self
, 'ptr'):
52 isl
.isl_union_pw_multi_aff_free(self
.ptr
)
55 if not arg0
.__class__
is union_pw_multi_aff
:
56 arg0
= union_pw_multi_aff(arg0
)
59 ptr
= isl
.isl_union_pw_multi_aff_to_str(arg0
.ptr
)
60 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
66 return 'isl.union_pw_multi_aff("""%s""")' % s
68 return 'isl.union_pw_multi_aff("%s")' % s
71 if not arg0
.__class__
is union_pw_multi_aff
:
72 arg0
= union_pw_multi_aff(arg0
)
76 if not arg1
.__class__
is union_pw_multi_aff
:
77 arg1
= union_pw_multi_aff(arg1
)
81 res
= isl
.isl_union_pw_multi_aff_add(isl
.isl_union_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
82 return union_pw_multi_aff(ctx
=ctx
, ptr
=res
)
83 def flat_range_product(arg0
, arg1
):
85 if not arg0
.__class__
is union_pw_multi_aff
:
86 arg0
= union_pw_multi_aff(arg0
)
90 if not arg1
.__class__
is union_pw_multi_aff
:
91 arg1
= union_pw_multi_aff(arg1
)
95 res
= isl
.isl_union_pw_multi_aff_flat_range_product(isl
.isl_union_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
96 return union_pw_multi_aff(ctx
=ctx
, ptr
=res
)
97 def pullback(arg0
, arg1
):
98 if arg1
.__class__
is union_pw_multi_aff
:
99 res
= isl
.isl_union_pw_multi_aff_pullback_union_pw_multi_aff(isl
.isl_union_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
100 return union_pw_multi_aff(ctx
=arg0
.ctx
, ptr
=res
)
101 def union_add(arg0
, arg1
):
103 if not arg0
.__class__
is union_pw_multi_aff
:
104 arg0
= union_pw_multi_aff(arg0
)
108 if not arg1
.__class__
is union_pw_multi_aff
:
109 arg1
= union_pw_multi_aff(arg1
)
113 res
= isl
.isl_union_pw_multi_aff_union_add(isl
.isl_union_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
114 return union_pw_multi_aff(ctx
=ctx
, ptr
=res
)
116 isl
.isl_union_pw_multi_aff_from_pw_multi_aff
.restype
= c_void_p
117 isl
.isl_union_pw_multi_aff_from_pw_multi_aff
.argtypes
= [c_void_p
]
118 isl
.isl_union_pw_multi_aff_read_from_str
.restype
= c_void_p
119 isl
.isl_union_pw_multi_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
120 isl
.isl_union_pw_multi_aff_from_union_pw_aff
.restype
= c_void_p
121 isl
.isl_union_pw_multi_aff_from_union_pw_aff
.argtypes
= [c_void_p
]
122 isl
.isl_union_pw_multi_aff_add
.restype
= c_void_p
123 isl
.isl_union_pw_multi_aff_add
.argtypes
= [c_void_p
, c_void_p
]
124 isl
.isl_union_pw_multi_aff_flat_range_product
.restype
= c_void_p
125 isl
.isl_union_pw_multi_aff_flat_range_product
.argtypes
= [c_void_p
, c_void_p
]
126 isl
.isl_union_pw_multi_aff_pullback_union_pw_multi_aff
.restype
= c_void_p
127 isl
.isl_union_pw_multi_aff_pullback_union_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
128 isl
.isl_union_pw_multi_aff_union_add
.restype
= c_void_p
129 isl
.isl_union_pw_multi_aff_union_add
.argtypes
= [c_void_p
, c_void_p
]
130 isl
.isl_union_pw_multi_aff_copy
.restype
= c_void_p
131 isl
.isl_union_pw_multi_aff_copy
.argtypes
= [c_void_p
]
132 isl
.isl_union_pw_multi_aff_free
.restype
= c_void_p
133 isl
.isl_union_pw_multi_aff_free
.argtypes
= [c_void_p
]
134 isl
.isl_union_pw_multi_aff_to_str
.restype
= POINTER(c_char
)
135 isl
.isl_union_pw_multi_aff_to_str
.argtypes
= [c_void_p
]
137 class multi_union_pw_aff(object):
138 def __init__(self
, *args
, **keywords
):
139 if "ptr" in keywords
:
140 self
.ctx
= keywords
["ctx"]
141 self
.ptr
= keywords
["ptr"]
143 if len(args
) == 1 and args
[0].__class
__ is union_pw_aff
:
144 self
.ctx
= Context
.getDefaultInstance()
145 self
.ptr
= isl
.isl_multi_union_pw_aff_from_union_pw_aff(isl
.isl_union_pw_aff_copy(args
[0].ptr
))
147 if len(args
) == 1 and args
[0].__class
__ is multi_pw_aff
:
148 self
.ctx
= Context
.getDefaultInstance()
149 self
.ptr
= isl
.isl_multi_union_pw_aff_from_multi_pw_aff(isl
.isl_multi_pw_aff_copy(args
[0].ptr
))
151 if len(args
) == 1 and type(args
[0]) == str:
152 self
.ctx
= Context
.getDefaultInstance()
153 self
.ptr
= isl
.isl_multi_union_pw_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
157 if hasattr(self
, 'ptr'):
158 isl
.isl_multi_union_pw_aff_free(self
.ptr
)
161 if not arg0
.__class__
is multi_union_pw_aff
:
162 arg0
= multi_union_pw_aff(arg0
)
165 ptr
= isl
.isl_multi_union_pw_aff_to_str(arg0
.ptr
)
166 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
172 return 'isl.multi_union_pw_aff("""%s""")' % s
174 return 'isl.multi_union_pw_aff("%s")' % s
177 if not arg0
.__class__
is multi_union_pw_aff
:
178 arg0
= multi_union_pw_aff(arg0
)
182 if not arg1
.__class__
is multi_union_pw_aff
:
183 arg1
= multi_union_pw_aff(arg1
)
187 res
= isl
.isl_multi_union_pw_aff_add(isl
.isl_multi_union_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_union_pw_aff_copy(arg1
.ptr
))
188 return multi_union_pw_aff(ctx
=ctx
, ptr
=res
)
189 def flat_range_product(arg0
, arg1
):
191 if not arg0
.__class__
is multi_union_pw_aff
:
192 arg0
= multi_union_pw_aff(arg0
)
196 if not arg1
.__class__
is multi_union_pw_aff
:
197 arg1
= multi_union_pw_aff(arg1
)
201 res
= isl
.isl_multi_union_pw_aff_flat_range_product(isl
.isl_multi_union_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_union_pw_aff_copy(arg1
.ptr
))
202 return multi_union_pw_aff(ctx
=ctx
, ptr
=res
)
203 def pullback(arg0
, arg1
):
204 if arg1
.__class__
is union_pw_multi_aff
:
205 res
= isl
.isl_multi_union_pw_aff_pullback_union_pw_multi_aff(isl
.isl_multi_union_pw_aff_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
206 return multi_union_pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
207 def range_product(arg0
, arg1
):
209 if not arg0
.__class__
is multi_union_pw_aff
:
210 arg0
= multi_union_pw_aff(arg0
)
214 if not arg1
.__class__
is multi_union_pw_aff
:
215 arg1
= multi_union_pw_aff(arg1
)
219 res
= isl
.isl_multi_union_pw_aff_range_product(isl
.isl_multi_union_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_union_pw_aff_copy(arg1
.ptr
))
220 return multi_union_pw_aff(ctx
=ctx
, ptr
=res
)
221 def union_add(arg0
, arg1
):
223 if not arg0
.__class__
is multi_union_pw_aff
:
224 arg0
= multi_union_pw_aff(arg0
)
228 if not arg1
.__class__
is multi_union_pw_aff
:
229 arg1
= multi_union_pw_aff(arg1
)
233 res
= isl
.isl_multi_union_pw_aff_union_add(isl
.isl_multi_union_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_union_pw_aff_copy(arg1
.ptr
))
234 return multi_union_pw_aff(ctx
=ctx
, ptr
=res
)
236 isl
.isl_multi_union_pw_aff_from_union_pw_aff
.restype
= c_void_p
237 isl
.isl_multi_union_pw_aff_from_union_pw_aff
.argtypes
= [c_void_p
]
238 isl
.isl_multi_union_pw_aff_from_multi_pw_aff
.restype
= c_void_p
239 isl
.isl_multi_union_pw_aff_from_multi_pw_aff
.argtypes
= [c_void_p
]
240 isl
.isl_multi_union_pw_aff_read_from_str
.restype
= c_void_p
241 isl
.isl_multi_union_pw_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
242 isl
.isl_multi_union_pw_aff_add
.restype
= c_void_p
243 isl
.isl_multi_union_pw_aff_add
.argtypes
= [c_void_p
, c_void_p
]
244 isl
.isl_multi_union_pw_aff_flat_range_product
.restype
= c_void_p
245 isl
.isl_multi_union_pw_aff_flat_range_product
.argtypes
= [c_void_p
, c_void_p
]
246 isl
.isl_multi_union_pw_aff_pullback_union_pw_multi_aff
.restype
= c_void_p
247 isl
.isl_multi_union_pw_aff_pullback_union_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
248 isl
.isl_multi_union_pw_aff_range_product
.restype
= c_void_p
249 isl
.isl_multi_union_pw_aff_range_product
.argtypes
= [c_void_p
, c_void_p
]
250 isl
.isl_multi_union_pw_aff_union_add
.restype
= c_void_p
251 isl
.isl_multi_union_pw_aff_union_add
.argtypes
= [c_void_p
, c_void_p
]
252 isl
.isl_multi_union_pw_aff_copy
.restype
= c_void_p
253 isl
.isl_multi_union_pw_aff_copy
.argtypes
= [c_void_p
]
254 isl
.isl_multi_union_pw_aff_free
.restype
= c_void_p
255 isl
.isl_multi_union_pw_aff_free
.argtypes
= [c_void_p
]
256 isl
.isl_multi_union_pw_aff_to_str
.restype
= POINTER(c_char
)
257 isl
.isl_multi_union_pw_aff_to_str
.argtypes
= [c_void_p
]
259 class union_pw_aff(union_pw_multi_aff
, multi_union_pw_aff
):
260 def __init__(self
, *args
, **keywords
):
261 if "ptr" in keywords
:
262 self
.ctx
= keywords
["ctx"]
263 self
.ptr
= keywords
["ptr"]
265 if len(args
) == 1 and args
[0].__class
__ is pw_aff
:
266 self
.ctx
= Context
.getDefaultInstance()
267 self
.ptr
= isl
.isl_union_pw_aff_from_pw_aff(isl
.isl_pw_aff_copy(args
[0].ptr
))
269 if len(args
) == 1 and type(args
[0]) == str:
270 self
.ctx
= Context
.getDefaultInstance()
271 self
.ptr
= isl
.isl_union_pw_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
275 if hasattr(self
, 'ptr'):
276 isl
.isl_union_pw_aff_free(self
.ptr
)
279 if not arg0
.__class__
is union_pw_aff
:
280 arg0
= union_pw_aff(arg0
)
283 ptr
= isl
.isl_union_pw_aff_to_str(arg0
.ptr
)
284 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
290 return 'isl.union_pw_aff("""%s""")' % s
292 return 'isl.union_pw_aff("%s")' % s
295 if not arg0
.__class__
is union_pw_aff
:
296 arg0
= union_pw_aff(arg0
)
300 if not arg1
.__class__
is union_pw_aff
:
301 arg1
= union_pw_aff(arg1
)
303 return union_pw_multi_aff(arg0
).add(arg1
)
305 res
= isl
.isl_union_pw_aff_add(isl
.isl_union_pw_aff_copy(arg0
.ptr
), isl
.isl_union_pw_aff_copy(arg1
.ptr
))
306 return union_pw_aff(ctx
=ctx
, ptr
=res
)
307 def pullback(arg0
, arg1
):
308 if arg1
.__class__
is union_pw_multi_aff
:
309 res
= isl
.isl_union_pw_aff_pullback_union_pw_multi_aff(isl
.isl_union_pw_aff_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
310 return union_pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
311 def union_add(arg0
, arg1
):
313 if not arg0
.__class__
is union_pw_aff
:
314 arg0
= union_pw_aff(arg0
)
318 if not arg1
.__class__
is union_pw_aff
:
319 arg1
= union_pw_aff(arg1
)
321 return union_pw_multi_aff(arg0
).union_add(arg1
)
323 res
= isl
.isl_union_pw_aff_union_add(isl
.isl_union_pw_aff_copy(arg0
.ptr
), isl
.isl_union_pw_aff_copy(arg1
.ptr
))
324 return union_pw_aff(ctx
=ctx
, ptr
=res
)
326 isl
.isl_union_pw_aff_from_pw_aff
.restype
= c_void_p
327 isl
.isl_union_pw_aff_from_pw_aff
.argtypes
= [c_void_p
]
328 isl
.isl_union_pw_aff_read_from_str
.restype
= c_void_p
329 isl
.isl_union_pw_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
330 isl
.isl_union_pw_aff_add
.restype
= c_void_p
331 isl
.isl_union_pw_aff_add
.argtypes
= [c_void_p
, c_void_p
]
332 isl
.isl_union_pw_aff_pullback_union_pw_multi_aff
.restype
= c_void_p
333 isl
.isl_union_pw_aff_pullback_union_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
334 isl
.isl_union_pw_aff_union_add
.restype
= c_void_p
335 isl
.isl_union_pw_aff_union_add
.argtypes
= [c_void_p
, c_void_p
]
336 isl
.isl_union_pw_aff_copy
.restype
= c_void_p
337 isl
.isl_union_pw_aff_copy
.argtypes
= [c_void_p
]
338 isl
.isl_union_pw_aff_free
.restype
= c_void_p
339 isl
.isl_union_pw_aff_free
.argtypes
= [c_void_p
]
340 isl
.isl_union_pw_aff_to_str
.restype
= POINTER(c_char
)
341 isl
.isl_union_pw_aff_to_str
.argtypes
= [c_void_p
]
343 class multi_pw_aff(multi_union_pw_aff
):
344 def __init__(self
, *args
, **keywords
):
345 if "ptr" in keywords
:
346 self
.ctx
= keywords
["ctx"]
347 self
.ptr
= keywords
["ptr"]
349 if len(args
) == 1 and args
[0].__class
__ is multi_aff
:
350 self
.ctx
= Context
.getDefaultInstance()
351 self
.ptr
= isl
.isl_multi_pw_aff_from_multi_aff(isl
.isl_multi_aff_copy(args
[0].ptr
))
353 if len(args
) == 1 and args
[0].__class
__ is pw_aff
:
354 self
.ctx
= Context
.getDefaultInstance()
355 self
.ptr
= isl
.isl_multi_pw_aff_from_pw_aff(isl
.isl_pw_aff_copy(args
[0].ptr
))
357 if len(args
) == 1 and args
[0].__class
__ is pw_multi_aff
:
358 self
.ctx
= Context
.getDefaultInstance()
359 self
.ptr
= isl
.isl_multi_pw_aff_from_pw_multi_aff(isl
.isl_pw_multi_aff_copy(args
[0].ptr
))
361 if len(args
) == 1 and type(args
[0]) == str:
362 self
.ctx
= Context
.getDefaultInstance()
363 self
.ptr
= isl
.isl_multi_pw_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
367 if hasattr(self
, 'ptr'):
368 isl
.isl_multi_pw_aff_free(self
.ptr
)
371 if not arg0
.__class__
is multi_pw_aff
:
372 arg0
= multi_pw_aff(arg0
)
375 ptr
= isl
.isl_multi_pw_aff_to_str(arg0
.ptr
)
376 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
382 return 'isl.multi_pw_aff("""%s""")' % s
384 return 'isl.multi_pw_aff("%s")' % s
387 if not arg0
.__class__
is multi_pw_aff
:
388 arg0
= multi_pw_aff(arg0
)
392 if not arg1
.__class__
is multi_pw_aff
:
393 arg1
= multi_pw_aff(arg1
)
395 return multi_union_pw_aff(arg0
).add(arg1
)
397 res
= isl
.isl_multi_pw_aff_add(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
398 return multi_pw_aff(ctx
=ctx
, ptr
=res
)
399 def flat_range_product(arg0
, arg1
):
401 if not arg0
.__class__
is multi_pw_aff
:
402 arg0
= multi_pw_aff(arg0
)
406 if not arg1
.__class__
is multi_pw_aff
:
407 arg1
= multi_pw_aff(arg1
)
409 return multi_union_pw_aff(arg0
).flat_range_product(arg1
)
411 res
= isl
.isl_multi_pw_aff_flat_range_product(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
412 return multi_pw_aff(ctx
=ctx
, ptr
=res
)
413 def product(arg0
, arg1
):
415 if not arg0
.__class__
is multi_pw_aff
:
416 arg0
= multi_pw_aff(arg0
)
420 if not arg1
.__class__
is multi_pw_aff
:
421 arg1
= multi_pw_aff(arg1
)
423 return multi_union_pw_aff(arg0
).product(arg1
)
425 res
= isl
.isl_multi_pw_aff_product(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
426 return multi_pw_aff(ctx
=ctx
, ptr
=res
)
427 def pullback(arg0
, arg1
):
428 if arg1
.__class__
is multi_aff
:
429 res
= isl
.isl_multi_pw_aff_pullback_multi_aff(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
430 return multi_pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
431 if arg1
.__class__
is pw_multi_aff
:
432 res
= isl
.isl_multi_pw_aff_pullback_pw_multi_aff(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
433 return multi_pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
434 if arg1
.__class__
is multi_pw_aff
:
435 res
= isl
.isl_multi_pw_aff_pullback_multi_pw_aff(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
436 return multi_pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
437 def range_product(arg0
, arg1
):
439 if not arg0
.__class__
is multi_pw_aff
:
440 arg0
= multi_pw_aff(arg0
)
444 if not arg1
.__class__
is multi_pw_aff
:
445 arg1
= multi_pw_aff(arg1
)
447 return multi_union_pw_aff(arg0
).range_product(arg1
)
449 res
= isl
.isl_multi_pw_aff_range_product(isl
.isl_multi_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
450 return multi_pw_aff(ctx
=ctx
, ptr
=res
)
452 isl
.isl_multi_pw_aff_from_multi_aff
.restype
= c_void_p
453 isl
.isl_multi_pw_aff_from_multi_aff
.argtypes
= [c_void_p
]
454 isl
.isl_multi_pw_aff_from_pw_aff
.restype
= c_void_p
455 isl
.isl_multi_pw_aff_from_pw_aff
.argtypes
= [c_void_p
]
456 isl
.isl_multi_pw_aff_from_pw_multi_aff
.restype
= c_void_p
457 isl
.isl_multi_pw_aff_from_pw_multi_aff
.argtypes
= [c_void_p
]
458 isl
.isl_multi_pw_aff_read_from_str
.restype
= c_void_p
459 isl
.isl_multi_pw_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
460 isl
.isl_multi_pw_aff_add
.restype
= c_void_p
461 isl
.isl_multi_pw_aff_add
.argtypes
= [c_void_p
, c_void_p
]
462 isl
.isl_multi_pw_aff_flat_range_product
.restype
= c_void_p
463 isl
.isl_multi_pw_aff_flat_range_product
.argtypes
= [c_void_p
, c_void_p
]
464 isl
.isl_multi_pw_aff_product
.restype
= c_void_p
465 isl
.isl_multi_pw_aff_product
.argtypes
= [c_void_p
, c_void_p
]
466 isl
.isl_multi_pw_aff_pullback_multi_aff
.restype
= c_void_p
467 isl
.isl_multi_pw_aff_pullback_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
468 isl
.isl_multi_pw_aff_pullback_pw_multi_aff
.restype
= c_void_p
469 isl
.isl_multi_pw_aff_pullback_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
470 isl
.isl_multi_pw_aff_pullback_multi_pw_aff
.restype
= c_void_p
471 isl
.isl_multi_pw_aff_pullback_multi_pw_aff
.argtypes
= [c_void_p
, c_void_p
]
472 isl
.isl_multi_pw_aff_range_product
.restype
= c_void_p
473 isl
.isl_multi_pw_aff_range_product
.argtypes
= [c_void_p
, c_void_p
]
474 isl
.isl_multi_pw_aff_copy
.restype
= c_void_p
475 isl
.isl_multi_pw_aff_copy
.argtypes
= [c_void_p
]
476 isl
.isl_multi_pw_aff_free
.restype
= c_void_p
477 isl
.isl_multi_pw_aff_free
.argtypes
= [c_void_p
]
478 isl
.isl_multi_pw_aff_to_str
.restype
= POINTER(c_char
)
479 isl
.isl_multi_pw_aff_to_str
.argtypes
= [c_void_p
]
481 class pw_multi_aff(union_pw_multi_aff
, multi_pw_aff
):
482 def __init__(self
, *args
, **keywords
):
483 if "ptr" in keywords
:
484 self
.ctx
= keywords
["ctx"]
485 self
.ptr
= keywords
["ptr"]
487 if len(args
) == 1 and args
[0].__class
__ is multi_aff
:
488 self
.ctx
= Context
.getDefaultInstance()
489 self
.ptr
= isl
.isl_pw_multi_aff_from_multi_aff(isl
.isl_multi_aff_copy(args
[0].ptr
))
491 if len(args
) == 1 and args
[0].__class
__ is pw_aff
:
492 self
.ctx
= Context
.getDefaultInstance()
493 self
.ptr
= isl
.isl_pw_multi_aff_from_pw_aff(isl
.isl_pw_aff_copy(args
[0].ptr
))
495 if len(args
) == 1 and type(args
[0]) == str:
496 self
.ctx
= Context
.getDefaultInstance()
497 self
.ptr
= isl
.isl_pw_multi_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
501 if hasattr(self
, 'ptr'):
502 isl
.isl_pw_multi_aff_free(self
.ptr
)
505 if not arg0
.__class__
is pw_multi_aff
:
506 arg0
= pw_multi_aff(arg0
)
509 ptr
= isl
.isl_pw_multi_aff_to_str(arg0
.ptr
)
510 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
516 return 'isl.pw_multi_aff("""%s""")' % s
518 return 'isl.pw_multi_aff("%s")' % s
521 if not arg0
.__class__
is pw_multi_aff
:
522 arg0
= pw_multi_aff(arg0
)
526 if not arg1
.__class__
is pw_multi_aff
:
527 arg1
= pw_multi_aff(arg1
)
529 return union_pw_multi_aff(arg0
).add(arg1
)
531 res
= isl
.isl_pw_multi_aff_add(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
532 return pw_multi_aff(ctx
=ctx
, ptr
=res
)
533 def flat_range_product(arg0
, arg1
):
535 if not arg0
.__class__
is pw_multi_aff
:
536 arg0
= pw_multi_aff(arg0
)
540 if not arg1
.__class__
is pw_multi_aff
:
541 arg1
= pw_multi_aff(arg1
)
543 return union_pw_multi_aff(arg0
).flat_range_product(arg1
)
545 res
= isl
.isl_pw_multi_aff_flat_range_product(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
546 return pw_multi_aff(ctx
=ctx
, ptr
=res
)
547 def product(arg0
, arg1
):
549 if not arg0
.__class__
is pw_multi_aff
:
550 arg0
= pw_multi_aff(arg0
)
554 if not arg1
.__class__
is pw_multi_aff
:
555 arg1
= pw_multi_aff(arg1
)
557 return union_pw_multi_aff(arg0
).product(arg1
)
559 res
= isl
.isl_pw_multi_aff_product(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
560 return pw_multi_aff(ctx
=ctx
, ptr
=res
)
561 def pullback(arg0
, arg1
):
562 if arg1
.__class__
is multi_aff
:
563 res
= isl
.isl_pw_multi_aff_pullback_multi_aff(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
564 return pw_multi_aff(ctx
=arg0
.ctx
, ptr
=res
)
565 if arg1
.__class__
is pw_multi_aff
:
566 res
= isl
.isl_pw_multi_aff_pullback_pw_multi_aff(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
567 return pw_multi_aff(ctx
=arg0
.ctx
, ptr
=res
)
568 def range_product(arg0
, arg1
):
570 if not arg0
.__class__
is pw_multi_aff
:
571 arg0
= pw_multi_aff(arg0
)
575 if not arg1
.__class__
is pw_multi_aff
:
576 arg1
= pw_multi_aff(arg1
)
578 return union_pw_multi_aff(arg0
).range_product(arg1
)
580 res
= isl
.isl_pw_multi_aff_range_product(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
581 return pw_multi_aff(ctx
=ctx
, ptr
=res
)
582 def union_add(arg0
, arg1
):
584 if not arg0
.__class__
is pw_multi_aff
:
585 arg0
= pw_multi_aff(arg0
)
589 if not arg1
.__class__
is pw_multi_aff
:
590 arg1
= pw_multi_aff(arg1
)
592 return union_pw_multi_aff(arg0
).union_add(arg1
)
594 res
= isl
.isl_pw_multi_aff_union_add(isl
.isl_pw_multi_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
595 return pw_multi_aff(ctx
=ctx
, ptr
=res
)
597 isl
.isl_pw_multi_aff_from_multi_aff
.restype
= c_void_p
598 isl
.isl_pw_multi_aff_from_multi_aff
.argtypes
= [c_void_p
]
599 isl
.isl_pw_multi_aff_from_pw_aff
.restype
= c_void_p
600 isl
.isl_pw_multi_aff_from_pw_aff
.argtypes
= [c_void_p
]
601 isl
.isl_pw_multi_aff_read_from_str
.restype
= c_void_p
602 isl
.isl_pw_multi_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
603 isl
.isl_pw_multi_aff_add
.restype
= c_void_p
604 isl
.isl_pw_multi_aff_add
.argtypes
= [c_void_p
, c_void_p
]
605 isl
.isl_pw_multi_aff_flat_range_product
.restype
= c_void_p
606 isl
.isl_pw_multi_aff_flat_range_product
.argtypes
= [c_void_p
, c_void_p
]
607 isl
.isl_pw_multi_aff_product
.restype
= c_void_p
608 isl
.isl_pw_multi_aff_product
.argtypes
= [c_void_p
, c_void_p
]
609 isl
.isl_pw_multi_aff_pullback_multi_aff
.restype
= c_void_p
610 isl
.isl_pw_multi_aff_pullback_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
611 isl
.isl_pw_multi_aff_pullback_pw_multi_aff
.restype
= c_void_p
612 isl
.isl_pw_multi_aff_pullback_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
613 isl
.isl_pw_multi_aff_range_product
.restype
= c_void_p
614 isl
.isl_pw_multi_aff_range_product
.argtypes
= [c_void_p
, c_void_p
]
615 isl
.isl_pw_multi_aff_union_add
.restype
= c_void_p
616 isl
.isl_pw_multi_aff_union_add
.argtypes
= [c_void_p
, c_void_p
]
617 isl
.isl_pw_multi_aff_copy
.restype
= c_void_p
618 isl
.isl_pw_multi_aff_copy
.argtypes
= [c_void_p
]
619 isl
.isl_pw_multi_aff_free
.restype
= c_void_p
620 isl
.isl_pw_multi_aff_free
.argtypes
= [c_void_p
]
621 isl
.isl_pw_multi_aff_to_str
.restype
= POINTER(c_char
)
622 isl
.isl_pw_multi_aff_to_str
.argtypes
= [c_void_p
]
624 class pw_aff(union_pw_aff
, pw_multi_aff
, multi_pw_aff
):
625 def __init__(self
, *args
, **keywords
):
626 if "ptr" in keywords
:
627 self
.ctx
= keywords
["ctx"]
628 self
.ptr
= keywords
["ptr"]
630 if len(args
) == 1 and args
[0].__class
__ is aff
:
631 self
.ctx
= Context
.getDefaultInstance()
632 self
.ptr
= isl
.isl_pw_aff_from_aff(isl
.isl_aff_copy(args
[0].ptr
))
634 if len(args
) == 1 and type(args
[0]) == str:
635 self
.ctx
= Context
.getDefaultInstance()
636 self
.ptr
= isl
.isl_pw_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
640 if hasattr(self
, 'ptr'):
641 isl
.isl_pw_aff_free(self
.ptr
)
644 if not arg0
.__class__
is pw_aff
:
648 ptr
= isl
.isl_pw_aff_to_str(arg0
.ptr
)
649 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
655 return 'isl.pw_aff("""%s""")' % s
657 return 'isl.pw_aff("%s")' % s
660 if not arg0
.__class__
is pw_aff
:
665 if not arg1
.__class__
is pw_aff
:
668 return union_pw_aff(arg0
).add(arg1
)
670 res
= isl
.isl_pw_aff_add(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
671 return pw_aff(ctx
=ctx
, ptr
=res
)
674 if not arg0
.__class__
is pw_aff
:
679 res
= isl
.isl_pw_aff_ceil(isl
.isl_pw_aff_copy(arg0
.ptr
))
680 return pw_aff(ctx
=ctx
, ptr
=res
)
681 def cond(arg0
, arg1
, arg2
):
683 if not arg0
.__class__
is pw_aff
:
688 if not arg1
.__class__
is pw_aff
:
691 return union_pw_aff(arg0
).cond(arg1
, arg2
)
693 if not arg2
.__class__
is pw_aff
:
696 return union_pw_aff(arg0
).cond(arg1
, arg2
)
698 res
= isl
.isl_pw_aff_cond(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
), isl
.isl_pw_aff_copy(arg2
.ptr
))
699 return pw_aff(ctx
=ctx
, ptr
=res
)
702 if not arg0
.__class__
is pw_aff
:
707 if not arg1
.__class__
is pw_aff
:
710 return union_pw_aff(arg0
).div(arg1
)
712 res
= isl
.isl_pw_aff_div(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
713 return pw_aff(ctx
=ctx
, ptr
=res
)
714 def eq_set(arg0
, arg1
):
716 if not arg0
.__class__
is pw_aff
:
721 if not arg1
.__class__
is pw_aff
:
724 return union_pw_aff(arg0
).eq_set(arg1
)
726 res
= isl
.isl_pw_aff_eq_set(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
727 return set(ctx
=ctx
, ptr
=res
)
730 if not arg0
.__class__
is pw_aff
:
735 res
= isl
.isl_pw_aff_floor(isl
.isl_pw_aff_copy(arg0
.ptr
))
736 return pw_aff(ctx
=ctx
, ptr
=res
)
737 def ge_set(arg0
, arg1
):
739 if not arg0
.__class__
is pw_aff
:
744 if not arg1
.__class__
is pw_aff
:
747 return union_pw_aff(arg0
).ge_set(arg1
)
749 res
= isl
.isl_pw_aff_ge_set(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
750 return set(ctx
=ctx
, ptr
=res
)
751 def gt_set(arg0
, arg1
):
753 if not arg0
.__class__
is pw_aff
:
758 if not arg1
.__class__
is pw_aff
:
761 return union_pw_aff(arg0
).gt_set(arg1
)
763 res
= isl
.isl_pw_aff_gt_set(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
764 return set(ctx
=ctx
, ptr
=res
)
765 def le_set(arg0
, arg1
):
767 if not arg0
.__class__
is pw_aff
:
772 if not arg1
.__class__
is pw_aff
:
775 return union_pw_aff(arg0
).le_set(arg1
)
777 res
= isl
.isl_pw_aff_le_set(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
778 return set(ctx
=ctx
, ptr
=res
)
779 def lt_set(arg0
, arg1
):
781 if not arg0
.__class__
is pw_aff
:
786 if not arg1
.__class__
is pw_aff
:
789 return union_pw_aff(arg0
).lt_set(arg1
)
791 res
= isl
.isl_pw_aff_lt_set(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
792 return set(ctx
=ctx
, ptr
=res
)
795 if not arg0
.__class__
is pw_aff
:
800 if not arg1
.__class__
is pw_aff
:
803 return union_pw_aff(arg0
).max(arg1
)
805 res
= isl
.isl_pw_aff_max(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
806 return pw_aff(ctx
=ctx
, ptr
=res
)
809 if not arg0
.__class__
is pw_aff
:
814 if not arg1
.__class__
is pw_aff
:
817 return union_pw_aff(arg0
).min(arg1
)
819 res
= isl
.isl_pw_aff_min(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
820 return pw_aff(ctx
=ctx
, ptr
=res
)
822 if arg1
.__class__
is val
:
823 res
= isl
.isl_pw_aff_mod_val(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
824 return pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
827 if not arg0
.__class__
is pw_aff
:
832 if not arg1
.__class__
is pw_aff
:
835 return union_pw_aff(arg0
).mul(arg1
)
837 res
= isl
.isl_pw_aff_mul(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
838 return pw_aff(ctx
=ctx
, ptr
=res
)
839 def ne_set(arg0
, arg1
):
841 if not arg0
.__class__
is pw_aff
:
846 if not arg1
.__class__
is pw_aff
:
849 return union_pw_aff(arg0
).ne_set(arg1
)
851 res
= isl
.isl_pw_aff_ne_set(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
852 return set(ctx
=ctx
, ptr
=res
)
855 if not arg0
.__class__
is pw_aff
:
860 res
= isl
.isl_pw_aff_neg(isl
.isl_pw_aff_copy(arg0
.ptr
))
861 return pw_aff(ctx
=ctx
, ptr
=res
)
862 def pullback(arg0
, arg1
):
863 if arg1
.__class__
is multi_aff
:
864 res
= isl
.isl_pw_aff_pullback_multi_aff(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
865 return pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
866 if arg1
.__class__
is pw_multi_aff
:
867 res
= isl
.isl_pw_aff_pullback_pw_multi_aff(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
868 return pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
869 if arg1
.__class__
is multi_pw_aff
:
870 res
= isl
.isl_pw_aff_pullback_multi_pw_aff(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
871 return pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
872 def scale(arg0
, arg1
):
873 if arg1
.__class__
is val
:
874 res
= isl
.isl_pw_aff_scale_val(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
875 return pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
876 def scale_down(arg0
, arg1
):
877 if arg1
.__class__
is val
:
878 res
= isl
.isl_pw_aff_scale_down_val(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
879 return pw_aff(ctx
=arg0
.ctx
, ptr
=res
)
882 if not arg0
.__class__
is pw_aff
:
887 if not arg1
.__class__
is pw_aff
:
890 return union_pw_aff(arg0
).sub(arg1
)
892 res
= isl
.isl_pw_aff_sub(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
893 return pw_aff(ctx
=ctx
, ptr
=res
)
894 def tdiv_q(arg0
, arg1
):
896 if not arg0
.__class__
is pw_aff
:
901 if not arg1
.__class__
is pw_aff
:
904 return union_pw_aff(arg0
).tdiv_q(arg1
)
906 res
= isl
.isl_pw_aff_tdiv_q(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
907 return pw_aff(ctx
=ctx
, ptr
=res
)
908 def tdiv_r(arg0
, arg1
):
910 if not arg0
.__class__
is pw_aff
:
915 if not arg1
.__class__
is pw_aff
:
918 return union_pw_aff(arg0
).tdiv_r(arg1
)
920 res
= isl
.isl_pw_aff_tdiv_r(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
921 return pw_aff(ctx
=ctx
, ptr
=res
)
922 def union_add(arg0
, arg1
):
924 if not arg0
.__class__
is pw_aff
:
929 if not arg1
.__class__
is pw_aff
:
932 return union_pw_aff(arg0
).union_add(arg1
)
934 res
= isl
.isl_pw_aff_union_add(isl
.isl_pw_aff_copy(arg0
.ptr
), isl
.isl_pw_aff_copy(arg1
.ptr
))
935 return pw_aff(ctx
=ctx
, ptr
=res
)
937 isl
.isl_pw_aff_from_aff
.restype
= c_void_p
938 isl
.isl_pw_aff_from_aff
.argtypes
= [c_void_p
]
939 isl
.isl_pw_aff_read_from_str
.restype
= c_void_p
940 isl
.isl_pw_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
941 isl
.isl_pw_aff_add
.restype
= c_void_p
942 isl
.isl_pw_aff_add
.argtypes
= [c_void_p
, c_void_p
]
943 isl
.isl_pw_aff_ceil
.restype
= c_void_p
944 isl
.isl_pw_aff_ceil
.argtypes
= [c_void_p
]
945 isl
.isl_pw_aff_cond
.restype
= c_void_p
946 isl
.isl_pw_aff_cond
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
947 isl
.isl_pw_aff_div
.restype
= c_void_p
948 isl
.isl_pw_aff_div
.argtypes
= [c_void_p
, c_void_p
]
949 isl
.isl_pw_aff_eq_set
.restype
= c_void_p
950 isl
.isl_pw_aff_eq_set
.argtypes
= [c_void_p
, c_void_p
]
951 isl
.isl_pw_aff_floor
.restype
= c_void_p
952 isl
.isl_pw_aff_floor
.argtypes
= [c_void_p
]
953 isl
.isl_pw_aff_ge_set
.restype
= c_void_p
954 isl
.isl_pw_aff_ge_set
.argtypes
= [c_void_p
, c_void_p
]
955 isl
.isl_pw_aff_gt_set
.restype
= c_void_p
956 isl
.isl_pw_aff_gt_set
.argtypes
= [c_void_p
, c_void_p
]
957 isl
.isl_pw_aff_le_set
.restype
= c_void_p
958 isl
.isl_pw_aff_le_set
.argtypes
= [c_void_p
, c_void_p
]
959 isl
.isl_pw_aff_lt_set
.restype
= c_void_p
960 isl
.isl_pw_aff_lt_set
.argtypes
= [c_void_p
, c_void_p
]
961 isl
.isl_pw_aff_max
.restype
= c_void_p
962 isl
.isl_pw_aff_max
.argtypes
= [c_void_p
, c_void_p
]
963 isl
.isl_pw_aff_min
.restype
= c_void_p
964 isl
.isl_pw_aff_min
.argtypes
= [c_void_p
, c_void_p
]
965 isl
.isl_pw_aff_mod_val
.restype
= c_void_p
966 isl
.isl_pw_aff_mod_val
.argtypes
= [c_void_p
, c_void_p
]
967 isl
.isl_pw_aff_mul
.restype
= c_void_p
968 isl
.isl_pw_aff_mul
.argtypes
= [c_void_p
, c_void_p
]
969 isl
.isl_pw_aff_ne_set
.restype
= c_void_p
970 isl
.isl_pw_aff_ne_set
.argtypes
= [c_void_p
, c_void_p
]
971 isl
.isl_pw_aff_neg
.restype
= c_void_p
972 isl
.isl_pw_aff_neg
.argtypes
= [c_void_p
]
973 isl
.isl_pw_aff_pullback_multi_aff
.restype
= c_void_p
974 isl
.isl_pw_aff_pullback_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
975 isl
.isl_pw_aff_pullback_pw_multi_aff
.restype
= c_void_p
976 isl
.isl_pw_aff_pullback_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
977 isl
.isl_pw_aff_pullback_multi_pw_aff
.restype
= c_void_p
978 isl
.isl_pw_aff_pullback_multi_pw_aff
.argtypes
= [c_void_p
, c_void_p
]
979 isl
.isl_pw_aff_scale_val
.restype
= c_void_p
980 isl
.isl_pw_aff_scale_val
.argtypes
= [c_void_p
, c_void_p
]
981 isl
.isl_pw_aff_scale_down_val
.restype
= c_void_p
982 isl
.isl_pw_aff_scale_down_val
.argtypes
= [c_void_p
, c_void_p
]
983 isl
.isl_pw_aff_sub
.restype
= c_void_p
984 isl
.isl_pw_aff_sub
.argtypes
= [c_void_p
, c_void_p
]
985 isl
.isl_pw_aff_tdiv_q
.restype
= c_void_p
986 isl
.isl_pw_aff_tdiv_q
.argtypes
= [c_void_p
, c_void_p
]
987 isl
.isl_pw_aff_tdiv_r
.restype
= c_void_p
988 isl
.isl_pw_aff_tdiv_r
.argtypes
= [c_void_p
, c_void_p
]
989 isl
.isl_pw_aff_union_add
.restype
= c_void_p
990 isl
.isl_pw_aff_union_add
.argtypes
= [c_void_p
, c_void_p
]
991 isl
.isl_pw_aff_copy
.restype
= c_void_p
992 isl
.isl_pw_aff_copy
.argtypes
= [c_void_p
]
993 isl
.isl_pw_aff_free
.restype
= c_void_p
994 isl
.isl_pw_aff_free
.argtypes
= [c_void_p
]
995 isl
.isl_pw_aff_to_str
.restype
= POINTER(c_char
)
996 isl
.isl_pw_aff_to_str
.argtypes
= [c_void_p
]
998 class multi_aff(pw_multi_aff
, multi_pw_aff
):
999 def __init__(self
, *args
, **keywords
):
1000 if "ptr" in keywords
:
1001 self
.ctx
= keywords
["ctx"]
1002 self
.ptr
= keywords
["ptr"]
1004 if len(args
) == 1 and args
[0].__class
__ is aff
:
1005 self
.ctx
= Context
.getDefaultInstance()
1006 self
.ptr
= isl
.isl_multi_aff_from_aff(isl
.isl_aff_copy(args
[0].ptr
))
1008 if len(args
) == 1 and type(args
[0]) == str:
1009 self
.ctx
= Context
.getDefaultInstance()
1010 self
.ptr
= isl
.isl_multi_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
1014 if hasattr(self
, 'ptr'):
1015 isl
.isl_multi_aff_free(self
.ptr
)
1018 if not arg0
.__class__
is multi_aff
:
1019 arg0
= multi_aff(arg0
)
1022 ptr
= isl
.isl_multi_aff_to_str(arg0
.ptr
)
1023 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
1029 return 'isl.multi_aff("""%s""")' % s
1031 return 'isl.multi_aff("%s")' % s
1032 def add(arg0
, arg1
):
1034 if not arg0
.__class__
is multi_aff
:
1035 arg0
= multi_aff(arg0
)
1039 if not arg1
.__class__
is multi_aff
:
1040 arg1
= multi_aff(arg1
)
1042 return pw_multi_aff(arg0
).add(arg1
)
1044 res
= isl
.isl_multi_aff_add(isl
.isl_multi_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
1045 return multi_aff(ctx
=ctx
, ptr
=res
)
1046 def flat_range_product(arg0
, arg1
):
1048 if not arg0
.__class__
is multi_aff
:
1049 arg0
= multi_aff(arg0
)
1053 if not arg1
.__class__
is multi_aff
:
1054 arg1
= multi_aff(arg1
)
1056 return pw_multi_aff(arg0
).flat_range_product(arg1
)
1058 res
= isl
.isl_multi_aff_flat_range_product(isl
.isl_multi_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
1059 return multi_aff(ctx
=ctx
, ptr
=res
)
1060 def product(arg0
, arg1
):
1062 if not arg0
.__class__
is multi_aff
:
1063 arg0
= multi_aff(arg0
)
1067 if not arg1
.__class__
is multi_aff
:
1068 arg1
= multi_aff(arg1
)
1070 return pw_multi_aff(arg0
).product(arg1
)
1072 res
= isl
.isl_multi_aff_product(isl
.isl_multi_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
1073 return multi_aff(ctx
=ctx
, ptr
=res
)
1074 def pullback(arg0
, arg1
):
1075 if arg1
.__class__
is multi_aff
:
1076 res
= isl
.isl_multi_aff_pullback_multi_aff(isl
.isl_multi_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
1077 return multi_aff(ctx
=arg0
.ctx
, ptr
=res
)
1078 def range_product(arg0
, arg1
):
1080 if not arg0
.__class__
is multi_aff
:
1081 arg0
= multi_aff(arg0
)
1085 if not arg1
.__class__
is multi_aff
:
1086 arg1
= multi_aff(arg1
)
1088 return pw_multi_aff(arg0
).range_product(arg1
)
1090 res
= isl
.isl_multi_aff_range_product(isl
.isl_multi_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
1091 return multi_aff(ctx
=ctx
, ptr
=res
)
1093 isl
.isl_multi_aff_from_aff
.restype
= c_void_p
1094 isl
.isl_multi_aff_from_aff
.argtypes
= [c_void_p
]
1095 isl
.isl_multi_aff_read_from_str
.restype
= c_void_p
1096 isl
.isl_multi_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
1097 isl
.isl_multi_aff_add
.restype
= c_void_p
1098 isl
.isl_multi_aff_add
.argtypes
= [c_void_p
, c_void_p
]
1099 isl
.isl_multi_aff_flat_range_product
.restype
= c_void_p
1100 isl
.isl_multi_aff_flat_range_product
.argtypes
= [c_void_p
, c_void_p
]
1101 isl
.isl_multi_aff_product
.restype
= c_void_p
1102 isl
.isl_multi_aff_product
.argtypes
= [c_void_p
, c_void_p
]
1103 isl
.isl_multi_aff_pullback_multi_aff
.restype
= c_void_p
1104 isl
.isl_multi_aff_pullback_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
1105 isl
.isl_multi_aff_range_product
.restype
= c_void_p
1106 isl
.isl_multi_aff_range_product
.argtypes
= [c_void_p
, c_void_p
]
1107 isl
.isl_multi_aff_copy
.restype
= c_void_p
1108 isl
.isl_multi_aff_copy
.argtypes
= [c_void_p
]
1109 isl
.isl_multi_aff_free
.restype
= c_void_p
1110 isl
.isl_multi_aff_free
.argtypes
= [c_void_p
]
1111 isl
.isl_multi_aff_to_str
.restype
= POINTER(c_char
)
1112 isl
.isl_multi_aff_to_str
.argtypes
= [c_void_p
]
1114 class aff(pw_aff
, multi_aff
):
1115 def __init__(self
, *args
, **keywords
):
1116 if "ptr" in keywords
:
1117 self
.ctx
= keywords
["ctx"]
1118 self
.ptr
= keywords
["ptr"]
1120 if len(args
) == 1 and type(args
[0]) == str:
1121 self
.ctx
= Context
.getDefaultInstance()
1122 self
.ptr
= isl
.isl_aff_read_from_str(self
.ctx
, args
[0].encode('ascii'))
1126 if hasattr(self
, 'ptr'):
1127 isl
.isl_aff_free(self
.ptr
)
1130 if not arg0
.__class__
is aff
:
1134 ptr
= isl
.isl_aff_to_str(arg0
.ptr
)
1135 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
1141 return 'isl.aff("""%s""")' % s
1143 return 'isl.aff("%s")' % s
1144 def add(arg0
, arg1
):
1146 if not arg0
.__class__
is aff
:
1151 if not arg1
.__class__
is aff
:
1154 return pw_aff(arg0
).add(arg1
)
1156 res
= isl
.isl_aff_add(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1157 return aff(ctx
=ctx
, ptr
=res
)
1160 if not arg0
.__class__
is aff
:
1165 res
= isl
.isl_aff_ceil(isl
.isl_aff_copy(arg0
.ptr
))
1166 return aff(ctx
=ctx
, ptr
=res
)
1167 def div(arg0
, arg1
):
1169 if not arg0
.__class__
is aff
:
1174 if not arg1
.__class__
is aff
:
1177 return pw_aff(arg0
).div(arg1
)
1179 res
= isl
.isl_aff_div(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1180 return aff(ctx
=ctx
, ptr
=res
)
1181 def eq_set(arg0
, arg1
):
1183 if not arg0
.__class__
is aff
:
1188 if not arg1
.__class__
is aff
:
1191 return pw_aff(arg0
).eq_set(arg1
)
1193 res
= isl
.isl_aff_eq_set(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1194 return set(ctx
=ctx
, ptr
=res
)
1197 if not arg0
.__class__
is aff
:
1202 res
= isl
.isl_aff_floor(isl
.isl_aff_copy(arg0
.ptr
))
1203 return aff(ctx
=ctx
, ptr
=res
)
1204 def ge_set(arg0
, arg1
):
1206 if not arg0
.__class__
is aff
:
1211 if not arg1
.__class__
is aff
:
1214 return pw_aff(arg0
).ge_set(arg1
)
1216 res
= isl
.isl_aff_ge_set(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1217 return set(ctx
=ctx
, ptr
=res
)
1218 def gt_set(arg0
, arg1
):
1220 if not arg0
.__class__
is aff
:
1225 if not arg1
.__class__
is aff
:
1228 return pw_aff(arg0
).gt_set(arg1
)
1230 res
= isl
.isl_aff_gt_set(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1231 return set(ctx
=ctx
, ptr
=res
)
1232 def le_set(arg0
, arg1
):
1234 if not arg0
.__class__
is aff
:
1239 if not arg1
.__class__
is aff
:
1242 return pw_aff(arg0
).le_set(arg1
)
1244 res
= isl
.isl_aff_le_set(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1245 return set(ctx
=ctx
, ptr
=res
)
1246 def lt_set(arg0
, arg1
):
1248 if not arg0
.__class__
is aff
:
1253 if not arg1
.__class__
is aff
:
1256 return pw_aff(arg0
).lt_set(arg1
)
1258 res
= isl
.isl_aff_lt_set(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1259 return set(ctx
=ctx
, ptr
=res
)
1260 def mod(arg0
, arg1
):
1261 if arg1
.__class__
is val
:
1262 res
= isl
.isl_aff_mod_val(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
1263 return aff(ctx
=arg0
.ctx
, ptr
=res
)
1264 def mul(arg0
, arg1
):
1266 if not arg0
.__class__
is aff
:
1271 if not arg1
.__class__
is aff
:
1274 return pw_aff(arg0
).mul(arg1
)
1276 res
= isl
.isl_aff_mul(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1277 return aff(ctx
=ctx
, ptr
=res
)
1278 def ne_set(arg0
, arg1
):
1280 if not arg0
.__class__
is aff
:
1285 if not arg1
.__class__
is aff
:
1288 return pw_aff(arg0
).ne_set(arg1
)
1290 res
= isl
.isl_aff_ne_set(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1291 return set(ctx
=ctx
, ptr
=res
)
1294 if not arg0
.__class__
is aff
:
1299 res
= isl
.isl_aff_neg(isl
.isl_aff_copy(arg0
.ptr
))
1300 return aff(ctx
=ctx
, ptr
=res
)
1301 def pullback(arg0
, arg1
):
1302 if arg1
.__class__
is multi_aff
:
1303 res
= isl
.isl_aff_pullback_multi_aff(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
1304 return aff(ctx
=arg0
.ctx
, ptr
=res
)
1305 def scale(arg0
, arg1
):
1306 if arg1
.__class__
is val
:
1307 res
= isl
.isl_aff_scale_val(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
1308 return aff(ctx
=arg0
.ctx
, ptr
=res
)
1309 def scale_down(arg0
, arg1
):
1310 if arg1
.__class__
is val
:
1311 res
= isl
.isl_aff_scale_down_val(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
1312 return aff(ctx
=arg0
.ctx
, ptr
=res
)
1313 def sub(arg0
, arg1
):
1315 if not arg0
.__class__
is aff
:
1320 if not arg1
.__class__
is aff
:
1323 return pw_aff(arg0
).sub(arg1
)
1325 res
= isl
.isl_aff_sub(isl
.isl_aff_copy(arg0
.ptr
), isl
.isl_aff_copy(arg1
.ptr
))
1326 return aff(ctx
=ctx
, ptr
=res
)
1328 isl
.isl_aff_read_from_str
.restype
= c_void_p
1329 isl
.isl_aff_read_from_str
.argtypes
= [Context
, c_char_p
]
1330 isl
.isl_aff_add
.restype
= c_void_p
1331 isl
.isl_aff_add
.argtypes
= [c_void_p
, c_void_p
]
1332 isl
.isl_aff_ceil
.restype
= c_void_p
1333 isl
.isl_aff_ceil
.argtypes
= [c_void_p
]
1334 isl
.isl_aff_div
.restype
= c_void_p
1335 isl
.isl_aff_div
.argtypes
= [c_void_p
, c_void_p
]
1336 isl
.isl_aff_eq_set
.restype
= c_void_p
1337 isl
.isl_aff_eq_set
.argtypes
= [c_void_p
, c_void_p
]
1338 isl
.isl_aff_floor
.restype
= c_void_p
1339 isl
.isl_aff_floor
.argtypes
= [c_void_p
]
1340 isl
.isl_aff_ge_set
.restype
= c_void_p
1341 isl
.isl_aff_ge_set
.argtypes
= [c_void_p
, c_void_p
]
1342 isl
.isl_aff_gt_set
.restype
= c_void_p
1343 isl
.isl_aff_gt_set
.argtypes
= [c_void_p
, c_void_p
]
1344 isl
.isl_aff_le_set
.restype
= c_void_p
1345 isl
.isl_aff_le_set
.argtypes
= [c_void_p
, c_void_p
]
1346 isl
.isl_aff_lt_set
.restype
= c_void_p
1347 isl
.isl_aff_lt_set
.argtypes
= [c_void_p
, c_void_p
]
1348 isl
.isl_aff_mod_val
.restype
= c_void_p
1349 isl
.isl_aff_mod_val
.argtypes
= [c_void_p
, c_void_p
]
1350 isl
.isl_aff_mul
.restype
= c_void_p
1351 isl
.isl_aff_mul
.argtypes
= [c_void_p
, c_void_p
]
1352 isl
.isl_aff_ne_set
.restype
= c_void_p
1353 isl
.isl_aff_ne_set
.argtypes
= [c_void_p
, c_void_p
]
1354 isl
.isl_aff_neg
.restype
= c_void_p
1355 isl
.isl_aff_neg
.argtypes
= [c_void_p
]
1356 isl
.isl_aff_pullback_multi_aff
.restype
= c_void_p
1357 isl
.isl_aff_pullback_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
1358 isl
.isl_aff_scale_val
.restype
= c_void_p
1359 isl
.isl_aff_scale_val
.argtypes
= [c_void_p
, c_void_p
]
1360 isl
.isl_aff_scale_down_val
.restype
= c_void_p
1361 isl
.isl_aff_scale_down_val
.argtypes
= [c_void_p
, c_void_p
]
1362 isl
.isl_aff_sub
.restype
= c_void_p
1363 isl
.isl_aff_sub
.argtypes
= [c_void_p
, c_void_p
]
1364 isl
.isl_aff_copy
.restype
= c_void_p
1365 isl
.isl_aff_copy
.argtypes
= [c_void_p
]
1366 isl
.isl_aff_free
.restype
= c_void_p
1367 isl
.isl_aff_free
.argtypes
= [c_void_p
]
1368 isl
.isl_aff_to_str
.restype
= POINTER(c_char
)
1369 isl
.isl_aff_to_str
.argtypes
= [c_void_p
]
1371 class ast_build(object):
1372 def __init__(self
, *args
, **keywords
):
1373 if "ptr" in keywords
:
1374 self
.ctx
= keywords
["ctx"]
1375 self
.ptr
= keywords
["ptr"]
1378 self
.ctx
= Context
.getDefaultInstance()
1379 self
.ptr
= isl
.isl_ast_build_alloc(self
.ctx
)
1383 if hasattr(self
, 'ptr'):
1384 isl
.isl_ast_build_free(self
.ptr
)
1385 def access_from(arg0
, arg1
):
1386 if arg1
.__class__
is pw_multi_aff
:
1387 res
= isl
.isl_ast_build_access_from_pw_multi_aff(arg0
.ptr
, isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
1388 return ast_expr(ctx
=arg0
.ctx
, ptr
=res
)
1389 if arg1
.__class__
is multi_pw_aff
:
1390 res
= isl
.isl_ast_build_access_from_multi_pw_aff(arg0
.ptr
, isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
1391 return ast_expr(ctx
=arg0
.ctx
, ptr
=res
)
1392 def call_from(arg0
, arg1
):
1393 if arg1
.__class__
is pw_multi_aff
:
1394 res
= isl
.isl_ast_build_call_from_pw_multi_aff(arg0
.ptr
, isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
1395 return ast_expr(ctx
=arg0
.ctx
, ptr
=res
)
1396 if arg1
.__class__
is multi_pw_aff
:
1397 res
= isl
.isl_ast_build_call_from_multi_pw_aff(arg0
.ptr
, isl
.isl_multi_pw_aff_copy(arg1
.ptr
))
1398 return ast_expr(ctx
=arg0
.ctx
, ptr
=res
)
1399 def expr_from(arg0
, arg1
):
1400 if arg1
.__class__
is set:
1401 res
= isl
.isl_ast_build_expr_from_set(arg0
.ptr
, isl
.isl_set_copy(arg1
.ptr
))
1402 return ast_expr(ctx
=arg0
.ctx
, ptr
=res
)
1403 if arg1
.__class__
is pw_aff
:
1404 res
= isl
.isl_ast_build_expr_from_pw_aff(arg0
.ptr
, isl
.isl_pw_aff_copy(arg1
.ptr
))
1405 return ast_expr(ctx
=arg0
.ctx
, ptr
=res
)
1407 def from_context(arg0
):
1409 if not arg0
.__class__
is set:
1414 res
= isl
.isl_ast_build_from_context(isl
.isl_set_copy(arg0
.ptr
))
1415 return ast_build(ctx
=ctx
, ptr
=res
)
1416 def node_from_schedule_map(arg0
, arg1
):
1418 if not arg0
.__class__
is ast_build
:
1419 arg0
= ast_build(arg0
)
1423 if not arg1
.__class__
is union_map
:
1424 arg1
= union_map(arg1
)
1428 res
= isl
.isl_ast_build_node_from_schedule_map(arg0
.ptr
, isl
.isl_union_map_copy(arg1
.ptr
))
1429 return ast_node(ctx
=ctx
, ptr
=res
)
1431 isl
.isl_ast_build_alloc
.restype
= c_void_p
1432 isl
.isl_ast_build_alloc
.argtypes
= [Context
]
1433 isl
.isl_ast_build_access_from_pw_multi_aff
.restype
= c_void_p
1434 isl
.isl_ast_build_access_from_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
1435 isl
.isl_ast_build_access_from_multi_pw_aff
.restype
= c_void_p
1436 isl
.isl_ast_build_access_from_multi_pw_aff
.argtypes
= [c_void_p
, c_void_p
]
1437 isl
.isl_ast_build_call_from_pw_multi_aff
.restype
= c_void_p
1438 isl
.isl_ast_build_call_from_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
1439 isl
.isl_ast_build_call_from_multi_pw_aff
.restype
= c_void_p
1440 isl
.isl_ast_build_call_from_multi_pw_aff
.argtypes
= [c_void_p
, c_void_p
]
1441 isl
.isl_ast_build_expr_from_set
.restype
= c_void_p
1442 isl
.isl_ast_build_expr_from_set
.argtypes
= [c_void_p
, c_void_p
]
1443 isl
.isl_ast_build_expr_from_pw_aff
.restype
= c_void_p
1444 isl
.isl_ast_build_expr_from_pw_aff
.argtypes
= [c_void_p
, c_void_p
]
1445 isl
.isl_ast_build_from_context
.restype
= c_void_p
1446 isl
.isl_ast_build_from_context
.argtypes
= [c_void_p
]
1447 isl
.isl_ast_build_node_from_schedule_map
.restype
= c_void_p
1448 isl
.isl_ast_build_node_from_schedule_map
.argtypes
= [c_void_p
, c_void_p
]
1449 isl
.isl_ast_build_copy
.restype
= c_void_p
1450 isl
.isl_ast_build_copy
.argtypes
= [c_void_p
]
1451 isl
.isl_ast_build_free
.restype
= c_void_p
1452 isl
.isl_ast_build_free
.argtypes
= [c_void_p
]
1454 class ast_expr(object):
1455 def __init__(self
, *args
, **keywords
):
1456 if "ptr" in keywords
:
1457 self
.ctx
= keywords
["ctx"]
1458 self
.ptr
= keywords
["ptr"]
1462 if hasattr(self
, 'ptr'):
1463 isl
.isl_ast_expr_free(self
.ptr
)
1466 if not arg0
.__class__
is ast_expr
:
1467 arg0
= ast_expr(arg0
)
1470 ptr
= isl
.isl_ast_expr_to_str(arg0
.ptr
)
1471 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
1477 return 'isl.ast_expr("""%s""")' % s
1479 return 'isl.ast_expr("%s")' % s
1482 if not arg0
.__class__
is ast_expr
:
1483 arg0
= ast_expr(arg0
)
1487 res
= isl
.isl_ast_expr_to_C_str(arg0
.ptr
)
1490 string
= cast(res
, c_char_p
).value
.decode('ascii')
1494 isl
.isl_ast_expr_to_C_str
.restype
= POINTER(c_char
)
1495 isl
.isl_ast_expr_to_C_str
.argtypes
= [c_void_p
]
1496 isl
.isl_ast_expr_copy
.restype
= c_void_p
1497 isl
.isl_ast_expr_copy
.argtypes
= [c_void_p
]
1498 isl
.isl_ast_expr_free
.restype
= c_void_p
1499 isl
.isl_ast_expr_free
.argtypes
= [c_void_p
]
1500 isl
.isl_ast_expr_to_str
.restype
= POINTER(c_char
)
1501 isl
.isl_ast_expr_to_str
.argtypes
= [c_void_p
]
1503 class ast_node(object):
1504 def __init__(self
, *args
, **keywords
):
1505 if "ptr" in keywords
:
1506 self
.ctx
= keywords
["ctx"]
1507 self
.ptr
= keywords
["ptr"]
1511 if hasattr(self
, 'ptr'):
1512 isl
.isl_ast_node_free(self
.ptr
)
1515 if not arg0
.__class__
is ast_node
:
1516 arg0
= ast_node(arg0
)
1519 ptr
= isl
.isl_ast_node_to_str(arg0
.ptr
)
1520 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
1526 return 'isl.ast_node("""%s""")' % s
1528 return 'isl.ast_node("%s")' % s
1531 if not arg0
.__class__
is ast_node
:
1532 arg0
= ast_node(arg0
)
1536 res
= isl
.isl_ast_node_to_C_str(arg0
.ptr
)
1539 string
= cast(res
, c_char_p
).value
.decode('ascii')
1543 isl
.isl_ast_node_to_C_str
.restype
= POINTER(c_char
)
1544 isl
.isl_ast_node_to_C_str
.argtypes
= [c_void_p
]
1545 isl
.isl_ast_node_copy
.restype
= c_void_p
1546 isl
.isl_ast_node_copy
.argtypes
= [c_void_p
]
1547 isl
.isl_ast_node_free
.restype
= c_void_p
1548 isl
.isl_ast_node_free
.argtypes
= [c_void_p
]
1549 isl
.isl_ast_node_to_str
.restype
= POINTER(c_char
)
1550 isl
.isl_ast_node_to_str
.argtypes
= [c_void_p
]
1552 class union_map(object):
1553 def __init__(self
, *args
, **keywords
):
1554 if "ptr" in keywords
:
1555 self
.ctx
= keywords
["ctx"]
1556 self
.ptr
= keywords
["ptr"]
1558 if len(args
) == 1 and args
[0].__class
__ is basic_map
:
1559 self
.ctx
= Context
.getDefaultInstance()
1560 self
.ptr
= isl
.isl_union_map_from_basic_map(isl
.isl_basic_map_copy(args
[0].ptr
))
1562 if len(args
) == 1 and args
[0].__class
__ is map:
1563 self
.ctx
= Context
.getDefaultInstance()
1564 self
.ptr
= isl
.isl_union_map_from_map(isl
.isl_map_copy(args
[0].ptr
))
1566 if len(args
) == 1 and type(args
[0]) == str:
1567 self
.ctx
= Context
.getDefaultInstance()
1568 self
.ptr
= isl
.isl_union_map_read_from_str(self
.ctx
, args
[0].encode('ascii'))
1572 if hasattr(self
, 'ptr'):
1573 isl
.isl_union_map_free(self
.ptr
)
1576 if not arg0
.__class__
is union_map
:
1577 arg0
= union_map(arg0
)
1580 ptr
= isl
.isl_union_map_to_str(arg0
.ptr
)
1581 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
1587 return 'isl.union_map("""%s""")' % s
1589 return 'isl.union_map("%s")' % s
1590 def affine_hull(arg0
):
1592 if not arg0
.__class__
is union_map
:
1593 arg0
= union_map(arg0
)
1597 res
= isl
.isl_union_map_affine_hull(isl
.isl_union_map_copy(arg0
.ptr
))
1598 return union_map(ctx
=ctx
, ptr
=res
)
1599 def apply_domain(arg0
, arg1
):
1601 if not arg0
.__class__
is union_map
:
1602 arg0
= union_map(arg0
)
1606 if not arg1
.__class__
is union_map
:
1607 arg1
= union_map(arg1
)
1611 res
= isl
.isl_union_map_apply_domain(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
1612 return union_map(ctx
=ctx
, ptr
=res
)
1613 def apply_range(arg0
, arg1
):
1615 if not arg0
.__class__
is union_map
:
1616 arg0
= union_map(arg0
)
1620 if not arg1
.__class__
is union_map
:
1621 arg1
= union_map(arg1
)
1625 res
= isl
.isl_union_map_apply_range(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
1626 return union_map(ctx
=ctx
, ptr
=res
)
1629 if not arg0
.__class__
is union_map
:
1630 arg0
= union_map(arg0
)
1634 res
= isl
.isl_union_map_coalesce(isl
.isl_union_map_copy(arg0
.ptr
))
1635 return union_map(ctx
=ctx
, ptr
=res
)
1636 def compute_divs(arg0
):
1638 if not arg0
.__class__
is union_map
:
1639 arg0
= union_map(arg0
)
1643 res
= isl
.isl_union_map_compute_divs(isl
.isl_union_map_copy(arg0
.ptr
))
1644 return union_map(ctx
=ctx
, ptr
=res
)
1647 if not arg0
.__class__
is union_map
:
1648 arg0
= union_map(arg0
)
1652 res
= isl
.isl_union_map_deltas(isl
.isl_union_map_copy(arg0
.ptr
))
1653 return union_set(ctx
=ctx
, ptr
=res
)
1654 def detect_equalities(arg0
):
1656 if not arg0
.__class__
is union_map
:
1657 arg0
= union_map(arg0
)
1661 res
= isl
.isl_union_map_detect_equalities(isl
.isl_union_map_copy(arg0
.ptr
))
1662 return union_map(ctx
=ctx
, ptr
=res
)
1665 if not arg0
.__class__
is union_map
:
1666 arg0
= union_map(arg0
)
1670 res
= isl
.isl_union_map_domain(isl
.isl_union_map_copy(arg0
.ptr
))
1671 return union_set(ctx
=ctx
, ptr
=res
)
1672 def domain_factor_domain(arg0
):
1674 if not arg0
.__class__
is union_map
:
1675 arg0
= union_map(arg0
)
1679 res
= isl
.isl_union_map_domain_factor_domain(isl
.isl_union_map_copy(arg0
.ptr
))
1680 return union_map(ctx
=ctx
, ptr
=res
)
1681 def domain_factor_range(arg0
):
1683 if not arg0
.__class__
is union_map
:
1684 arg0
= union_map(arg0
)
1688 res
= isl
.isl_union_map_domain_factor_range(isl
.isl_union_map_copy(arg0
.ptr
))
1689 return union_map(ctx
=ctx
, ptr
=res
)
1690 def domain_map(arg0
):
1692 if not arg0
.__class__
is union_map
:
1693 arg0
= union_map(arg0
)
1697 res
= isl
.isl_union_map_domain_map(isl
.isl_union_map_copy(arg0
.ptr
))
1698 return union_map(ctx
=ctx
, ptr
=res
)
1699 def domain_map_union_pw_multi_aff(arg0
):
1701 if not arg0
.__class__
is union_map
:
1702 arg0
= union_map(arg0
)
1706 res
= isl
.isl_union_map_domain_map_union_pw_multi_aff(isl
.isl_union_map_copy(arg0
.ptr
))
1707 return union_pw_multi_aff(ctx
=ctx
, ptr
=res
)
1708 def domain_product(arg0
, arg1
):
1710 if not arg0
.__class__
is union_map
:
1711 arg0
= union_map(arg0
)
1715 if not arg1
.__class__
is union_map
:
1716 arg1
= union_map(arg1
)
1720 res
= isl
.isl_union_map_domain_product(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
1721 return union_map(ctx
=ctx
, ptr
=res
)
1722 def eq_at(arg0
, arg1
):
1723 if arg1
.__class__
is multi_union_pw_aff
:
1724 res
= isl
.isl_union_map_eq_at_multi_union_pw_aff(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_multi_union_pw_aff_copy(arg1
.ptr
))
1725 return union_map(ctx
=arg0
.ctx
, ptr
=res
)
1726 def factor_domain(arg0
):
1728 if not arg0
.__class__
is union_map
:
1729 arg0
= union_map(arg0
)
1733 res
= isl
.isl_union_map_factor_domain(isl
.isl_union_map_copy(arg0
.ptr
))
1734 return union_map(ctx
=ctx
, ptr
=res
)
1735 def factor_range(arg0
):
1737 if not arg0
.__class__
is union_map
:
1738 arg0
= union_map(arg0
)
1742 res
= isl
.isl_union_map_factor_range(isl
.isl_union_map_copy(arg0
.ptr
))
1743 return union_map(ctx
=ctx
, ptr
=res
)
1744 def fixed_power(arg0
, arg1
):
1745 if arg1
.__class__
is val
:
1746 res
= isl
.isl_union_map_fixed_power_val(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
1747 return union_map(ctx
=arg0
.ctx
, ptr
=res
)
1748 def foreach_map(arg0
, arg1
):
1750 if not arg0
.__class__
is union_map
:
1751 arg0
= union_map(arg0
)
1755 fn
= CFUNCTYPE(c_int
, c_void_p
, c_void_p
)
1756 def cb_func(cb_arg0
, cb_arg1
):
1757 cb_arg0
= map(ctx
=arg0
.ctx
, ptr
=cb_arg0
)
1762 exc_info
[0] = sys
.exc_info()
1767 res
= isl
.isl_union_map_foreach_map(arg0
.ptr
, cb
, None)
1768 if exc_info
[0] != None:
1769 raise (exc_info
[0][0], exc_info
[0][1], exc_info
[0][2])
1772 def convert_from(arg0
):
1773 if arg0
.__class__
is union_pw_multi_aff
:
1774 res
= isl
.isl_union_map_from_union_pw_multi_aff(isl
.isl_union_pw_multi_aff_copy(arg0
.ptr
))
1775 return union_map(ctx
=arg0
.ctx
, ptr
=res
)
1776 if arg0
.__class__
is multi_union_pw_aff
:
1777 res
= isl
.isl_union_map_from_multi_union_pw_aff(isl
.isl_multi_union_pw_aff_copy(arg0
.ptr
))
1778 return union_map(ctx
=arg0
.ctx
, ptr
=res
)
1780 def from_domain(arg0
):
1782 if not arg0
.__class__
is union_set
:
1783 arg0
= union_set(arg0
)
1787 res
= isl
.isl_union_map_from_domain(isl
.isl_union_set_copy(arg0
.ptr
))
1788 return union_map(ctx
=ctx
, ptr
=res
)
1790 def from_domain_and_range(arg0
, arg1
):
1792 if not arg0
.__class__
is union_set
:
1793 arg0
= union_set(arg0
)
1797 if not arg1
.__class__
is union_set
:
1798 arg1
= union_set(arg1
)
1802 res
= isl
.isl_union_map_from_domain_and_range(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
1803 return union_map(ctx
=ctx
, ptr
=res
)
1805 def from_range(arg0
):
1807 if not arg0
.__class__
is union_set
:
1808 arg0
= union_set(arg0
)
1812 res
= isl
.isl_union_map_from_range(isl
.isl_union_set_copy(arg0
.ptr
))
1813 return union_map(ctx
=ctx
, ptr
=res
)
1814 def gist(arg0
, arg1
):
1816 if not arg0
.__class__
is union_map
:
1817 arg0
= union_map(arg0
)
1821 if not arg1
.__class__
is union_map
:
1822 arg1
= union_map(arg1
)
1826 res
= isl
.isl_union_map_gist(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
1827 return union_map(ctx
=ctx
, ptr
=res
)
1828 def gist_domain(arg0
, arg1
):
1830 if not arg0
.__class__
is union_map
:
1831 arg0
= union_map(arg0
)
1835 if not arg1
.__class__
is union_set
:
1836 arg1
= union_set(arg1
)
1840 res
= isl
.isl_union_map_gist_domain(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
1841 return union_map(ctx
=ctx
, ptr
=res
)
1842 def gist_params(arg0
, arg1
):
1844 if not arg0
.__class__
is union_map
:
1845 arg0
= union_map(arg0
)
1849 if not arg1
.__class__
is set:
1854 res
= isl
.isl_union_map_gist_params(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
1855 return union_map(ctx
=ctx
, ptr
=res
)
1856 def gist_range(arg0
, arg1
):
1858 if not arg0
.__class__
is union_map
:
1859 arg0
= union_map(arg0
)
1863 if not arg1
.__class__
is union_set
:
1864 arg1
= union_set(arg1
)
1868 res
= isl
.isl_union_map_gist_range(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
1869 return union_map(ctx
=ctx
, ptr
=res
)
1870 def intersect(arg0
, arg1
):
1872 if not arg0
.__class__
is union_map
:
1873 arg0
= union_map(arg0
)
1877 if not arg1
.__class__
is union_map
:
1878 arg1
= union_map(arg1
)
1882 res
= isl
.isl_union_map_intersect(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
1883 return union_map(ctx
=ctx
, ptr
=res
)
1884 def intersect_domain(arg0
, arg1
):
1886 if not arg0
.__class__
is union_map
:
1887 arg0
= union_map(arg0
)
1891 if not arg1
.__class__
is union_set
:
1892 arg1
= union_set(arg1
)
1896 res
= isl
.isl_union_map_intersect_domain(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
1897 return union_map(ctx
=ctx
, ptr
=res
)
1898 def intersect_params(arg0
, arg1
):
1900 if not arg0
.__class__
is union_map
:
1901 arg0
= union_map(arg0
)
1905 if not arg1
.__class__
is set:
1910 res
= isl
.isl_union_map_intersect_params(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
1911 return union_map(ctx
=ctx
, ptr
=res
)
1912 def intersect_range(arg0
, arg1
):
1914 if not arg0
.__class__
is union_map
:
1915 arg0
= union_map(arg0
)
1919 if not arg1
.__class__
is union_set
:
1920 arg1
= union_set(arg1
)
1924 res
= isl
.isl_union_map_intersect_range(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
1925 return union_map(ctx
=ctx
, ptr
=res
)
1926 def is_bijective(arg0
):
1928 if not arg0
.__class__
is union_map
:
1929 arg0
= union_map(arg0
)
1933 res
= isl
.isl_union_map_is_bijective(arg0
.ptr
)
1939 if not arg0
.__class__
is union_map
:
1940 arg0
= union_map(arg0
)
1944 res
= isl
.isl_union_map_is_empty(arg0
.ptr
)
1948 def is_equal(arg0
, arg1
):
1950 if not arg0
.__class__
is union_map
:
1951 arg0
= union_map(arg0
)
1955 if not arg1
.__class__
is union_map
:
1956 arg1
= union_map(arg1
)
1960 res
= isl
.isl_union_map_is_equal(arg0
.ptr
, arg1
.ptr
)
1964 def is_injective(arg0
):
1966 if not arg0
.__class__
is union_map
:
1967 arg0
= union_map(arg0
)
1971 res
= isl
.isl_union_map_is_injective(arg0
.ptr
)
1975 def is_single_valued(arg0
):
1977 if not arg0
.__class__
is union_map
:
1978 arg0
= union_map(arg0
)
1982 res
= isl
.isl_union_map_is_single_valued(arg0
.ptr
)
1986 def is_strict_subset(arg0
, arg1
):
1988 if not arg0
.__class__
is union_map
:
1989 arg0
= union_map(arg0
)
1993 if not arg1
.__class__
is union_map
:
1994 arg1
= union_map(arg1
)
1998 res
= isl
.isl_union_map_is_strict_subset(arg0
.ptr
, arg1
.ptr
)
2002 def is_subset(arg0
, arg1
):
2004 if not arg0
.__class__
is union_map
:
2005 arg0
= union_map(arg0
)
2009 if not arg1
.__class__
is union_map
:
2010 arg1
= union_map(arg1
)
2014 res
= isl
.isl_union_map_is_subset(arg0
.ptr
, arg1
.ptr
)
2020 if not arg0
.__class__
is union_map
:
2021 arg0
= union_map(arg0
)
2025 res
= isl
.isl_union_map_lexmax(isl
.isl_union_map_copy(arg0
.ptr
))
2026 return union_map(ctx
=ctx
, ptr
=res
)
2029 if not arg0
.__class__
is union_map
:
2030 arg0
= union_map(arg0
)
2034 res
= isl
.isl_union_map_lexmin(isl
.isl_union_map_copy(arg0
.ptr
))
2035 return union_map(ctx
=ctx
, ptr
=res
)
2036 def polyhedral_hull(arg0
):
2038 if not arg0
.__class__
is union_map
:
2039 arg0
= union_map(arg0
)
2043 res
= isl
.isl_union_map_polyhedral_hull(isl
.isl_union_map_copy(arg0
.ptr
))
2044 return union_map(ctx
=ctx
, ptr
=res
)
2045 def product(arg0
, arg1
):
2047 if not arg0
.__class__
is union_map
:
2048 arg0
= union_map(arg0
)
2052 if not arg1
.__class__
is union_map
:
2053 arg1
= union_map(arg1
)
2057 res
= isl
.isl_union_map_product(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
2058 return union_map(ctx
=ctx
, ptr
=res
)
2059 def project_out_all_params(arg0
):
2061 if not arg0
.__class__
is union_map
:
2062 arg0
= union_map(arg0
)
2066 res
= isl
.isl_union_map_project_out_all_params(isl
.isl_union_map_copy(arg0
.ptr
))
2067 return union_map(ctx
=ctx
, ptr
=res
)
2070 if not arg0
.__class__
is union_map
:
2071 arg0
= union_map(arg0
)
2075 res
= isl
.isl_union_map_range(isl
.isl_union_map_copy(arg0
.ptr
))
2076 return union_set(ctx
=ctx
, ptr
=res
)
2077 def range_factor_domain(arg0
):
2079 if not arg0
.__class__
is union_map
:
2080 arg0
= union_map(arg0
)
2084 res
= isl
.isl_union_map_range_factor_domain(isl
.isl_union_map_copy(arg0
.ptr
))
2085 return union_map(ctx
=ctx
, ptr
=res
)
2086 def range_factor_range(arg0
):
2088 if not arg0
.__class__
is union_map
:
2089 arg0
= union_map(arg0
)
2093 res
= isl
.isl_union_map_range_factor_range(isl
.isl_union_map_copy(arg0
.ptr
))
2094 return union_map(ctx
=ctx
, ptr
=res
)
2095 def range_map(arg0
):
2097 if not arg0
.__class__
is union_map
:
2098 arg0
= union_map(arg0
)
2102 res
= isl
.isl_union_map_range_map(isl
.isl_union_map_copy(arg0
.ptr
))
2103 return union_map(ctx
=ctx
, ptr
=res
)
2104 def range_product(arg0
, arg1
):
2106 if not arg0
.__class__
is union_map
:
2107 arg0
= union_map(arg0
)
2111 if not arg1
.__class__
is union_map
:
2112 arg1
= union_map(arg1
)
2116 res
= isl
.isl_union_map_range_product(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
2117 return union_map(ctx
=ctx
, ptr
=res
)
2120 if not arg0
.__class__
is union_map
:
2121 arg0
= union_map(arg0
)
2125 res
= isl
.isl_union_map_reverse(isl
.isl_union_map_copy(arg0
.ptr
))
2126 return union_map(ctx
=ctx
, ptr
=res
)
2127 def subtract(arg0
, arg1
):
2129 if not arg0
.__class__
is union_map
:
2130 arg0
= union_map(arg0
)
2134 if not arg1
.__class__
is union_map
:
2135 arg1
= union_map(arg1
)
2139 res
= isl
.isl_union_map_subtract(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
2140 return union_map(ctx
=ctx
, ptr
=res
)
2141 def subtract_domain(arg0
, arg1
):
2143 if not arg0
.__class__
is union_map
:
2144 arg0
= union_map(arg0
)
2148 if not arg1
.__class__
is union_set
:
2149 arg1
= union_set(arg1
)
2153 res
= isl
.isl_union_map_subtract_domain(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
2154 return union_map(ctx
=ctx
, ptr
=res
)
2155 def subtract_range(arg0
, arg1
):
2157 if not arg0
.__class__
is union_map
:
2158 arg0
= union_map(arg0
)
2162 if not arg1
.__class__
is union_set
:
2163 arg1
= union_set(arg1
)
2167 res
= isl
.isl_union_map_subtract_range(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
2168 return union_map(ctx
=ctx
, ptr
=res
)
2169 def union(arg0
, arg1
):
2171 if not arg0
.__class__
is union_map
:
2172 arg0
= union_map(arg0
)
2176 if not arg1
.__class__
is union_map
:
2177 arg1
= union_map(arg1
)
2181 res
= isl
.isl_union_map_union(isl
.isl_union_map_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
2182 return union_map(ctx
=ctx
, ptr
=res
)
2185 if not arg0
.__class__
is union_map
:
2186 arg0
= union_map(arg0
)
2190 res
= isl
.isl_union_map_wrap(isl
.isl_union_map_copy(arg0
.ptr
))
2191 return union_set(ctx
=ctx
, ptr
=res
)
2194 if not arg0
.__class__
is union_map
:
2195 arg0
= union_map(arg0
)
2199 res
= isl
.isl_union_map_zip(isl
.isl_union_map_copy(arg0
.ptr
))
2200 return union_map(ctx
=ctx
, ptr
=res
)
2202 isl
.isl_union_map_from_basic_map
.restype
= c_void_p
2203 isl
.isl_union_map_from_basic_map
.argtypes
= [c_void_p
]
2204 isl
.isl_union_map_from_map
.restype
= c_void_p
2205 isl
.isl_union_map_from_map
.argtypes
= [c_void_p
]
2206 isl
.isl_union_map_read_from_str
.restype
= c_void_p
2207 isl
.isl_union_map_read_from_str
.argtypes
= [Context
, c_char_p
]
2208 isl
.isl_union_map_affine_hull
.restype
= c_void_p
2209 isl
.isl_union_map_affine_hull
.argtypes
= [c_void_p
]
2210 isl
.isl_union_map_apply_domain
.restype
= c_void_p
2211 isl
.isl_union_map_apply_domain
.argtypes
= [c_void_p
, c_void_p
]
2212 isl
.isl_union_map_apply_range
.restype
= c_void_p
2213 isl
.isl_union_map_apply_range
.argtypes
= [c_void_p
, c_void_p
]
2214 isl
.isl_union_map_coalesce
.restype
= c_void_p
2215 isl
.isl_union_map_coalesce
.argtypes
= [c_void_p
]
2216 isl
.isl_union_map_compute_divs
.restype
= c_void_p
2217 isl
.isl_union_map_compute_divs
.argtypes
= [c_void_p
]
2218 isl
.isl_union_map_deltas
.restype
= c_void_p
2219 isl
.isl_union_map_deltas
.argtypes
= [c_void_p
]
2220 isl
.isl_union_map_detect_equalities
.restype
= c_void_p
2221 isl
.isl_union_map_detect_equalities
.argtypes
= [c_void_p
]
2222 isl
.isl_union_map_domain
.restype
= c_void_p
2223 isl
.isl_union_map_domain
.argtypes
= [c_void_p
]
2224 isl
.isl_union_map_domain_factor_domain
.restype
= c_void_p
2225 isl
.isl_union_map_domain_factor_domain
.argtypes
= [c_void_p
]
2226 isl
.isl_union_map_domain_factor_range
.restype
= c_void_p
2227 isl
.isl_union_map_domain_factor_range
.argtypes
= [c_void_p
]
2228 isl
.isl_union_map_domain_map
.restype
= c_void_p
2229 isl
.isl_union_map_domain_map
.argtypes
= [c_void_p
]
2230 isl
.isl_union_map_domain_map_union_pw_multi_aff
.restype
= c_void_p
2231 isl
.isl_union_map_domain_map_union_pw_multi_aff
.argtypes
= [c_void_p
]
2232 isl
.isl_union_map_domain_product
.restype
= c_void_p
2233 isl
.isl_union_map_domain_product
.argtypes
= [c_void_p
, c_void_p
]
2234 isl
.isl_union_map_eq_at_multi_union_pw_aff
.restype
= c_void_p
2235 isl
.isl_union_map_eq_at_multi_union_pw_aff
.argtypes
= [c_void_p
, c_void_p
]
2236 isl
.isl_union_map_factor_domain
.restype
= c_void_p
2237 isl
.isl_union_map_factor_domain
.argtypes
= [c_void_p
]
2238 isl
.isl_union_map_factor_range
.restype
= c_void_p
2239 isl
.isl_union_map_factor_range
.argtypes
= [c_void_p
]
2240 isl
.isl_union_map_fixed_power_val
.restype
= c_void_p
2241 isl
.isl_union_map_fixed_power_val
.argtypes
= [c_void_p
, c_void_p
]
2242 isl
.isl_union_map_foreach_map
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
2243 isl
.isl_union_map_from_union_pw_multi_aff
.restype
= c_void_p
2244 isl
.isl_union_map_from_union_pw_multi_aff
.argtypes
= [c_void_p
]
2245 isl
.isl_union_map_from_multi_union_pw_aff
.restype
= c_void_p
2246 isl
.isl_union_map_from_multi_union_pw_aff
.argtypes
= [c_void_p
]
2247 isl
.isl_union_map_from_domain
.restype
= c_void_p
2248 isl
.isl_union_map_from_domain
.argtypes
= [c_void_p
]
2249 isl
.isl_union_map_from_domain_and_range
.restype
= c_void_p
2250 isl
.isl_union_map_from_domain_and_range
.argtypes
= [c_void_p
, c_void_p
]
2251 isl
.isl_union_map_from_range
.restype
= c_void_p
2252 isl
.isl_union_map_from_range
.argtypes
= [c_void_p
]
2253 isl
.isl_union_map_gist
.restype
= c_void_p
2254 isl
.isl_union_map_gist
.argtypes
= [c_void_p
, c_void_p
]
2255 isl
.isl_union_map_gist_domain
.restype
= c_void_p
2256 isl
.isl_union_map_gist_domain
.argtypes
= [c_void_p
, c_void_p
]
2257 isl
.isl_union_map_gist_params
.restype
= c_void_p
2258 isl
.isl_union_map_gist_params
.argtypes
= [c_void_p
, c_void_p
]
2259 isl
.isl_union_map_gist_range
.restype
= c_void_p
2260 isl
.isl_union_map_gist_range
.argtypes
= [c_void_p
, c_void_p
]
2261 isl
.isl_union_map_intersect
.restype
= c_void_p
2262 isl
.isl_union_map_intersect
.argtypes
= [c_void_p
, c_void_p
]
2263 isl
.isl_union_map_intersect_domain
.restype
= c_void_p
2264 isl
.isl_union_map_intersect_domain
.argtypes
= [c_void_p
, c_void_p
]
2265 isl
.isl_union_map_intersect_params
.restype
= c_void_p
2266 isl
.isl_union_map_intersect_params
.argtypes
= [c_void_p
, c_void_p
]
2267 isl
.isl_union_map_intersect_range
.restype
= c_void_p
2268 isl
.isl_union_map_intersect_range
.argtypes
= [c_void_p
, c_void_p
]
2269 isl
.isl_union_map_is_bijective
.restype
= c_bool
2270 isl
.isl_union_map_is_bijective
.argtypes
= [c_void_p
]
2271 isl
.isl_union_map_is_empty
.restype
= c_bool
2272 isl
.isl_union_map_is_empty
.argtypes
= [c_void_p
]
2273 isl
.isl_union_map_is_equal
.restype
= c_bool
2274 isl
.isl_union_map_is_equal
.argtypes
= [c_void_p
, c_void_p
]
2275 isl
.isl_union_map_is_injective
.restype
= c_bool
2276 isl
.isl_union_map_is_injective
.argtypes
= [c_void_p
]
2277 isl
.isl_union_map_is_single_valued
.restype
= c_bool
2278 isl
.isl_union_map_is_single_valued
.argtypes
= [c_void_p
]
2279 isl
.isl_union_map_is_strict_subset
.restype
= c_bool
2280 isl
.isl_union_map_is_strict_subset
.argtypes
= [c_void_p
, c_void_p
]
2281 isl
.isl_union_map_is_subset
.restype
= c_bool
2282 isl
.isl_union_map_is_subset
.argtypes
= [c_void_p
, c_void_p
]
2283 isl
.isl_union_map_lexmax
.restype
= c_void_p
2284 isl
.isl_union_map_lexmax
.argtypes
= [c_void_p
]
2285 isl
.isl_union_map_lexmin
.restype
= c_void_p
2286 isl
.isl_union_map_lexmin
.argtypes
= [c_void_p
]
2287 isl
.isl_union_map_polyhedral_hull
.restype
= c_void_p
2288 isl
.isl_union_map_polyhedral_hull
.argtypes
= [c_void_p
]
2289 isl
.isl_union_map_product
.restype
= c_void_p
2290 isl
.isl_union_map_product
.argtypes
= [c_void_p
, c_void_p
]
2291 isl
.isl_union_map_project_out_all_params
.restype
= c_void_p
2292 isl
.isl_union_map_project_out_all_params
.argtypes
= [c_void_p
]
2293 isl
.isl_union_map_range
.restype
= c_void_p
2294 isl
.isl_union_map_range
.argtypes
= [c_void_p
]
2295 isl
.isl_union_map_range_factor_domain
.restype
= c_void_p
2296 isl
.isl_union_map_range_factor_domain
.argtypes
= [c_void_p
]
2297 isl
.isl_union_map_range_factor_range
.restype
= c_void_p
2298 isl
.isl_union_map_range_factor_range
.argtypes
= [c_void_p
]
2299 isl
.isl_union_map_range_map
.restype
= c_void_p
2300 isl
.isl_union_map_range_map
.argtypes
= [c_void_p
]
2301 isl
.isl_union_map_range_product
.restype
= c_void_p
2302 isl
.isl_union_map_range_product
.argtypes
= [c_void_p
, c_void_p
]
2303 isl
.isl_union_map_reverse
.restype
= c_void_p
2304 isl
.isl_union_map_reverse
.argtypes
= [c_void_p
]
2305 isl
.isl_union_map_subtract
.restype
= c_void_p
2306 isl
.isl_union_map_subtract
.argtypes
= [c_void_p
, c_void_p
]
2307 isl
.isl_union_map_subtract_domain
.restype
= c_void_p
2308 isl
.isl_union_map_subtract_domain
.argtypes
= [c_void_p
, c_void_p
]
2309 isl
.isl_union_map_subtract_range
.restype
= c_void_p
2310 isl
.isl_union_map_subtract_range
.argtypes
= [c_void_p
, c_void_p
]
2311 isl
.isl_union_map_union
.restype
= c_void_p
2312 isl
.isl_union_map_union
.argtypes
= [c_void_p
, c_void_p
]
2313 isl
.isl_union_map_wrap
.restype
= c_void_p
2314 isl
.isl_union_map_wrap
.argtypes
= [c_void_p
]
2315 isl
.isl_union_map_zip
.restype
= c_void_p
2316 isl
.isl_union_map_zip
.argtypes
= [c_void_p
]
2317 isl
.isl_union_map_copy
.restype
= c_void_p
2318 isl
.isl_union_map_copy
.argtypes
= [c_void_p
]
2319 isl
.isl_union_map_free
.restype
= c_void_p
2320 isl
.isl_union_map_free
.argtypes
= [c_void_p
]
2321 isl
.isl_union_map_to_str
.restype
= POINTER(c_char
)
2322 isl
.isl_union_map_to_str
.argtypes
= [c_void_p
]
2324 class map(union_map
):
2325 def __init__(self
, *args
, **keywords
):
2326 if "ptr" in keywords
:
2327 self
.ctx
= keywords
["ctx"]
2328 self
.ptr
= keywords
["ptr"]
2330 if len(args
) == 1 and type(args
[0]) == str:
2331 self
.ctx
= Context
.getDefaultInstance()
2332 self
.ptr
= isl
.isl_map_read_from_str(self
.ctx
, args
[0].encode('ascii'))
2334 if len(args
) == 1 and args
[0].__class
__ is basic_map
:
2335 self
.ctx
= Context
.getDefaultInstance()
2336 self
.ptr
= isl
.isl_map_from_basic_map(isl
.isl_basic_map_copy(args
[0].ptr
))
2340 if hasattr(self
, 'ptr'):
2341 isl
.isl_map_free(self
.ptr
)
2344 if not arg0
.__class__
is map:
2348 ptr
= isl
.isl_map_to_str(arg0
.ptr
)
2349 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
2355 return 'isl.map("""%s""")' % s
2357 return 'isl.map("%s")' % s
2358 def affine_hull(arg0
):
2360 if not arg0
.__class__
is map:
2365 res
= isl
.isl_map_affine_hull(isl
.isl_map_copy(arg0
.ptr
))
2366 return basic_map(ctx
=ctx
, ptr
=res
)
2367 def apply_domain(arg0
, arg1
):
2369 if not arg0
.__class__
is map:
2374 if not arg1
.__class__
is map:
2377 return union_map(arg0
).apply_domain(arg1
)
2379 res
= isl
.isl_map_apply_domain(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
2380 return map(ctx
=ctx
, ptr
=res
)
2381 def apply_range(arg0
, arg1
):
2383 if not arg0
.__class__
is map:
2388 if not arg1
.__class__
is map:
2391 return union_map(arg0
).apply_range(arg1
)
2393 res
= isl
.isl_map_apply_range(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
2394 return map(ctx
=ctx
, ptr
=res
)
2397 if not arg0
.__class__
is map:
2402 res
= isl
.isl_map_coalesce(isl
.isl_map_copy(arg0
.ptr
))
2403 return map(ctx
=ctx
, ptr
=res
)
2404 def complement(arg0
):
2406 if not arg0
.__class__
is map:
2411 res
= isl
.isl_map_complement(isl
.isl_map_copy(arg0
.ptr
))
2412 return map(ctx
=ctx
, ptr
=res
)
2415 if not arg0
.__class__
is map:
2420 res
= isl
.isl_map_deltas(isl
.isl_map_copy(arg0
.ptr
))
2421 return set(ctx
=ctx
, ptr
=res
)
2422 def detect_equalities(arg0
):
2424 if not arg0
.__class__
is map:
2429 res
= isl
.isl_map_detect_equalities(isl
.isl_map_copy(arg0
.ptr
))
2430 return map(ctx
=ctx
, ptr
=res
)
2433 if not arg0
.__class__
is map:
2438 res
= isl
.isl_map_flatten(isl
.isl_map_copy(arg0
.ptr
))
2439 return map(ctx
=ctx
, ptr
=res
)
2440 def flatten_domain(arg0
):
2442 if not arg0
.__class__
is map:
2447 res
= isl
.isl_map_flatten_domain(isl
.isl_map_copy(arg0
.ptr
))
2448 return map(ctx
=ctx
, ptr
=res
)
2449 def flatten_range(arg0
):
2451 if not arg0
.__class__
is map:
2456 res
= isl
.isl_map_flatten_range(isl
.isl_map_copy(arg0
.ptr
))
2457 return map(ctx
=ctx
, ptr
=res
)
2458 def foreach_basic_map(arg0
, arg1
):
2460 if not arg0
.__class__
is map:
2465 fn
= CFUNCTYPE(c_int
, c_void_p
, c_void_p
)
2466 def cb_func(cb_arg0
, cb_arg1
):
2467 cb_arg0
= basic_map(ctx
=arg0
.ctx
, ptr
=cb_arg0
)
2472 exc_info
[0] = sys
.exc_info()
2477 res
= isl
.isl_map_foreach_basic_map(arg0
.ptr
, cb
, None)
2478 if exc_info
[0] != None:
2479 raise (exc_info
[0][0], exc_info
[0][1], exc_info
[0][2])
2481 def gist(arg0
, arg1
):
2483 if not arg0
.__class__
is map:
2488 if not arg1
.__class__
is map:
2491 return union_map(arg0
).gist(arg1
)
2493 res
= isl
.isl_map_gist(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
2494 return map(ctx
=ctx
, ptr
=res
)
2495 def gist_domain(arg0
, arg1
):
2497 if not arg0
.__class__
is map:
2502 if not arg1
.__class__
is set:
2505 return union_map(arg0
).gist_domain(arg1
)
2507 res
= isl
.isl_map_gist_domain(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
2508 return map(ctx
=ctx
, ptr
=res
)
2509 def intersect(arg0
, arg1
):
2511 if not arg0
.__class__
is map:
2516 if not arg1
.__class__
is map:
2519 return union_map(arg0
).intersect(arg1
)
2521 res
= isl
.isl_map_intersect(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
2522 return map(ctx
=ctx
, ptr
=res
)
2523 def intersect_domain(arg0
, arg1
):
2525 if not arg0
.__class__
is map:
2530 if not arg1
.__class__
is set:
2533 return union_map(arg0
).intersect_domain(arg1
)
2535 res
= isl
.isl_map_intersect_domain(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
2536 return map(ctx
=ctx
, ptr
=res
)
2537 def intersect_params(arg0
, arg1
):
2539 if not arg0
.__class__
is map:
2544 if not arg1
.__class__
is set:
2547 return union_map(arg0
).intersect_params(arg1
)
2549 res
= isl
.isl_map_intersect_params(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
2550 return map(ctx
=ctx
, ptr
=res
)
2551 def intersect_range(arg0
, arg1
):
2553 if not arg0
.__class__
is map:
2558 if not arg1
.__class__
is set:
2561 return union_map(arg0
).intersect_range(arg1
)
2563 res
= isl
.isl_map_intersect_range(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
2564 return map(ctx
=ctx
, ptr
=res
)
2565 def is_bijective(arg0
):
2567 if not arg0
.__class__
is map:
2572 res
= isl
.isl_map_is_bijective(arg0
.ptr
)
2576 def is_disjoint(arg0
, arg1
):
2578 if not arg0
.__class__
is map:
2583 if not arg1
.__class__
is map:
2586 return union_map(arg0
).is_disjoint(arg1
)
2588 res
= isl
.isl_map_is_disjoint(arg0
.ptr
, arg1
.ptr
)
2594 if not arg0
.__class__
is map:
2599 res
= isl
.isl_map_is_empty(arg0
.ptr
)
2603 def is_equal(arg0
, arg1
):
2605 if not arg0
.__class__
is map:
2610 if not arg1
.__class__
is map:
2613 return union_map(arg0
).is_equal(arg1
)
2615 res
= isl
.isl_map_is_equal(arg0
.ptr
, arg1
.ptr
)
2619 def is_injective(arg0
):
2621 if not arg0
.__class__
is map:
2626 res
= isl
.isl_map_is_injective(arg0
.ptr
)
2630 def is_single_valued(arg0
):
2632 if not arg0
.__class__
is map:
2637 res
= isl
.isl_map_is_single_valued(arg0
.ptr
)
2641 def is_strict_subset(arg0
, arg1
):
2643 if not arg0
.__class__
is map:
2648 if not arg1
.__class__
is map:
2651 return union_map(arg0
).is_strict_subset(arg1
)
2653 res
= isl
.isl_map_is_strict_subset(arg0
.ptr
, arg1
.ptr
)
2657 def is_subset(arg0
, arg1
):
2659 if not arg0
.__class__
is map:
2664 if not arg1
.__class__
is map:
2667 return union_map(arg0
).is_subset(arg1
)
2669 res
= isl
.isl_map_is_subset(arg0
.ptr
, arg1
.ptr
)
2675 if not arg0
.__class__
is map:
2680 res
= isl
.isl_map_lexmax(isl
.isl_map_copy(arg0
.ptr
))
2681 return map(ctx
=ctx
, ptr
=res
)
2684 if not arg0
.__class__
is map:
2689 res
= isl
.isl_map_lexmin(isl
.isl_map_copy(arg0
.ptr
))
2690 return map(ctx
=ctx
, ptr
=res
)
2691 def polyhedral_hull(arg0
):
2693 if not arg0
.__class__
is map:
2698 res
= isl
.isl_map_polyhedral_hull(isl
.isl_map_copy(arg0
.ptr
))
2699 return basic_map(ctx
=ctx
, ptr
=res
)
2702 if not arg0
.__class__
is map:
2707 res
= isl
.isl_map_reverse(isl
.isl_map_copy(arg0
.ptr
))
2708 return map(ctx
=ctx
, ptr
=res
)
2711 if not arg0
.__class__
is map:
2716 res
= isl
.isl_map_sample(isl
.isl_map_copy(arg0
.ptr
))
2717 return basic_map(ctx
=ctx
, ptr
=res
)
2718 def subtract(arg0
, arg1
):
2720 if not arg0
.__class__
is map:
2725 if not arg1
.__class__
is map:
2728 return union_map(arg0
).subtract(arg1
)
2730 res
= isl
.isl_map_subtract(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
2731 return map(ctx
=ctx
, ptr
=res
)
2732 def union(arg0
, arg1
):
2734 if not arg0
.__class__
is map:
2739 if not arg1
.__class__
is map:
2742 return union_map(arg0
).union(arg1
)
2744 res
= isl
.isl_map_union(isl
.isl_map_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
2745 return map(ctx
=ctx
, ptr
=res
)
2746 def unshifted_simple_hull(arg0
):
2748 if not arg0
.__class__
is map:
2753 res
= isl
.isl_map_unshifted_simple_hull(isl
.isl_map_copy(arg0
.ptr
))
2754 return basic_map(ctx
=ctx
, ptr
=res
)
2756 isl
.isl_map_read_from_str
.restype
= c_void_p
2757 isl
.isl_map_read_from_str
.argtypes
= [Context
, c_char_p
]
2758 isl
.isl_map_from_basic_map
.restype
= c_void_p
2759 isl
.isl_map_from_basic_map
.argtypes
= [c_void_p
]
2760 isl
.isl_map_affine_hull
.restype
= c_void_p
2761 isl
.isl_map_affine_hull
.argtypes
= [c_void_p
]
2762 isl
.isl_map_apply_domain
.restype
= c_void_p
2763 isl
.isl_map_apply_domain
.argtypes
= [c_void_p
, c_void_p
]
2764 isl
.isl_map_apply_range
.restype
= c_void_p
2765 isl
.isl_map_apply_range
.argtypes
= [c_void_p
, c_void_p
]
2766 isl
.isl_map_coalesce
.restype
= c_void_p
2767 isl
.isl_map_coalesce
.argtypes
= [c_void_p
]
2768 isl
.isl_map_complement
.restype
= c_void_p
2769 isl
.isl_map_complement
.argtypes
= [c_void_p
]
2770 isl
.isl_map_deltas
.restype
= c_void_p
2771 isl
.isl_map_deltas
.argtypes
= [c_void_p
]
2772 isl
.isl_map_detect_equalities
.restype
= c_void_p
2773 isl
.isl_map_detect_equalities
.argtypes
= [c_void_p
]
2774 isl
.isl_map_flatten
.restype
= c_void_p
2775 isl
.isl_map_flatten
.argtypes
= [c_void_p
]
2776 isl
.isl_map_flatten_domain
.restype
= c_void_p
2777 isl
.isl_map_flatten_domain
.argtypes
= [c_void_p
]
2778 isl
.isl_map_flatten_range
.restype
= c_void_p
2779 isl
.isl_map_flatten_range
.argtypes
= [c_void_p
]
2780 isl
.isl_map_foreach_basic_map
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
2781 isl
.isl_map_gist
.restype
= c_void_p
2782 isl
.isl_map_gist
.argtypes
= [c_void_p
, c_void_p
]
2783 isl
.isl_map_gist_domain
.restype
= c_void_p
2784 isl
.isl_map_gist_domain
.argtypes
= [c_void_p
, c_void_p
]
2785 isl
.isl_map_intersect
.restype
= c_void_p
2786 isl
.isl_map_intersect
.argtypes
= [c_void_p
, c_void_p
]
2787 isl
.isl_map_intersect_domain
.restype
= c_void_p
2788 isl
.isl_map_intersect_domain
.argtypes
= [c_void_p
, c_void_p
]
2789 isl
.isl_map_intersect_params
.restype
= c_void_p
2790 isl
.isl_map_intersect_params
.argtypes
= [c_void_p
, c_void_p
]
2791 isl
.isl_map_intersect_range
.restype
= c_void_p
2792 isl
.isl_map_intersect_range
.argtypes
= [c_void_p
, c_void_p
]
2793 isl
.isl_map_is_bijective
.restype
= c_bool
2794 isl
.isl_map_is_bijective
.argtypes
= [c_void_p
]
2795 isl
.isl_map_is_disjoint
.restype
= c_bool
2796 isl
.isl_map_is_disjoint
.argtypes
= [c_void_p
, c_void_p
]
2797 isl
.isl_map_is_empty
.restype
= c_bool
2798 isl
.isl_map_is_empty
.argtypes
= [c_void_p
]
2799 isl
.isl_map_is_equal
.restype
= c_bool
2800 isl
.isl_map_is_equal
.argtypes
= [c_void_p
, c_void_p
]
2801 isl
.isl_map_is_injective
.restype
= c_bool
2802 isl
.isl_map_is_injective
.argtypes
= [c_void_p
]
2803 isl
.isl_map_is_single_valued
.restype
= c_bool
2804 isl
.isl_map_is_single_valued
.argtypes
= [c_void_p
]
2805 isl
.isl_map_is_strict_subset
.restype
= c_bool
2806 isl
.isl_map_is_strict_subset
.argtypes
= [c_void_p
, c_void_p
]
2807 isl
.isl_map_is_subset
.restype
= c_bool
2808 isl
.isl_map_is_subset
.argtypes
= [c_void_p
, c_void_p
]
2809 isl
.isl_map_lexmax
.restype
= c_void_p
2810 isl
.isl_map_lexmax
.argtypes
= [c_void_p
]
2811 isl
.isl_map_lexmin
.restype
= c_void_p
2812 isl
.isl_map_lexmin
.argtypes
= [c_void_p
]
2813 isl
.isl_map_polyhedral_hull
.restype
= c_void_p
2814 isl
.isl_map_polyhedral_hull
.argtypes
= [c_void_p
]
2815 isl
.isl_map_reverse
.restype
= c_void_p
2816 isl
.isl_map_reverse
.argtypes
= [c_void_p
]
2817 isl
.isl_map_sample
.restype
= c_void_p
2818 isl
.isl_map_sample
.argtypes
= [c_void_p
]
2819 isl
.isl_map_subtract
.restype
= c_void_p
2820 isl
.isl_map_subtract
.argtypes
= [c_void_p
, c_void_p
]
2821 isl
.isl_map_union
.restype
= c_void_p
2822 isl
.isl_map_union
.argtypes
= [c_void_p
, c_void_p
]
2823 isl
.isl_map_unshifted_simple_hull
.restype
= c_void_p
2824 isl
.isl_map_unshifted_simple_hull
.argtypes
= [c_void_p
]
2825 isl
.isl_map_copy
.restype
= c_void_p
2826 isl
.isl_map_copy
.argtypes
= [c_void_p
]
2827 isl
.isl_map_free
.restype
= c_void_p
2828 isl
.isl_map_free
.argtypes
= [c_void_p
]
2829 isl
.isl_map_to_str
.restype
= POINTER(c_char
)
2830 isl
.isl_map_to_str
.argtypes
= [c_void_p
]
2832 class basic_map(map):
2833 def __init__(self
, *args
, **keywords
):
2834 if "ptr" in keywords
:
2835 self
.ctx
= keywords
["ctx"]
2836 self
.ptr
= keywords
["ptr"]
2838 if len(args
) == 1 and type(args
[0]) == str:
2839 self
.ctx
= Context
.getDefaultInstance()
2840 self
.ptr
= isl
.isl_basic_map_read_from_str(self
.ctx
, args
[0].encode('ascii'))
2844 if hasattr(self
, 'ptr'):
2845 isl
.isl_basic_map_free(self
.ptr
)
2848 if not arg0
.__class__
is basic_map
:
2849 arg0
= basic_map(arg0
)
2852 ptr
= isl
.isl_basic_map_to_str(arg0
.ptr
)
2853 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
2859 return 'isl.basic_map("""%s""")' % s
2861 return 'isl.basic_map("%s")' % s
2862 def affine_hull(arg0
):
2864 if not arg0
.__class__
is basic_map
:
2865 arg0
= basic_map(arg0
)
2869 res
= isl
.isl_basic_map_affine_hull(isl
.isl_basic_map_copy(arg0
.ptr
))
2870 return basic_map(ctx
=ctx
, ptr
=res
)
2871 def apply_domain(arg0
, arg1
):
2873 if not arg0
.__class__
is basic_map
:
2874 arg0
= basic_map(arg0
)
2878 if not arg1
.__class__
is basic_map
:
2879 arg1
= basic_map(arg1
)
2881 return map(arg0
).apply_domain(arg1
)
2883 res
= isl
.isl_basic_map_apply_domain(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_map_copy(arg1
.ptr
))
2884 return basic_map(ctx
=ctx
, ptr
=res
)
2885 def apply_range(arg0
, arg1
):
2887 if not arg0
.__class__
is basic_map
:
2888 arg0
= basic_map(arg0
)
2892 if not arg1
.__class__
is basic_map
:
2893 arg1
= basic_map(arg1
)
2895 return map(arg0
).apply_range(arg1
)
2897 res
= isl
.isl_basic_map_apply_range(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_map_copy(arg1
.ptr
))
2898 return basic_map(ctx
=ctx
, ptr
=res
)
2901 if not arg0
.__class__
is basic_map
:
2902 arg0
= basic_map(arg0
)
2906 res
= isl
.isl_basic_map_deltas(isl
.isl_basic_map_copy(arg0
.ptr
))
2907 return basic_set(ctx
=ctx
, ptr
=res
)
2908 def detect_equalities(arg0
):
2910 if not arg0
.__class__
is basic_map
:
2911 arg0
= basic_map(arg0
)
2915 res
= isl
.isl_basic_map_detect_equalities(isl
.isl_basic_map_copy(arg0
.ptr
))
2916 return basic_map(ctx
=ctx
, ptr
=res
)
2919 if not arg0
.__class__
is basic_map
:
2920 arg0
= basic_map(arg0
)
2924 res
= isl
.isl_basic_map_flatten(isl
.isl_basic_map_copy(arg0
.ptr
))
2925 return basic_map(ctx
=ctx
, ptr
=res
)
2926 def flatten_domain(arg0
):
2928 if not arg0
.__class__
is basic_map
:
2929 arg0
= basic_map(arg0
)
2933 res
= isl
.isl_basic_map_flatten_domain(isl
.isl_basic_map_copy(arg0
.ptr
))
2934 return basic_map(ctx
=ctx
, ptr
=res
)
2935 def flatten_range(arg0
):
2937 if not arg0
.__class__
is basic_map
:
2938 arg0
= basic_map(arg0
)
2942 res
= isl
.isl_basic_map_flatten_range(isl
.isl_basic_map_copy(arg0
.ptr
))
2943 return basic_map(ctx
=ctx
, ptr
=res
)
2944 def gist(arg0
, arg1
):
2946 if not arg0
.__class__
is basic_map
:
2947 arg0
= basic_map(arg0
)
2951 if not arg1
.__class__
is basic_map
:
2952 arg1
= basic_map(arg1
)
2954 return map(arg0
).gist(arg1
)
2956 res
= isl
.isl_basic_map_gist(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_map_copy(arg1
.ptr
))
2957 return basic_map(ctx
=ctx
, ptr
=res
)
2958 def intersect(arg0
, arg1
):
2960 if not arg0
.__class__
is basic_map
:
2961 arg0
= basic_map(arg0
)
2965 if not arg1
.__class__
is basic_map
:
2966 arg1
= basic_map(arg1
)
2968 return map(arg0
).intersect(arg1
)
2970 res
= isl
.isl_basic_map_intersect(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_map_copy(arg1
.ptr
))
2971 return basic_map(ctx
=ctx
, ptr
=res
)
2972 def intersect_domain(arg0
, arg1
):
2974 if not arg0
.__class__
is basic_map
:
2975 arg0
= basic_map(arg0
)
2979 if not arg1
.__class__
is basic_set
:
2980 arg1
= basic_set(arg1
)
2982 return map(arg0
).intersect_domain(arg1
)
2984 res
= isl
.isl_basic_map_intersect_domain(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_set_copy(arg1
.ptr
))
2985 return basic_map(ctx
=ctx
, ptr
=res
)
2986 def intersect_range(arg0
, arg1
):
2988 if not arg0
.__class__
is basic_map
:
2989 arg0
= basic_map(arg0
)
2993 if not arg1
.__class__
is basic_set
:
2994 arg1
= basic_set(arg1
)
2996 return map(arg0
).intersect_range(arg1
)
2998 res
= isl
.isl_basic_map_intersect_range(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_set_copy(arg1
.ptr
))
2999 return basic_map(ctx
=ctx
, ptr
=res
)
3002 if not arg0
.__class__
is basic_map
:
3003 arg0
= basic_map(arg0
)
3007 res
= isl
.isl_basic_map_is_empty(arg0
.ptr
)
3011 def is_equal(arg0
, arg1
):
3013 if not arg0
.__class__
is basic_map
:
3014 arg0
= basic_map(arg0
)
3018 if not arg1
.__class__
is basic_map
:
3019 arg1
= basic_map(arg1
)
3021 return map(arg0
).is_equal(arg1
)
3023 res
= isl
.isl_basic_map_is_equal(arg0
.ptr
, arg1
.ptr
)
3027 def is_subset(arg0
, arg1
):
3029 if not arg0
.__class__
is basic_map
:
3030 arg0
= basic_map(arg0
)
3034 if not arg1
.__class__
is basic_map
:
3035 arg1
= basic_map(arg1
)
3037 return map(arg0
).is_subset(arg1
)
3039 res
= isl
.isl_basic_map_is_subset(arg0
.ptr
, arg1
.ptr
)
3045 if not arg0
.__class__
is basic_map
:
3046 arg0
= basic_map(arg0
)
3050 res
= isl
.isl_basic_map_lexmax(isl
.isl_basic_map_copy(arg0
.ptr
))
3051 return map(ctx
=ctx
, ptr
=res
)
3054 if not arg0
.__class__
is basic_map
:
3055 arg0
= basic_map(arg0
)
3059 res
= isl
.isl_basic_map_lexmin(isl
.isl_basic_map_copy(arg0
.ptr
))
3060 return map(ctx
=ctx
, ptr
=res
)
3063 if not arg0
.__class__
is basic_map
:
3064 arg0
= basic_map(arg0
)
3068 res
= isl
.isl_basic_map_reverse(isl
.isl_basic_map_copy(arg0
.ptr
))
3069 return basic_map(ctx
=ctx
, ptr
=res
)
3072 if not arg0
.__class__
is basic_map
:
3073 arg0
= basic_map(arg0
)
3077 res
= isl
.isl_basic_map_sample(isl
.isl_basic_map_copy(arg0
.ptr
))
3078 return basic_map(ctx
=ctx
, ptr
=res
)
3079 def union(arg0
, arg1
):
3081 if not arg0
.__class__
is basic_map
:
3082 arg0
= basic_map(arg0
)
3086 if not arg1
.__class__
is basic_map
:
3087 arg1
= basic_map(arg1
)
3089 return map(arg0
).union(arg1
)
3091 res
= isl
.isl_basic_map_union(isl
.isl_basic_map_copy(arg0
.ptr
), isl
.isl_basic_map_copy(arg1
.ptr
))
3092 return map(ctx
=ctx
, ptr
=res
)
3094 isl
.isl_basic_map_read_from_str
.restype
= c_void_p
3095 isl
.isl_basic_map_read_from_str
.argtypes
= [Context
, c_char_p
]
3096 isl
.isl_basic_map_affine_hull
.restype
= c_void_p
3097 isl
.isl_basic_map_affine_hull
.argtypes
= [c_void_p
]
3098 isl
.isl_basic_map_apply_domain
.restype
= c_void_p
3099 isl
.isl_basic_map_apply_domain
.argtypes
= [c_void_p
, c_void_p
]
3100 isl
.isl_basic_map_apply_range
.restype
= c_void_p
3101 isl
.isl_basic_map_apply_range
.argtypes
= [c_void_p
, c_void_p
]
3102 isl
.isl_basic_map_deltas
.restype
= c_void_p
3103 isl
.isl_basic_map_deltas
.argtypes
= [c_void_p
]
3104 isl
.isl_basic_map_detect_equalities
.restype
= c_void_p
3105 isl
.isl_basic_map_detect_equalities
.argtypes
= [c_void_p
]
3106 isl
.isl_basic_map_flatten
.restype
= c_void_p
3107 isl
.isl_basic_map_flatten
.argtypes
= [c_void_p
]
3108 isl
.isl_basic_map_flatten_domain
.restype
= c_void_p
3109 isl
.isl_basic_map_flatten_domain
.argtypes
= [c_void_p
]
3110 isl
.isl_basic_map_flatten_range
.restype
= c_void_p
3111 isl
.isl_basic_map_flatten_range
.argtypes
= [c_void_p
]
3112 isl
.isl_basic_map_gist
.restype
= c_void_p
3113 isl
.isl_basic_map_gist
.argtypes
= [c_void_p
, c_void_p
]
3114 isl
.isl_basic_map_intersect
.restype
= c_void_p
3115 isl
.isl_basic_map_intersect
.argtypes
= [c_void_p
, c_void_p
]
3116 isl
.isl_basic_map_intersect_domain
.restype
= c_void_p
3117 isl
.isl_basic_map_intersect_domain
.argtypes
= [c_void_p
, c_void_p
]
3118 isl
.isl_basic_map_intersect_range
.restype
= c_void_p
3119 isl
.isl_basic_map_intersect_range
.argtypes
= [c_void_p
, c_void_p
]
3120 isl
.isl_basic_map_is_empty
.restype
= c_bool
3121 isl
.isl_basic_map_is_empty
.argtypes
= [c_void_p
]
3122 isl
.isl_basic_map_is_equal
.restype
= c_bool
3123 isl
.isl_basic_map_is_equal
.argtypes
= [c_void_p
, c_void_p
]
3124 isl
.isl_basic_map_is_subset
.restype
= c_bool
3125 isl
.isl_basic_map_is_subset
.argtypes
= [c_void_p
, c_void_p
]
3126 isl
.isl_basic_map_lexmax
.restype
= c_void_p
3127 isl
.isl_basic_map_lexmax
.argtypes
= [c_void_p
]
3128 isl
.isl_basic_map_lexmin
.restype
= c_void_p
3129 isl
.isl_basic_map_lexmin
.argtypes
= [c_void_p
]
3130 isl
.isl_basic_map_reverse
.restype
= c_void_p
3131 isl
.isl_basic_map_reverse
.argtypes
= [c_void_p
]
3132 isl
.isl_basic_map_sample
.restype
= c_void_p
3133 isl
.isl_basic_map_sample
.argtypes
= [c_void_p
]
3134 isl
.isl_basic_map_union
.restype
= c_void_p
3135 isl
.isl_basic_map_union
.argtypes
= [c_void_p
, c_void_p
]
3136 isl
.isl_basic_map_copy
.restype
= c_void_p
3137 isl
.isl_basic_map_copy
.argtypes
= [c_void_p
]
3138 isl
.isl_basic_map_free
.restype
= c_void_p
3139 isl
.isl_basic_map_free
.argtypes
= [c_void_p
]
3140 isl
.isl_basic_map_to_str
.restype
= POINTER(c_char
)
3141 isl
.isl_basic_map_to_str
.argtypes
= [c_void_p
]
3143 class union_set(object):
3144 def __init__(self
, *args
, **keywords
):
3145 if "ptr" in keywords
:
3146 self
.ctx
= keywords
["ctx"]
3147 self
.ptr
= keywords
["ptr"]
3149 if len(args
) == 1 and args
[0].__class
__ is basic_set
:
3150 self
.ctx
= Context
.getDefaultInstance()
3151 self
.ptr
= isl
.isl_union_set_from_basic_set(isl
.isl_basic_set_copy(args
[0].ptr
))
3153 if len(args
) == 1 and args
[0].__class
__ is set:
3154 self
.ctx
= Context
.getDefaultInstance()
3155 self
.ptr
= isl
.isl_union_set_from_set(isl
.isl_set_copy(args
[0].ptr
))
3157 if len(args
) == 1 and args
[0].__class
__ is point
:
3158 self
.ctx
= Context
.getDefaultInstance()
3159 self
.ptr
= isl
.isl_union_set_from_point(isl
.isl_point_copy(args
[0].ptr
))
3161 if len(args
) == 1 and type(args
[0]) == str:
3162 self
.ctx
= Context
.getDefaultInstance()
3163 self
.ptr
= isl
.isl_union_set_read_from_str(self
.ctx
, args
[0].encode('ascii'))
3167 if hasattr(self
, 'ptr'):
3168 isl
.isl_union_set_free(self
.ptr
)
3171 if not arg0
.__class__
is union_set
:
3172 arg0
= union_set(arg0
)
3175 ptr
= isl
.isl_union_set_to_str(arg0
.ptr
)
3176 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
3182 return 'isl.union_set("""%s""")' % s
3184 return 'isl.union_set("%s")' % s
3185 def affine_hull(arg0
):
3187 if not arg0
.__class__
is union_set
:
3188 arg0
= union_set(arg0
)
3192 res
= isl
.isl_union_set_affine_hull(isl
.isl_union_set_copy(arg0
.ptr
))
3193 return union_set(ctx
=ctx
, ptr
=res
)
3194 def apply(arg0
, arg1
):
3196 if not arg0
.__class__
is union_set
:
3197 arg0
= union_set(arg0
)
3201 if not arg1
.__class__
is union_map
:
3202 arg1
= union_map(arg1
)
3206 res
= isl
.isl_union_set_apply(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
3207 return union_set(ctx
=ctx
, ptr
=res
)
3210 if not arg0
.__class__
is union_set
:
3211 arg0
= union_set(arg0
)
3215 res
= isl
.isl_union_set_coalesce(isl
.isl_union_set_copy(arg0
.ptr
))
3216 return union_set(ctx
=ctx
, ptr
=res
)
3217 def compute_divs(arg0
):
3219 if not arg0
.__class__
is union_set
:
3220 arg0
= union_set(arg0
)
3224 res
= isl
.isl_union_set_compute_divs(isl
.isl_union_set_copy(arg0
.ptr
))
3225 return union_set(ctx
=ctx
, ptr
=res
)
3226 def detect_equalities(arg0
):
3228 if not arg0
.__class__
is union_set
:
3229 arg0
= union_set(arg0
)
3233 res
= isl
.isl_union_set_detect_equalities(isl
.isl_union_set_copy(arg0
.ptr
))
3234 return union_set(ctx
=ctx
, ptr
=res
)
3235 def foreach_point(arg0
, arg1
):
3237 if not arg0
.__class__
is union_set
:
3238 arg0
= union_set(arg0
)
3242 fn
= CFUNCTYPE(c_int
, c_void_p
, c_void_p
)
3243 def cb_func(cb_arg0
, cb_arg1
):
3244 cb_arg0
= point(ctx
=arg0
.ctx
, ptr
=cb_arg0
)
3249 exc_info
[0] = sys
.exc_info()
3254 res
= isl
.isl_union_set_foreach_point(arg0
.ptr
, cb
, None)
3255 if exc_info
[0] != None:
3256 raise (exc_info
[0][0], exc_info
[0][1], exc_info
[0][2])
3258 def foreach_set(arg0
, arg1
):
3260 if not arg0
.__class__
is union_set
:
3261 arg0
= union_set(arg0
)
3265 fn
= CFUNCTYPE(c_int
, c_void_p
, c_void_p
)
3266 def cb_func(cb_arg0
, cb_arg1
):
3267 cb_arg0
= set(ctx
=arg0
.ctx
, ptr
=cb_arg0
)
3272 exc_info
[0] = sys
.exc_info()
3277 res
= isl
.isl_union_set_foreach_set(arg0
.ptr
, cb
, None)
3278 if exc_info
[0] != None:
3279 raise (exc_info
[0][0], exc_info
[0][1], exc_info
[0][2])
3281 def gist(arg0
, arg1
):
3283 if not arg0
.__class__
is union_set
:
3284 arg0
= union_set(arg0
)
3288 if not arg1
.__class__
is union_set
:
3289 arg1
= union_set(arg1
)
3293 res
= isl
.isl_union_set_gist(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
3294 return union_set(ctx
=ctx
, ptr
=res
)
3295 def gist_params(arg0
, arg1
):
3297 if not arg0
.__class__
is union_set
:
3298 arg0
= union_set(arg0
)
3302 if not arg1
.__class__
is set:
3307 res
= isl
.isl_union_set_gist_params(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3308 return union_set(ctx
=ctx
, ptr
=res
)
3311 if not arg0
.__class__
is union_set
:
3312 arg0
= union_set(arg0
)
3316 res
= isl
.isl_union_set_identity(isl
.isl_union_set_copy(arg0
.ptr
))
3317 return union_map(ctx
=ctx
, ptr
=res
)
3318 def intersect(arg0
, arg1
):
3320 if not arg0
.__class__
is union_set
:
3321 arg0
= union_set(arg0
)
3325 if not arg1
.__class__
is union_set
:
3326 arg1
= union_set(arg1
)
3330 res
= isl
.isl_union_set_intersect(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
3331 return union_set(ctx
=ctx
, ptr
=res
)
3332 def intersect_params(arg0
, arg1
):
3334 if not arg0
.__class__
is union_set
:
3335 arg0
= union_set(arg0
)
3339 if not arg1
.__class__
is set:
3344 res
= isl
.isl_union_set_intersect_params(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3345 return union_set(ctx
=ctx
, ptr
=res
)
3348 if not arg0
.__class__
is union_set
:
3349 arg0
= union_set(arg0
)
3353 res
= isl
.isl_union_set_is_empty(arg0
.ptr
)
3357 def is_equal(arg0
, arg1
):
3359 if not arg0
.__class__
is union_set
:
3360 arg0
= union_set(arg0
)
3364 if not arg1
.__class__
is union_set
:
3365 arg1
= union_set(arg1
)
3369 res
= isl
.isl_union_set_is_equal(arg0
.ptr
, arg1
.ptr
)
3373 def is_strict_subset(arg0
, arg1
):
3375 if not arg0
.__class__
is union_set
:
3376 arg0
= union_set(arg0
)
3380 if not arg1
.__class__
is union_set
:
3381 arg1
= union_set(arg1
)
3385 res
= isl
.isl_union_set_is_strict_subset(arg0
.ptr
, arg1
.ptr
)
3389 def is_subset(arg0
, arg1
):
3391 if not arg0
.__class__
is union_set
:
3392 arg0
= union_set(arg0
)
3396 if not arg1
.__class__
is union_set
:
3397 arg1
= union_set(arg1
)
3401 res
= isl
.isl_union_set_is_subset(arg0
.ptr
, arg1
.ptr
)
3407 if not arg0
.__class__
is union_set
:
3408 arg0
= union_set(arg0
)
3412 res
= isl
.isl_union_set_lexmax(isl
.isl_union_set_copy(arg0
.ptr
))
3413 return union_set(ctx
=ctx
, ptr
=res
)
3416 if not arg0
.__class__
is union_set
:
3417 arg0
= union_set(arg0
)
3421 res
= isl
.isl_union_set_lexmin(isl
.isl_union_set_copy(arg0
.ptr
))
3422 return union_set(ctx
=ctx
, ptr
=res
)
3423 def polyhedral_hull(arg0
):
3425 if not arg0
.__class__
is union_set
:
3426 arg0
= union_set(arg0
)
3430 res
= isl
.isl_union_set_polyhedral_hull(isl
.isl_union_set_copy(arg0
.ptr
))
3431 return union_set(ctx
=ctx
, ptr
=res
)
3432 def preimage(arg0
, arg1
):
3433 if arg1
.__class__
is multi_aff
:
3434 res
= isl
.isl_union_set_preimage_multi_aff(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_multi_aff_copy(arg1
.ptr
))
3435 return union_set(ctx
=arg0
.ctx
, ptr
=res
)
3436 if arg1
.__class__
is pw_multi_aff
:
3437 res
= isl
.isl_union_set_preimage_pw_multi_aff(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_pw_multi_aff_copy(arg1
.ptr
))
3438 return union_set(ctx
=arg0
.ctx
, ptr
=res
)
3439 if arg1
.__class__
is union_pw_multi_aff
:
3440 res
= isl
.isl_union_set_preimage_union_pw_multi_aff(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
3441 return union_set(ctx
=arg0
.ctx
, ptr
=res
)
3442 def sample_point(arg0
):
3444 if not arg0
.__class__
is union_set
:
3445 arg0
= union_set(arg0
)
3449 res
= isl
.isl_union_set_sample_point(isl
.isl_union_set_copy(arg0
.ptr
))
3450 return point(ctx
=ctx
, ptr
=res
)
3451 def subtract(arg0
, arg1
):
3453 if not arg0
.__class__
is union_set
:
3454 arg0
= union_set(arg0
)
3458 if not arg1
.__class__
is union_set
:
3459 arg1
= union_set(arg1
)
3463 res
= isl
.isl_union_set_subtract(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
3464 return union_set(ctx
=ctx
, ptr
=res
)
3465 def union(arg0
, arg1
):
3467 if not arg0
.__class__
is union_set
:
3468 arg0
= union_set(arg0
)
3472 if not arg1
.__class__
is union_set
:
3473 arg1
= union_set(arg1
)
3477 res
= isl
.isl_union_set_union(isl
.isl_union_set_copy(arg0
.ptr
), isl
.isl_union_set_copy(arg1
.ptr
))
3478 return union_set(ctx
=ctx
, ptr
=res
)
3481 if not arg0
.__class__
is union_set
:
3482 arg0
= union_set(arg0
)
3486 res
= isl
.isl_union_set_unwrap(isl
.isl_union_set_copy(arg0
.ptr
))
3487 return union_map(ctx
=ctx
, ptr
=res
)
3489 isl
.isl_union_set_from_basic_set
.restype
= c_void_p
3490 isl
.isl_union_set_from_basic_set
.argtypes
= [c_void_p
]
3491 isl
.isl_union_set_from_set
.restype
= c_void_p
3492 isl
.isl_union_set_from_set
.argtypes
= [c_void_p
]
3493 isl
.isl_union_set_from_point
.restype
= c_void_p
3494 isl
.isl_union_set_from_point
.argtypes
= [c_void_p
]
3495 isl
.isl_union_set_read_from_str
.restype
= c_void_p
3496 isl
.isl_union_set_read_from_str
.argtypes
= [Context
, c_char_p
]
3497 isl
.isl_union_set_affine_hull
.restype
= c_void_p
3498 isl
.isl_union_set_affine_hull
.argtypes
= [c_void_p
]
3499 isl
.isl_union_set_apply
.restype
= c_void_p
3500 isl
.isl_union_set_apply
.argtypes
= [c_void_p
, c_void_p
]
3501 isl
.isl_union_set_coalesce
.restype
= c_void_p
3502 isl
.isl_union_set_coalesce
.argtypes
= [c_void_p
]
3503 isl
.isl_union_set_compute_divs
.restype
= c_void_p
3504 isl
.isl_union_set_compute_divs
.argtypes
= [c_void_p
]
3505 isl
.isl_union_set_detect_equalities
.restype
= c_void_p
3506 isl
.isl_union_set_detect_equalities
.argtypes
= [c_void_p
]
3507 isl
.isl_union_set_foreach_point
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
3508 isl
.isl_union_set_foreach_set
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
3509 isl
.isl_union_set_gist
.restype
= c_void_p
3510 isl
.isl_union_set_gist
.argtypes
= [c_void_p
, c_void_p
]
3511 isl
.isl_union_set_gist_params
.restype
= c_void_p
3512 isl
.isl_union_set_gist_params
.argtypes
= [c_void_p
, c_void_p
]
3513 isl
.isl_union_set_identity
.restype
= c_void_p
3514 isl
.isl_union_set_identity
.argtypes
= [c_void_p
]
3515 isl
.isl_union_set_intersect
.restype
= c_void_p
3516 isl
.isl_union_set_intersect
.argtypes
= [c_void_p
, c_void_p
]
3517 isl
.isl_union_set_intersect_params
.restype
= c_void_p
3518 isl
.isl_union_set_intersect_params
.argtypes
= [c_void_p
, c_void_p
]
3519 isl
.isl_union_set_is_empty
.restype
= c_bool
3520 isl
.isl_union_set_is_empty
.argtypes
= [c_void_p
]
3521 isl
.isl_union_set_is_equal
.restype
= c_bool
3522 isl
.isl_union_set_is_equal
.argtypes
= [c_void_p
, c_void_p
]
3523 isl
.isl_union_set_is_strict_subset
.restype
= c_bool
3524 isl
.isl_union_set_is_strict_subset
.argtypes
= [c_void_p
, c_void_p
]
3525 isl
.isl_union_set_is_subset
.restype
= c_bool
3526 isl
.isl_union_set_is_subset
.argtypes
= [c_void_p
, c_void_p
]
3527 isl
.isl_union_set_lexmax
.restype
= c_void_p
3528 isl
.isl_union_set_lexmax
.argtypes
= [c_void_p
]
3529 isl
.isl_union_set_lexmin
.restype
= c_void_p
3530 isl
.isl_union_set_lexmin
.argtypes
= [c_void_p
]
3531 isl
.isl_union_set_polyhedral_hull
.restype
= c_void_p
3532 isl
.isl_union_set_polyhedral_hull
.argtypes
= [c_void_p
]
3533 isl
.isl_union_set_preimage_multi_aff
.restype
= c_void_p
3534 isl
.isl_union_set_preimage_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
3535 isl
.isl_union_set_preimage_pw_multi_aff
.restype
= c_void_p
3536 isl
.isl_union_set_preimage_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
3537 isl
.isl_union_set_preimage_union_pw_multi_aff
.restype
= c_void_p
3538 isl
.isl_union_set_preimage_union_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
3539 isl
.isl_union_set_sample_point
.restype
= c_void_p
3540 isl
.isl_union_set_sample_point
.argtypes
= [c_void_p
]
3541 isl
.isl_union_set_subtract
.restype
= c_void_p
3542 isl
.isl_union_set_subtract
.argtypes
= [c_void_p
, c_void_p
]
3543 isl
.isl_union_set_union
.restype
= c_void_p
3544 isl
.isl_union_set_union
.argtypes
= [c_void_p
, c_void_p
]
3545 isl
.isl_union_set_unwrap
.restype
= c_void_p
3546 isl
.isl_union_set_unwrap
.argtypes
= [c_void_p
]
3547 isl
.isl_union_set_copy
.restype
= c_void_p
3548 isl
.isl_union_set_copy
.argtypes
= [c_void_p
]
3549 isl
.isl_union_set_free
.restype
= c_void_p
3550 isl
.isl_union_set_free
.argtypes
= [c_void_p
]
3551 isl
.isl_union_set_to_str
.restype
= POINTER(c_char
)
3552 isl
.isl_union_set_to_str
.argtypes
= [c_void_p
]
3554 class set(union_set
):
3555 def __init__(self
, *args
, **keywords
):
3556 if "ptr" in keywords
:
3557 self
.ctx
= keywords
["ctx"]
3558 self
.ptr
= keywords
["ptr"]
3560 if len(args
) == 1 and type(args
[0]) == str:
3561 self
.ctx
= Context
.getDefaultInstance()
3562 self
.ptr
= isl
.isl_set_read_from_str(self
.ctx
, args
[0].encode('ascii'))
3564 if len(args
) == 1 and args
[0].__class
__ is basic_set
:
3565 self
.ctx
= Context
.getDefaultInstance()
3566 self
.ptr
= isl
.isl_set_from_basic_set(isl
.isl_basic_set_copy(args
[0].ptr
))
3568 if len(args
) == 1 and args
[0].__class
__ is point
:
3569 self
.ctx
= Context
.getDefaultInstance()
3570 self
.ptr
= isl
.isl_set_from_point(isl
.isl_point_copy(args
[0].ptr
))
3574 if hasattr(self
, 'ptr'):
3575 isl
.isl_set_free(self
.ptr
)
3578 if not arg0
.__class__
is set:
3582 ptr
= isl
.isl_set_to_str(arg0
.ptr
)
3583 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
3589 return 'isl.set("""%s""")' % s
3591 return 'isl.set("%s")' % s
3592 def affine_hull(arg0
):
3594 if not arg0
.__class__
is set:
3599 res
= isl
.isl_set_affine_hull(isl
.isl_set_copy(arg0
.ptr
))
3600 return basic_set(ctx
=ctx
, ptr
=res
)
3601 def apply(arg0
, arg1
):
3603 if not arg0
.__class__
is set:
3608 if not arg1
.__class__
is map:
3611 return union_set(arg0
).apply(arg1
)
3613 res
= isl
.isl_set_apply(isl
.isl_set_copy(arg0
.ptr
), isl
.isl_map_copy(arg1
.ptr
))
3614 return set(ctx
=ctx
, ptr
=res
)
3617 if not arg0
.__class__
is set:
3622 res
= isl
.isl_set_coalesce(isl
.isl_set_copy(arg0
.ptr
))
3623 return set(ctx
=ctx
, ptr
=res
)
3624 def complement(arg0
):
3626 if not arg0
.__class__
is set:
3631 res
= isl
.isl_set_complement(isl
.isl_set_copy(arg0
.ptr
))
3632 return set(ctx
=ctx
, ptr
=res
)
3633 def detect_equalities(arg0
):
3635 if not arg0
.__class__
is set:
3640 res
= isl
.isl_set_detect_equalities(isl
.isl_set_copy(arg0
.ptr
))
3641 return set(ctx
=ctx
, ptr
=res
)
3644 if not arg0
.__class__
is set:
3649 res
= isl
.isl_set_flatten(isl
.isl_set_copy(arg0
.ptr
))
3650 return set(ctx
=ctx
, ptr
=res
)
3651 def foreach_basic_set(arg0
, arg1
):
3653 if not arg0
.__class__
is set:
3658 fn
= CFUNCTYPE(c_int
, c_void_p
, c_void_p
)
3659 def cb_func(cb_arg0
, cb_arg1
):
3660 cb_arg0
= basic_set(ctx
=arg0
.ctx
, ptr
=cb_arg0
)
3665 exc_info
[0] = sys
.exc_info()
3670 res
= isl
.isl_set_foreach_basic_set(arg0
.ptr
, cb
, None)
3671 if exc_info
[0] != None:
3672 raise (exc_info
[0][0], exc_info
[0][1], exc_info
[0][2])
3674 def get_stride(arg0
, arg1
):
3676 if not arg0
.__class__
is set:
3681 res
= isl
.isl_set_get_stride(arg0
.ptr
, arg1
)
3682 return val(ctx
=ctx
, ptr
=res
)
3683 def gist(arg0
, arg1
):
3685 if not arg0
.__class__
is set:
3690 if not arg1
.__class__
is set:
3693 return union_set(arg0
).gist(arg1
)
3695 res
= isl
.isl_set_gist(isl
.isl_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3696 return set(ctx
=ctx
, ptr
=res
)
3699 if not arg0
.__class__
is set:
3704 res
= isl
.isl_set_identity(isl
.isl_set_copy(arg0
.ptr
))
3705 return map(ctx
=ctx
, ptr
=res
)
3706 def intersect(arg0
, arg1
):
3708 if not arg0
.__class__
is set:
3713 if not arg1
.__class__
is set:
3716 return union_set(arg0
).intersect(arg1
)
3718 res
= isl
.isl_set_intersect(isl
.isl_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3719 return set(ctx
=ctx
, ptr
=res
)
3720 def intersect_params(arg0
, arg1
):
3722 if not arg0
.__class__
is set:
3727 if not arg1
.__class__
is set:
3730 return union_set(arg0
).intersect_params(arg1
)
3732 res
= isl
.isl_set_intersect_params(isl
.isl_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3733 return set(ctx
=ctx
, ptr
=res
)
3734 def is_disjoint(arg0
, arg1
):
3736 if not arg0
.__class__
is set:
3741 if not arg1
.__class__
is set:
3744 return union_set(arg0
).is_disjoint(arg1
)
3746 res
= isl
.isl_set_is_disjoint(arg0
.ptr
, arg1
.ptr
)
3752 if not arg0
.__class__
is set:
3757 res
= isl
.isl_set_is_empty(arg0
.ptr
)
3761 def is_equal(arg0
, arg1
):
3763 if not arg0
.__class__
is set:
3768 if not arg1
.__class__
is set:
3771 return union_set(arg0
).is_equal(arg1
)
3773 res
= isl
.isl_set_is_equal(arg0
.ptr
, arg1
.ptr
)
3777 def is_strict_subset(arg0
, arg1
):
3779 if not arg0
.__class__
is set:
3784 if not arg1
.__class__
is set:
3787 return union_set(arg0
).is_strict_subset(arg1
)
3789 res
= isl
.isl_set_is_strict_subset(arg0
.ptr
, arg1
.ptr
)
3793 def is_subset(arg0
, arg1
):
3795 if not arg0
.__class__
is set:
3800 if not arg1
.__class__
is set:
3803 return union_set(arg0
).is_subset(arg1
)
3805 res
= isl
.isl_set_is_subset(arg0
.ptr
, arg1
.ptr
)
3809 def is_wrapping(arg0
):
3811 if not arg0
.__class__
is set:
3816 res
= isl
.isl_set_is_wrapping(arg0
.ptr
)
3822 if not arg0
.__class__
is set:
3827 res
= isl
.isl_set_lexmax(isl
.isl_set_copy(arg0
.ptr
))
3828 return set(ctx
=ctx
, ptr
=res
)
3831 if not arg0
.__class__
is set:
3836 res
= isl
.isl_set_lexmin(isl
.isl_set_copy(arg0
.ptr
))
3837 return set(ctx
=ctx
, ptr
=res
)
3838 def max_val(arg0
, arg1
):
3840 if not arg0
.__class__
is set:
3845 if not arg1
.__class__
is aff
:
3848 return union_set(arg0
).max_val(arg1
)
3850 res
= isl
.isl_set_max_val(arg0
.ptr
, arg1
.ptr
)
3851 return val(ctx
=ctx
, ptr
=res
)
3852 def min_val(arg0
, arg1
):
3854 if not arg0
.__class__
is set:
3859 if not arg1
.__class__
is aff
:
3862 return union_set(arg0
).min_val(arg1
)
3864 res
= isl
.isl_set_min_val(arg0
.ptr
, arg1
.ptr
)
3865 return val(ctx
=ctx
, ptr
=res
)
3866 def polyhedral_hull(arg0
):
3868 if not arg0
.__class__
is set:
3873 res
= isl
.isl_set_polyhedral_hull(isl
.isl_set_copy(arg0
.ptr
))
3874 return basic_set(ctx
=ctx
, ptr
=res
)
3877 if not arg0
.__class__
is set:
3882 res
= isl
.isl_set_sample(isl
.isl_set_copy(arg0
.ptr
))
3883 return basic_set(ctx
=ctx
, ptr
=res
)
3884 def sample_point(arg0
):
3886 if not arg0
.__class__
is set:
3891 res
= isl
.isl_set_sample_point(isl
.isl_set_copy(arg0
.ptr
))
3892 return point(ctx
=ctx
, ptr
=res
)
3893 def subtract(arg0
, arg1
):
3895 if not arg0
.__class__
is set:
3900 if not arg1
.__class__
is set:
3903 return union_set(arg0
).subtract(arg1
)
3905 res
= isl
.isl_set_subtract(isl
.isl_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3906 return set(ctx
=ctx
, ptr
=res
)
3907 def union(arg0
, arg1
):
3909 if not arg0
.__class__
is set:
3914 if not arg1
.__class__
is set:
3917 return union_set(arg0
).union(arg1
)
3919 res
= isl
.isl_set_union(isl
.isl_set_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
3920 return set(ctx
=ctx
, ptr
=res
)
3921 def unshifted_simple_hull(arg0
):
3923 if not arg0
.__class__
is set:
3928 res
= isl
.isl_set_unshifted_simple_hull(isl
.isl_set_copy(arg0
.ptr
))
3929 return basic_set(ctx
=ctx
, ptr
=res
)
3931 isl
.isl_set_read_from_str
.restype
= c_void_p
3932 isl
.isl_set_read_from_str
.argtypes
= [Context
, c_char_p
]
3933 isl
.isl_set_from_basic_set
.restype
= c_void_p
3934 isl
.isl_set_from_basic_set
.argtypes
= [c_void_p
]
3935 isl
.isl_set_from_point
.restype
= c_void_p
3936 isl
.isl_set_from_point
.argtypes
= [c_void_p
]
3937 isl
.isl_set_affine_hull
.restype
= c_void_p
3938 isl
.isl_set_affine_hull
.argtypes
= [c_void_p
]
3939 isl
.isl_set_apply
.restype
= c_void_p
3940 isl
.isl_set_apply
.argtypes
= [c_void_p
, c_void_p
]
3941 isl
.isl_set_coalesce
.restype
= c_void_p
3942 isl
.isl_set_coalesce
.argtypes
= [c_void_p
]
3943 isl
.isl_set_complement
.restype
= c_void_p
3944 isl
.isl_set_complement
.argtypes
= [c_void_p
]
3945 isl
.isl_set_detect_equalities
.restype
= c_void_p
3946 isl
.isl_set_detect_equalities
.argtypes
= [c_void_p
]
3947 isl
.isl_set_flatten
.restype
= c_void_p
3948 isl
.isl_set_flatten
.argtypes
= [c_void_p
]
3949 isl
.isl_set_foreach_basic_set
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
3950 isl
.isl_set_get_stride
.restype
= c_void_p
3951 isl
.isl_set_get_stride
.argtypes
= [c_void_p
, c_int
]
3952 isl
.isl_set_gist
.restype
= c_void_p
3953 isl
.isl_set_gist
.argtypes
= [c_void_p
, c_void_p
]
3954 isl
.isl_set_identity
.restype
= c_void_p
3955 isl
.isl_set_identity
.argtypes
= [c_void_p
]
3956 isl
.isl_set_intersect
.restype
= c_void_p
3957 isl
.isl_set_intersect
.argtypes
= [c_void_p
, c_void_p
]
3958 isl
.isl_set_intersect_params
.restype
= c_void_p
3959 isl
.isl_set_intersect_params
.argtypes
= [c_void_p
, c_void_p
]
3960 isl
.isl_set_is_disjoint
.restype
= c_bool
3961 isl
.isl_set_is_disjoint
.argtypes
= [c_void_p
, c_void_p
]
3962 isl
.isl_set_is_empty
.restype
= c_bool
3963 isl
.isl_set_is_empty
.argtypes
= [c_void_p
]
3964 isl
.isl_set_is_equal
.restype
= c_bool
3965 isl
.isl_set_is_equal
.argtypes
= [c_void_p
, c_void_p
]
3966 isl
.isl_set_is_strict_subset
.restype
= c_bool
3967 isl
.isl_set_is_strict_subset
.argtypes
= [c_void_p
, c_void_p
]
3968 isl
.isl_set_is_subset
.restype
= c_bool
3969 isl
.isl_set_is_subset
.argtypes
= [c_void_p
, c_void_p
]
3970 isl
.isl_set_is_wrapping
.restype
= c_bool
3971 isl
.isl_set_is_wrapping
.argtypes
= [c_void_p
]
3972 isl
.isl_set_lexmax
.restype
= c_void_p
3973 isl
.isl_set_lexmax
.argtypes
= [c_void_p
]
3974 isl
.isl_set_lexmin
.restype
= c_void_p
3975 isl
.isl_set_lexmin
.argtypes
= [c_void_p
]
3976 isl
.isl_set_max_val
.restype
= c_void_p
3977 isl
.isl_set_max_val
.argtypes
= [c_void_p
, c_void_p
]
3978 isl
.isl_set_min_val
.restype
= c_void_p
3979 isl
.isl_set_min_val
.argtypes
= [c_void_p
, c_void_p
]
3980 isl
.isl_set_polyhedral_hull
.restype
= c_void_p
3981 isl
.isl_set_polyhedral_hull
.argtypes
= [c_void_p
]
3982 isl
.isl_set_sample
.restype
= c_void_p
3983 isl
.isl_set_sample
.argtypes
= [c_void_p
]
3984 isl
.isl_set_sample_point
.restype
= c_void_p
3985 isl
.isl_set_sample_point
.argtypes
= [c_void_p
]
3986 isl
.isl_set_subtract
.restype
= c_void_p
3987 isl
.isl_set_subtract
.argtypes
= [c_void_p
, c_void_p
]
3988 isl
.isl_set_union
.restype
= c_void_p
3989 isl
.isl_set_union
.argtypes
= [c_void_p
, c_void_p
]
3990 isl
.isl_set_unshifted_simple_hull
.restype
= c_void_p
3991 isl
.isl_set_unshifted_simple_hull
.argtypes
= [c_void_p
]
3992 isl
.isl_set_copy
.restype
= c_void_p
3993 isl
.isl_set_copy
.argtypes
= [c_void_p
]
3994 isl
.isl_set_free
.restype
= c_void_p
3995 isl
.isl_set_free
.argtypes
= [c_void_p
]
3996 isl
.isl_set_to_str
.restype
= POINTER(c_char
)
3997 isl
.isl_set_to_str
.argtypes
= [c_void_p
]
3999 class basic_set(set):
4000 def __init__(self
, *args
, **keywords
):
4001 if "ptr" in keywords
:
4002 self
.ctx
= keywords
["ctx"]
4003 self
.ptr
= keywords
["ptr"]
4005 if len(args
) == 1 and type(args
[0]) == str:
4006 self
.ctx
= Context
.getDefaultInstance()
4007 self
.ptr
= isl
.isl_basic_set_read_from_str(self
.ctx
, args
[0].encode('ascii'))
4009 if len(args
) == 1 and args
[0].__class
__ is point
:
4010 self
.ctx
= Context
.getDefaultInstance()
4011 self
.ptr
= isl
.isl_basic_set_from_point(isl
.isl_point_copy(args
[0].ptr
))
4015 if hasattr(self
, 'ptr'):
4016 isl
.isl_basic_set_free(self
.ptr
)
4019 if not arg0
.__class__
is basic_set
:
4020 arg0
= basic_set(arg0
)
4023 ptr
= isl
.isl_basic_set_to_str(arg0
.ptr
)
4024 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4030 return 'isl.basic_set("""%s""")' % s
4032 return 'isl.basic_set("%s")' % s
4033 def affine_hull(arg0
):
4035 if not arg0
.__class__
is basic_set
:
4036 arg0
= basic_set(arg0
)
4040 res
= isl
.isl_basic_set_affine_hull(isl
.isl_basic_set_copy(arg0
.ptr
))
4041 return basic_set(ctx
=ctx
, ptr
=res
)
4042 def apply(arg0
, arg1
):
4044 if not arg0
.__class__
is basic_set
:
4045 arg0
= basic_set(arg0
)
4049 if not arg1
.__class__
is basic_map
:
4050 arg1
= basic_map(arg1
)
4052 return set(arg0
).apply(arg1
)
4054 res
= isl
.isl_basic_set_apply(isl
.isl_basic_set_copy(arg0
.ptr
), isl
.isl_basic_map_copy(arg1
.ptr
))
4055 return basic_set(ctx
=ctx
, ptr
=res
)
4056 def detect_equalities(arg0
):
4058 if not arg0
.__class__
is basic_set
:
4059 arg0
= basic_set(arg0
)
4063 res
= isl
.isl_basic_set_detect_equalities(isl
.isl_basic_set_copy(arg0
.ptr
))
4064 return basic_set(ctx
=ctx
, ptr
=res
)
4065 def dim_max_val(arg0
, arg1
):
4067 if not arg0
.__class__
is basic_set
:
4068 arg0
= basic_set(arg0
)
4072 res
= isl
.isl_basic_set_dim_max_val(isl
.isl_basic_set_copy(arg0
.ptr
), arg1
)
4073 return val(ctx
=ctx
, ptr
=res
)
4076 if not arg0
.__class__
is basic_set
:
4077 arg0
= basic_set(arg0
)
4081 res
= isl
.isl_basic_set_flatten(isl
.isl_basic_set_copy(arg0
.ptr
))
4082 return basic_set(ctx
=ctx
, ptr
=res
)
4083 def gist(arg0
, arg1
):
4085 if not arg0
.__class__
is basic_set
:
4086 arg0
= basic_set(arg0
)
4090 if not arg1
.__class__
is basic_set
:
4091 arg1
= basic_set(arg1
)
4093 return set(arg0
).gist(arg1
)
4095 res
= isl
.isl_basic_set_gist(isl
.isl_basic_set_copy(arg0
.ptr
), isl
.isl_basic_set_copy(arg1
.ptr
))
4096 return basic_set(ctx
=ctx
, ptr
=res
)
4097 def intersect(arg0
, arg1
):
4099 if not arg0
.__class__
is basic_set
:
4100 arg0
= basic_set(arg0
)
4104 if not arg1
.__class__
is basic_set
:
4105 arg1
= basic_set(arg1
)
4107 return set(arg0
).intersect(arg1
)
4109 res
= isl
.isl_basic_set_intersect(isl
.isl_basic_set_copy(arg0
.ptr
), isl
.isl_basic_set_copy(arg1
.ptr
))
4110 return basic_set(ctx
=ctx
, ptr
=res
)
4111 def intersect_params(arg0
, arg1
):
4113 if not arg0
.__class__
is basic_set
:
4114 arg0
= basic_set(arg0
)
4118 if not arg1
.__class__
is basic_set
:
4119 arg1
= basic_set(arg1
)
4121 return set(arg0
).intersect_params(arg1
)
4123 res
= isl
.isl_basic_set_intersect_params(isl
.isl_basic_set_copy(arg0
.ptr
), isl
.isl_basic_set_copy(arg1
.ptr
))
4124 return basic_set(ctx
=ctx
, ptr
=res
)
4127 if not arg0
.__class__
is basic_set
:
4128 arg0
= basic_set(arg0
)
4132 res
= isl
.isl_basic_set_is_empty(arg0
.ptr
)
4136 def is_equal(arg0
, arg1
):
4138 if not arg0
.__class__
is basic_set
:
4139 arg0
= basic_set(arg0
)
4143 if not arg1
.__class__
is basic_set
:
4144 arg1
= basic_set(arg1
)
4146 return set(arg0
).is_equal(arg1
)
4148 res
= isl
.isl_basic_set_is_equal(arg0
.ptr
, arg1
.ptr
)
4152 def is_subset(arg0
, arg1
):
4154 if not arg0
.__class__
is basic_set
:
4155 arg0
= basic_set(arg0
)
4159 if not arg1
.__class__
is basic_set
:
4160 arg1
= basic_set(arg1
)
4162 return set(arg0
).is_subset(arg1
)
4164 res
= isl
.isl_basic_set_is_subset(arg0
.ptr
, arg1
.ptr
)
4168 def is_wrapping(arg0
):
4170 if not arg0
.__class__
is basic_set
:
4171 arg0
= basic_set(arg0
)
4175 res
= isl
.isl_basic_set_is_wrapping(arg0
.ptr
)
4181 if not arg0
.__class__
is basic_set
:
4182 arg0
= basic_set(arg0
)
4186 res
= isl
.isl_basic_set_lexmax(isl
.isl_basic_set_copy(arg0
.ptr
))
4187 return set(ctx
=ctx
, ptr
=res
)
4190 if not arg0
.__class__
is basic_set
:
4191 arg0
= basic_set(arg0
)
4195 res
= isl
.isl_basic_set_lexmin(isl
.isl_basic_set_copy(arg0
.ptr
))
4196 return set(ctx
=ctx
, ptr
=res
)
4199 if not arg0
.__class__
is basic_set
:
4200 arg0
= basic_set(arg0
)
4204 res
= isl
.isl_basic_set_sample(isl
.isl_basic_set_copy(arg0
.ptr
))
4205 return basic_set(ctx
=ctx
, ptr
=res
)
4206 def sample_point(arg0
):
4208 if not arg0
.__class__
is basic_set
:
4209 arg0
= basic_set(arg0
)
4213 res
= isl
.isl_basic_set_sample_point(isl
.isl_basic_set_copy(arg0
.ptr
))
4214 return point(ctx
=ctx
, ptr
=res
)
4215 def union(arg0
, arg1
):
4217 if not arg0
.__class__
is basic_set
:
4218 arg0
= basic_set(arg0
)
4222 if not arg1
.__class__
is basic_set
:
4223 arg1
= basic_set(arg1
)
4225 return set(arg0
).union(arg1
)
4227 res
= isl
.isl_basic_set_union(isl
.isl_basic_set_copy(arg0
.ptr
), isl
.isl_basic_set_copy(arg1
.ptr
))
4228 return set(ctx
=ctx
, ptr
=res
)
4230 isl
.isl_basic_set_read_from_str
.restype
= c_void_p
4231 isl
.isl_basic_set_read_from_str
.argtypes
= [Context
, c_char_p
]
4232 isl
.isl_basic_set_from_point
.restype
= c_void_p
4233 isl
.isl_basic_set_from_point
.argtypes
= [c_void_p
]
4234 isl
.isl_basic_set_affine_hull
.restype
= c_void_p
4235 isl
.isl_basic_set_affine_hull
.argtypes
= [c_void_p
]
4236 isl
.isl_basic_set_apply
.restype
= c_void_p
4237 isl
.isl_basic_set_apply
.argtypes
= [c_void_p
, c_void_p
]
4238 isl
.isl_basic_set_detect_equalities
.restype
= c_void_p
4239 isl
.isl_basic_set_detect_equalities
.argtypes
= [c_void_p
]
4240 isl
.isl_basic_set_dim_max_val
.restype
= c_void_p
4241 isl
.isl_basic_set_dim_max_val
.argtypes
= [c_void_p
, c_int
]
4242 isl
.isl_basic_set_flatten
.restype
= c_void_p
4243 isl
.isl_basic_set_flatten
.argtypes
= [c_void_p
]
4244 isl
.isl_basic_set_gist
.restype
= c_void_p
4245 isl
.isl_basic_set_gist
.argtypes
= [c_void_p
, c_void_p
]
4246 isl
.isl_basic_set_intersect
.restype
= c_void_p
4247 isl
.isl_basic_set_intersect
.argtypes
= [c_void_p
, c_void_p
]
4248 isl
.isl_basic_set_intersect_params
.restype
= c_void_p
4249 isl
.isl_basic_set_intersect_params
.argtypes
= [c_void_p
, c_void_p
]
4250 isl
.isl_basic_set_is_empty
.restype
= c_bool
4251 isl
.isl_basic_set_is_empty
.argtypes
= [c_void_p
]
4252 isl
.isl_basic_set_is_equal
.restype
= c_bool
4253 isl
.isl_basic_set_is_equal
.argtypes
= [c_void_p
, c_void_p
]
4254 isl
.isl_basic_set_is_subset
.restype
= c_bool
4255 isl
.isl_basic_set_is_subset
.argtypes
= [c_void_p
, c_void_p
]
4256 isl
.isl_basic_set_is_wrapping
.restype
= c_bool
4257 isl
.isl_basic_set_is_wrapping
.argtypes
= [c_void_p
]
4258 isl
.isl_basic_set_lexmax
.restype
= c_void_p
4259 isl
.isl_basic_set_lexmax
.argtypes
= [c_void_p
]
4260 isl
.isl_basic_set_lexmin
.restype
= c_void_p
4261 isl
.isl_basic_set_lexmin
.argtypes
= [c_void_p
]
4262 isl
.isl_basic_set_sample
.restype
= c_void_p
4263 isl
.isl_basic_set_sample
.argtypes
= [c_void_p
]
4264 isl
.isl_basic_set_sample_point
.restype
= c_void_p
4265 isl
.isl_basic_set_sample_point
.argtypes
= [c_void_p
]
4266 isl
.isl_basic_set_union
.restype
= c_void_p
4267 isl
.isl_basic_set_union
.argtypes
= [c_void_p
, c_void_p
]
4268 isl
.isl_basic_set_copy
.restype
= c_void_p
4269 isl
.isl_basic_set_copy
.argtypes
= [c_void_p
]
4270 isl
.isl_basic_set_free
.restype
= c_void_p
4271 isl
.isl_basic_set_free
.argtypes
= [c_void_p
]
4272 isl
.isl_basic_set_to_str
.restype
= POINTER(c_char
)
4273 isl
.isl_basic_set_to_str
.argtypes
= [c_void_p
]
4275 class multi_val(object):
4276 def __init__(self
, *args
, **keywords
):
4277 if "ptr" in keywords
:
4278 self
.ctx
= keywords
["ctx"]
4279 self
.ptr
= keywords
["ptr"]
4283 if hasattr(self
, 'ptr'):
4284 isl
.isl_multi_val_free(self
.ptr
)
4287 if not arg0
.__class__
is multi_val
:
4288 arg0
= multi_val(arg0
)
4291 ptr
= isl
.isl_multi_val_to_str(arg0
.ptr
)
4292 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4298 return 'isl.multi_val("""%s""")' % s
4300 return 'isl.multi_val("%s")' % s
4301 def add(arg0
, arg1
):
4303 if not arg0
.__class__
is multi_val
:
4304 arg0
= multi_val(arg0
)
4308 if not arg1
.__class__
is multi_val
:
4309 arg1
= multi_val(arg1
)
4313 res
= isl
.isl_multi_val_add(isl
.isl_multi_val_copy(arg0
.ptr
), isl
.isl_multi_val_copy(arg1
.ptr
))
4314 return multi_val(ctx
=ctx
, ptr
=res
)
4315 def flat_range_product(arg0
, arg1
):
4317 if not arg0
.__class__
is multi_val
:
4318 arg0
= multi_val(arg0
)
4322 if not arg1
.__class__
is multi_val
:
4323 arg1
= multi_val(arg1
)
4327 res
= isl
.isl_multi_val_flat_range_product(isl
.isl_multi_val_copy(arg0
.ptr
), isl
.isl_multi_val_copy(arg1
.ptr
))
4328 return multi_val(ctx
=ctx
, ptr
=res
)
4329 def product(arg0
, arg1
):
4331 if not arg0
.__class__
is multi_val
:
4332 arg0
= multi_val(arg0
)
4336 if not arg1
.__class__
is multi_val
:
4337 arg1
= multi_val(arg1
)
4341 res
= isl
.isl_multi_val_product(isl
.isl_multi_val_copy(arg0
.ptr
), isl
.isl_multi_val_copy(arg1
.ptr
))
4342 return multi_val(ctx
=ctx
, ptr
=res
)
4343 def range_product(arg0
, arg1
):
4345 if not arg0
.__class__
is multi_val
:
4346 arg0
= multi_val(arg0
)
4350 if not arg1
.__class__
is multi_val
:
4351 arg1
= multi_val(arg1
)
4355 res
= isl
.isl_multi_val_range_product(isl
.isl_multi_val_copy(arg0
.ptr
), isl
.isl_multi_val_copy(arg1
.ptr
))
4356 return multi_val(ctx
=ctx
, ptr
=res
)
4358 isl
.isl_multi_val_add
.restype
= c_void_p
4359 isl
.isl_multi_val_add
.argtypes
= [c_void_p
, c_void_p
]
4360 isl
.isl_multi_val_flat_range_product
.restype
= c_void_p
4361 isl
.isl_multi_val_flat_range_product
.argtypes
= [c_void_p
, c_void_p
]
4362 isl
.isl_multi_val_product
.restype
= c_void_p
4363 isl
.isl_multi_val_product
.argtypes
= [c_void_p
, c_void_p
]
4364 isl
.isl_multi_val_range_product
.restype
= c_void_p
4365 isl
.isl_multi_val_range_product
.argtypes
= [c_void_p
, c_void_p
]
4366 isl
.isl_multi_val_copy
.restype
= c_void_p
4367 isl
.isl_multi_val_copy
.argtypes
= [c_void_p
]
4368 isl
.isl_multi_val_free
.restype
= c_void_p
4369 isl
.isl_multi_val_free
.argtypes
= [c_void_p
]
4370 isl
.isl_multi_val_to_str
.restype
= POINTER(c_char
)
4371 isl
.isl_multi_val_to_str
.argtypes
= [c_void_p
]
4373 class point(basic_set
):
4374 def __init__(self
, *args
, **keywords
):
4375 if "ptr" in keywords
:
4376 self
.ctx
= keywords
["ctx"]
4377 self
.ptr
= keywords
["ptr"]
4381 if hasattr(self
, 'ptr'):
4382 isl
.isl_point_free(self
.ptr
)
4385 if not arg0
.__class__
is point
:
4389 ptr
= isl
.isl_point_to_str(arg0
.ptr
)
4390 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4396 return 'isl.point("""%s""")' % s
4398 return 'isl.point("%s")' % s
4400 isl
.isl_point_copy
.restype
= c_void_p
4401 isl
.isl_point_copy
.argtypes
= [c_void_p
]
4402 isl
.isl_point_free
.restype
= c_void_p
4403 isl
.isl_point_free
.argtypes
= [c_void_p
]
4404 isl
.isl_point_to_str
.restype
= POINTER(c_char
)
4405 isl
.isl_point_to_str
.argtypes
= [c_void_p
]
4407 class schedule(object):
4408 def __init__(self
, *args
, **keywords
):
4409 if "ptr" in keywords
:
4410 self
.ctx
= keywords
["ctx"]
4411 self
.ptr
= keywords
["ptr"]
4413 if len(args
) == 1 and type(args
[0]) == str:
4414 self
.ctx
= Context
.getDefaultInstance()
4415 self
.ptr
= isl
.isl_schedule_read_from_str(self
.ctx
, args
[0].encode('ascii'))
4419 if hasattr(self
, 'ptr'):
4420 isl
.isl_schedule_free(self
.ptr
)
4423 if not arg0
.__class__
is schedule
:
4424 arg0
= schedule(arg0
)
4427 ptr
= isl
.isl_schedule_to_str(arg0
.ptr
)
4428 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4434 return 'isl.schedule("""%s""")' % s
4436 return 'isl.schedule("%s")' % s
4439 if not arg0
.__class__
is schedule
:
4440 arg0
= schedule(arg0
)
4444 res
= isl
.isl_schedule_get_map(arg0
.ptr
)
4445 return union_map(ctx
=ctx
, ptr
=res
)
4448 if not arg0
.__class__
is schedule
:
4449 arg0
= schedule(arg0
)
4453 res
= isl
.isl_schedule_get_root(arg0
.ptr
)
4454 return schedule_node(ctx
=ctx
, ptr
=res
)
4455 def pullback(arg0
, arg1
):
4456 if arg1
.__class__
is union_pw_multi_aff
:
4457 res
= isl
.isl_schedule_pullback_union_pw_multi_aff(isl
.isl_schedule_copy(arg0
.ptr
), isl
.isl_union_pw_multi_aff_copy(arg1
.ptr
))
4458 return schedule(ctx
=arg0
.ctx
, ptr
=res
)
4460 isl
.isl_schedule_read_from_str
.restype
= c_void_p
4461 isl
.isl_schedule_read_from_str
.argtypes
= [Context
, c_char_p
]
4462 isl
.isl_schedule_get_map
.restype
= c_void_p
4463 isl
.isl_schedule_get_map
.argtypes
= [c_void_p
]
4464 isl
.isl_schedule_get_root
.restype
= c_void_p
4465 isl
.isl_schedule_get_root
.argtypes
= [c_void_p
]
4466 isl
.isl_schedule_pullback_union_pw_multi_aff
.restype
= c_void_p
4467 isl
.isl_schedule_pullback_union_pw_multi_aff
.argtypes
= [c_void_p
, c_void_p
]
4468 isl
.isl_schedule_copy
.restype
= c_void_p
4469 isl
.isl_schedule_copy
.argtypes
= [c_void_p
]
4470 isl
.isl_schedule_free
.restype
= c_void_p
4471 isl
.isl_schedule_free
.argtypes
= [c_void_p
]
4472 isl
.isl_schedule_to_str
.restype
= POINTER(c_char
)
4473 isl
.isl_schedule_to_str
.argtypes
= [c_void_p
]
4475 class schedule_constraints(object):
4476 def __init__(self
, *args
, **keywords
):
4477 if "ptr" in keywords
:
4478 self
.ctx
= keywords
["ctx"]
4479 self
.ptr
= keywords
["ptr"]
4481 if len(args
) == 1 and type(args
[0]) == str:
4482 self
.ctx
= Context
.getDefaultInstance()
4483 self
.ptr
= isl
.isl_schedule_constraints_read_from_str(self
.ctx
, args
[0].encode('ascii'))
4487 if hasattr(self
, 'ptr'):
4488 isl
.isl_schedule_constraints_free(self
.ptr
)
4491 if not arg0
.__class__
is schedule_constraints
:
4492 arg0
= schedule_constraints(arg0
)
4495 ptr
= isl
.isl_schedule_constraints_to_str(arg0
.ptr
)
4496 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4502 return 'isl.schedule_constraints("""%s""")' % s
4504 return 'isl.schedule_constraints("%s")' % s
4505 def compute_schedule(arg0
):
4507 if not arg0
.__class__
is schedule_constraints
:
4508 arg0
= schedule_constraints(arg0
)
4512 res
= isl
.isl_schedule_constraints_compute_schedule(isl
.isl_schedule_constraints_copy(arg0
.ptr
))
4513 return schedule(ctx
=ctx
, ptr
=res
)
4514 def get_coincidence(arg0
):
4516 if not arg0
.__class__
is schedule_constraints
:
4517 arg0
= schedule_constraints(arg0
)
4521 res
= isl
.isl_schedule_constraints_get_coincidence(arg0
.ptr
)
4522 return union_map(ctx
=ctx
, ptr
=res
)
4523 def get_conditional_validity(arg0
):
4525 if not arg0
.__class__
is schedule_constraints
:
4526 arg0
= schedule_constraints(arg0
)
4530 res
= isl
.isl_schedule_constraints_get_conditional_validity(arg0
.ptr
)
4531 return union_map(ctx
=ctx
, ptr
=res
)
4532 def get_conditional_validity_condition(arg0
):
4534 if not arg0
.__class__
is schedule_constraints
:
4535 arg0
= schedule_constraints(arg0
)
4539 res
= isl
.isl_schedule_constraints_get_conditional_validity_condition(arg0
.ptr
)
4540 return union_map(ctx
=ctx
, ptr
=res
)
4541 def get_context(arg0
):
4543 if not arg0
.__class__
is schedule_constraints
:
4544 arg0
= schedule_constraints(arg0
)
4548 res
= isl
.isl_schedule_constraints_get_context(arg0
.ptr
)
4549 return set(ctx
=ctx
, ptr
=res
)
4550 def get_domain(arg0
):
4552 if not arg0
.__class__
is schedule_constraints
:
4553 arg0
= schedule_constraints(arg0
)
4557 res
= isl
.isl_schedule_constraints_get_domain(arg0
.ptr
)
4558 return union_set(ctx
=ctx
, ptr
=res
)
4559 def get_proximity(arg0
):
4561 if not arg0
.__class__
is schedule_constraints
:
4562 arg0
= schedule_constraints(arg0
)
4566 res
= isl
.isl_schedule_constraints_get_proximity(arg0
.ptr
)
4567 return union_map(ctx
=ctx
, ptr
=res
)
4568 def get_validity(arg0
):
4570 if not arg0
.__class__
is schedule_constraints
:
4571 arg0
= schedule_constraints(arg0
)
4575 res
= isl
.isl_schedule_constraints_get_validity(arg0
.ptr
)
4576 return union_map(ctx
=ctx
, ptr
=res
)
4578 def on_domain(arg0
):
4580 if not arg0
.__class__
is union_set
:
4581 arg0
= union_set(arg0
)
4585 res
= isl
.isl_schedule_constraints_on_domain(isl
.isl_union_set_copy(arg0
.ptr
))
4586 return schedule_constraints(ctx
=ctx
, ptr
=res
)
4587 def set_coincidence(arg0
, arg1
):
4589 if not arg0
.__class__
is schedule_constraints
:
4590 arg0
= schedule_constraints(arg0
)
4594 if not arg1
.__class__
is union_map
:
4595 arg1
= union_map(arg1
)
4599 res
= isl
.isl_schedule_constraints_set_coincidence(isl
.isl_schedule_constraints_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4600 return schedule_constraints(ctx
=ctx
, ptr
=res
)
4601 def set_conditional_validity(arg0
, arg1
, arg2
):
4603 if not arg0
.__class__
is schedule_constraints
:
4604 arg0
= schedule_constraints(arg0
)
4608 if not arg1
.__class__
is union_map
:
4609 arg1
= union_map(arg1
)
4613 if not arg2
.__class__
is union_map
:
4614 arg2
= union_map(arg2
)
4618 res
= isl
.isl_schedule_constraints_set_conditional_validity(isl
.isl_schedule_constraints_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
), isl
.isl_union_map_copy(arg2
.ptr
))
4619 return schedule_constraints(ctx
=ctx
, ptr
=res
)
4620 def set_context(arg0
, arg1
):
4622 if not arg0
.__class__
is schedule_constraints
:
4623 arg0
= schedule_constraints(arg0
)
4627 if not arg1
.__class__
is set:
4632 res
= isl
.isl_schedule_constraints_set_context(isl
.isl_schedule_constraints_copy(arg0
.ptr
), isl
.isl_set_copy(arg1
.ptr
))
4633 return schedule_constraints(ctx
=ctx
, ptr
=res
)
4634 def set_proximity(arg0
, arg1
):
4636 if not arg0
.__class__
is schedule_constraints
:
4637 arg0
= schedule_constraints(arg0
)
4641 if not arg1
.__class__
is union_map
:
4642 arg1
= union_map(arg1
)
4646 res
= isl
.isl_schedule_constraints_set_proximity(isl
.isl_schedule_constraints_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4647 return schedule_constraints(ctx
=ctx
, ptr
=res
)
4648 def set_validity(arg0
, arg1
):
4650 if not arg0
.__class__
is schedule_constraints
:
4651 arg0
= schedule_constraints(arg0
)
4655 if not arg1
.__class__
is union_map
:
4656 arg1
= union_map(arg1
)
4660 res
= isl
.isl_schedule_constraints_set_validity(isl
.isl_schedule_constraints_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4661 return schedule_constraints(ctx
=ctx
, ptr
=res
)
4663 isl
.isl_schedule_constraints_read_from_str
.restype
= c_void_p
4664 isl
.isl_schedule_constraints_read_from_str
.argtypes
= [Context
, c_char_p
]
4665 isl
.isl_schedule_constraints_compute_schedule
.restype
= c_void_p
4666 isl
.isl_schedule_constraints_compute_schedule
.argtypes
= [c_void_p
]
4667 isl
.isl_schedule_constraints_get_coincidence
.restype
= c_void_p
4668 isl
.isl_schedule_constraints_get_coincidence
.argtypes
= [c_void_p
]
4669 isl
.isl_schedule_constraints_get_conditional_validity
.restype
= c_void_p
4670 isl
.isl_schedule_constraints_get_conditional_validity
.argtypes
= [c_void_p
]
4671 isl
.isl_schedule_constraints_get_conditional_validity_condition
.restype
= c_void_p
4672 isl
.isl_schedule_constraints_get_conditional_validity_condition
.argtypes
= [c_void_p
]
4673 isl
.isl_schedule_constraints_get_context
.restype
= c_void_p
4674 isl
.isl_schedule_constraints_get_context
.argtypes
= [c_void_p
]
4675 isl
.isl_schedule_constraints_get_domain
.restype
= c_void_p
4676 isl
.isl_schedule_constraints_get_domain
.argtypes
= [c_void_p
]
4677 isl
.isl_schedule_constraints_get_proximity
.restype
= c_void_p
4678 isl
.isl_schedule_constraints_get_proximity
.argtypes
= [c_void_p
]
4679 isl
.isl_schedule_constraints_get_validity
.restype
= c_void_p
4680 isl
.isl_schedule_constraints_get_validity
.argtypes
= [c_void_p
]
4681 isl
.isl_schedule_constraints_on_domain
.restype
= c_void_p
4682 isl
.isl_schedule_constraints_on_domain
.argtypes
= [c_void_p
]
4683 isl
.isl_schedule_constraints_set_coincidence
.restype
= c_void_p
4684 isl
.isl_schedule_constraints_set_coincidence
.argtypes
= [c_void_p
, c_void_p
]
4685 isl
.isl_schedule_constraints_set_conditional_validity
.restype
= c_void_p
4686 isl
.isl_schedule_constraints_set_conditional_validity
.argtypes
= [c_void_p
, c_void_p
, c_void_p
]
4687 isl
.isl_schedule_constraints_set_context
.restype
= c_void_p
4688 isl
.isl_schedule_constraints_set_context
.argtypes
= [c_void_p
, c_void_p
]
4689 isl
.isl_schedule_constraints_set_proximity
.restype
= c_void_p
4690 isl
.isl_schedule_constraints_set_proximity
.argtypes
= [c_void_p
, c_void_p
]
4691 isl
.isl_schedule_constraints_set_validity
.restype
= c_void_p
4692 isl
.isl_schedule_constraints_set_validity
.argtypes
= [c_void_p
, c_void_p
]
4693 isl
.isl_schedule_constraints_copy
.restype
= c_void_p
4694 isl
.isl_schedule_constraints_copy
.argtypes
= [c_void_p
]
4695 isl
.isl_schedule_constraints_free
.restype
= c_void_p
4696 isl
.isl_schedule_constraints_free
.argtypes
= [c_void_p
]
4697 isl
.isl_schedule_constraints_to_str
.restype
= POINTER(c_char
)
4698 isl
.isl_schedule_constraints_to_str
.argtypes
= [c_void_p
]
4700 class schedule_node(object):
4701 def __init__(self
, *args
, **keywords
):
4702 if "ptr" in keywords
:
4703 self
.ctx
= keywords
["ctx"]
4704 self
.ptr
= keywords
["ptr"]
4708 if hasattr(self
, 'ptr'):
4709 isl
.isl_schedule_node_free(self
.ptr
)
4712 if not arg0
.__class__
is schedule_node
:
4713 arg0
= schedule_node(arg0
)
4716 ptr
= isl
.isl_schedule_node_to_str(arg0
.ptr
)
4717 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4723 return 'isl.schedule_node("""%s""")' % s
4725 return 'isl.schedule_node("%s")' % s
4726 def band_member_get_coincident(arg0
, arg1
):
4728 if not arg0
.__class__
is schedule_node
:
4729 arg0
= schedule_node(arg0
)
4733 res
= isl
.isl_schedule_node_band_member_get_coincident(arg0
.ptr
, arg1
)
4737 def band_member_set_coincident(arg0
, arg1
, arg2
):
4739 if not arg0
.__class__
is schedule_node
:
4740 arg0
= schedule_node(arg0
)
4744 res
= isl
.isl_schedule_node_band_member_set_coincident(isl
.isl_schedule_node_copy(arg0
.ptr
), arg1
, arg2
)
4745 return schedule_node(ctx
=ctx
, ptr
=res
)
4746 def child(arg0
, arg1
):
4748 if not arg0
.__class__
is schedule_node
:
4749 arg0
= schedule_node(arg0
)
4753 res
= isl
.isl_schedule_node_child(isl
.isl_schedule_node_copy(arg0
.ptr
), arg1
)
4754 return schedule_node(ctx
=ctx
, ptr
=res
)
4755 def get_prefix_schedule_multi_union_pw_aff(arg0
):
4757 if not arg0
.__class__
is schedule_node
:
4758 arg0
= schedule_node(arg0
)
4762 res
= isl
.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(arg0
.ptr
)
4763 return multi_union_pw_aff(ctx
=ctx
, ptr
=res
)
4764 def get_prefix_schedule_union_map(arg0
):
4766 if not arg0
.__class__
is schedule_node
:
4767 arg0
= schedule_node(arg0
)
4771 res
= isl
.isl_schedule_node_get_prefix_schedule_union_map(arg0
.ptr
)
4772 return union_map(ctx
=ctx
, ptr
=res
)
4773 def get_prefix_schedule_union_pw_multi_aff(arg0
):
4775 if not arg0
.__class__
is schedule_node
:
4776 arg0
= schedule_node(arg0
)
4780 res
= isl
.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(arg0
.ptr
)
4781 return union_pw_multi_aff(ctx
=ctx
, ptr
=res
)
4782 def get_schedule(arg0
):
4784 if not arg0
.__class__
is schedule_node
:
4785 arg0
= schedule_node(arg0
)
4789 res
= isl
.isl_schedule_node_get_schedule(arg0
.ptr
)
4790 return schedule(ctx
=ctx
, ptr
=res
)
4793 if not arg0
.__class__
is schedule_node
:
4794 arg0
= schedule_node(arg0
)
4798 res
= isl
.isl_schedule_node_parent(isl
.isl_schedule_node_copy(arg0
.ptr
))
4799 return schedule_node(ctx
=ctx
, ptr
=res
)
4801 isl
.isl_schedule_node_band_member_get_coincident
.restype
= c_bool
4802 isl
.isl_schedule_node_band_member_get_coincident
.argtypes
= [c_void_p
, c_int
]
4803 isl
.isl_schedule_node_band_member_set_coincident
.restype
= c_void_p
4804 isl
.isl_schedule_node_band_member_set_coincident
.argtypes
= [c_void_p
, c_int
, c_int
]
4805 isl
.isl_schedule_node_child
.restype
= c_void_p
4806 isl
.isl_schedule_node_child
.argtypes
= [c_void_p
, c_int
]
4807 isl
.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff
.restype
= c_void_p
4808 isl
.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff
.argtypes
= [c_void_p
]
4809 isl
.isl_schedule_node_get_prefix_schedule_union_map
.restype
= c_void_p
4810 isl
.isl_schedule_node_get_prefix_schedule_union_map
.argtypes
= [c_void_p
]
4811 isl
.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff
.restype
= c_void_p
4812 isl
.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff
.argtypes
= [c_void_p
]
4813 isl
.isl_schedule_node_get_schedule
.restype
= c_void_p
4814 isl
.isl_schedule_node_get_schedule
.argtypes
= [c_void_p
]
4815 isl
.isl_schedule_node_parent
.restype
= c_void_p
4816 isl
.isl_schedule_node_parent
.argtypes
= [c_void_p
]
4817 isl
.isl_schedule_node_copy
.restype
= c_void_p
4818 isl
.isl_schedule_node_copy
.argtypes
= [c_void_p
]
4819 isl
.isl_schedule_node_free
.restype
= c_void_p
4820 isl
.isl_schedule_node_free
.argtypes
= [c_void_p
]
4821 isl
.isl_schedule_node_to_str
.restype
= POINTER(c_char
)
4822 isl
.isl_schedule_node_to_str
.argtypes
= [c_void_p
]
4824 class union_access_info(object):
4825 def __init__(self
, *args
, **keywords
):
4826 if "ptr" in keywords
:
4827 self
.ctx
= keywords
["ctx"]
4828 self
.ptr
= keywords
["ptr"]
4830 if len(args
) == 1 and args
[0].__class
__ is union_map
:
4831 self
.ctx
= Context
.getDefaultInstance()
4832 self
.ptr
= isl
.isl_union_access_info_from_sink(isl
.isl_union_map_copy(args
[0].ptr
))
4836 if hasattr(self
, 'ptr'):
4837 isl
.isl_union_access_info_free(self
.ptr
)
4840 if not arg0
.__class__
is union_access_info
:
4841 arg0
= union_access_info(arg0
)
4844 ptr
= isl
.isl_union_access_info_to_str(arg0
.ptr
)
4845 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4851 return 'isl.union_access_info("""%s""")' % s
4853 return 'isl.union_access_info("%s")' % s
4854 def compute_flow(arg0
):
4856 if not arg0
.__class__
is union_access_info
:
4857 arg0
= union_access_info(arg0
)
4861 res
= isl
.isl_union_access_info_compute_flow(isl
.isl_union_access_info_copy(arg0
.ptr
))
4862 return union_flow(ctx
=ctx
, ptr
=res
)
4863 def set_kill(arg0
, arg1
):
4865 if not arg0
.__class__
is union_access_info
:
4866 arg0
= union_access_info(arg0
)
4870 if not arg1
.__class__
is union_map
:
4871 arg1
= union_map(arg1
)
4875 res
= isl
.isl_union_access_info_set_kill(isl
.isl_union_access_info_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4876 return union_access_info(ctx
=ctx
, ptr
=res
)
4877 def set_may_source(arg0
, arg1
):
4879 if not arg0
.__class__
is union_access_info
:
4880 arg0
= union_access_info(arg0
)
4884 if not arg1
.__class__
is union_map
:
4885 arg1
= union_map(arg1
)
4889 res
= isl
.isl_union_access_info_set_may_source(isl
.isl_union_access_info_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4890 return union_access_info(ctx
=ctx
, ptr
=res
)
4891 def set_must_source(arg0
, arg1
):
4893 if not arg0
.__class__
is union_access_info
:
4894 arg0
= union_access_info(arg0
)
4898 if not arg1
.__class__
is union_map
:
4899 arg1
= union_map(arg1
)
4903 res
= isl
.isl_union_access_info_set_must_source(isl
.isl_union_access_info_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4904 return union_access_info(ctx
=ctx
, ptr
=res
)
4905 def set_schedule(arg0
, arg1
):
4907 if not arg0
.__class__
is union_access_info
:
4908 arg0
= union_access_info(arg0
)
4912 if not arg1
.__class__
is schedule
:
4913 arg1
= schedule(arg1
)
4917 res
= isl
.isl_union_access_info_set_schedule(isl
.isl_union_access_info_copy(arg0
.ptr
), isl
.isl_schedule_copy(arg1
.ptr
))
4918 return union_access_info(ctx
=ctx
, ptr
=res
)
4919 def set_schedule_map(arg0
, arg1
):
4921 if not arg0
.__class__
is union_access_info
:
4922 arg0
= union_access_info(arg0
)
4926 if not arg1
.__class__
is union_map
:
4927 arg1
= union_map(arg1
)
4931 res
= isl
.isl_union_access_info_set_schedule_map(isl
.isl_union_access_info_copy(arg0
.ptr
), isl
.isl_union_map_copy(arg1
.ptr
))
4932 return union_access_info(ctx
=ctx
, ptr
=res
)
4934 isl
.isl_union_access_info_from_sink
.restype
= c_void_p
4935 isl
.isl_union_access_info_from_sink
.argtypes
= [c_void_p
]
4936 isl
.isl_union_access_info_compute_flow
.restype
= c_void_p
4937 isl
.isl_union_access_info_compute_flow
.argtypes
= [c_void_p
]
4938 isl
.isl_union_access_info_set_kill
.restype
= c_void_p
4939 isl
.isl_union_access_info_set_kill
.argtypes
= [c_void_p
, c_void_p
]
4940 isl
.isl_union_access_info_set_may_source
.restype
= c_void_p
4941 isl
.isl_union_access_info_set_may_source
.argtypes
= [c_void_p
, c_void_p
]
4942 isl
.isl_union_access_info_set_must_source
.restype
= c_void_p
4943 isl
.isl_union_access_info_set_must_source
.argtypes
= [c_void_p
, c_void_p
]
4944 isl
.isl_union_access_info_set_schedule
.restype
= c_void_p
4945 isl
.isl_union_access_info_set_schedule
.argtypes
= [c_void_p
, c_void_p
]
4946 isl
.isl_union_access_info_set_schedule_map
.restype
= c_void_p
4947 isl
.isl_union_access_info_set_schedule_map
.argtypes
= [c_void_p
, c_void_p
]
4948 isl
.isl_union_access_info_copy
.restype
= c_void_p
4949 isl
.isl_union_access_info_copy
.argtypes
= [c_void_p
]
4950 isl
.isl_union_access_info_free
.restype
= c_void_p
4951 isl
.isl_union_access_info_free
.argtypes
= [c_void_p
]
4952 isl
.isl_union_access_info_to_str
.restype
= POINTER(c_char
)
4953 isl
.isl_union_access_info_to_str
.argtypes
= [c_void_p
]
4955 class union_flow(object):
4956 def __init__(self
, *args
, **keywords
):
4957 if "ptr" in keywords
:
4958 self
.ctx
= keywords
["ctx"]
4959 self
.ptr
= keywords
["ptr"]
4963 if hasattr(self
, 'ptr'):
4964 isl
.isl_union_flow_free(self
.ptr
)
4967 if not arg0
.__class__
is union_flow
:
4968 arg0
= union_flow(arg0
)
4971 ptr
= isl
.isl_union_flow_to_str(arg0
.ptr
)
4972 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
4978 return 'isl.union_flow("""%s""")' % s
4980 return 'isl.union_flow("%s")' % s
4981 def get_full_may_dependence(arg0
):
4983 if not arg0
.__class__
is union_flow
:
4984 arg0
= union_flow(arg0
)
4988 res
= isl
.isl_union_flow_get_full_may_dependence(arg0
.ptr
)
4989 return union_map(ctx
=ctx
, ptr
=res
)
4990 def get_full_must_dependence(arg0
):
4992 if not arg0
.__class__
is union_flow
:
4993 arg0
= union_flow(arg0
)
4997 res
= isl
.isl_union_flow_get_full_must_dependence(arg0
.ptr
)
4998 return union_map(ctx
=ctx
, ptr
=res
)
4999 def get_may_dependence(arg0
):
5001 if not arg0
.__class__
is union_flow
:
5002 arg0
= union_flow(arg0
)
5006 res
= isl
.isl_union_flow_get_may_dependence(arg0
.ptr
)
5007 return union_map(ctx
=ctx
, ptr
=res
)
5008 def get_may_no_source(arg0
):
5010 if not arg0
.__class__
is union_flow
:
5011 arg0
= union_flow(arg0
)
5015 res
= isl
.isl_union_flow_get_may_no_source(arg0
.ptr
)
5016 return union_map(ctx
=ctx
, ptr
=res
)
5017 def get_must_dependence(arg0
):
5019 if not arg0
.__class__
is union_flow
:
5020 arg0
= union_flow(arg0
)
5024 res
= isl
.isl_union_flow_get_must_dependence(arg0
.ptr
)
5025 return union_map(ctx
=ctx
, ptr
=res
)
5026 def get_must_no_source(arg0
):
5028 if not arg0
.__class__
is union_flow
:
5029 arg0
= union_flow(arg0
)
5033 res
= isl
.isl_union_flow_get_must_no_source(arg0
.ptr
)
5034 return union_map(ctx
=ctx
, ptr
=res
)
5036 isl
.isl_union_flow_get_full_may_dependence
.restype
= c_void_p
5037 isl
.isl_union_flow_get_full_may_dependence
.argtypes
= [c_void_p
]
5038 isl
.isl_union_flow_get_full_must_dependence
.restype
= c_void_p
5039 isl
.isl_union_flow_get_full_must_dependence
.argtypes
= [c_void_p
]
5040 isl
.isl_union_flow_get_may_dependence
.restype
= c_void_p
5041 isl
.isl_union_flow_get_may_dependence
.argtypes
= [c_void_p
]
5042 isl
.isl_union_flow_get_may_no_source
.restype
= c_void_p
5043 isl
.isl_union_flow_get_may_no_source
.argtypes
= [c_void_p
]
5044 isl
.isl_union_flow_get_must_dependence
.restype
= c_void_p
5045 isl
.isl_union_flow_get_must_dependence
.argtypes
= [c_void_p
]
5046 isl
.isl_union_flow_get_must_no_source
.restype
= c_void_p
5047 isl
.isl_union_flow_get_must_no_source
.argtypes
= [c_void_p
]
5048 isl
.isl_union_flow_copy
.restype
= c_void_p
5049 isl
.isl_union_flow_copy
.argtypes
= [c_void_p
]
5050 isl
.isl_union_flow_free
.restype
= c_void_p
5051 isl
.isl_union_flow_free
.argtypes
= [c_void_p
]
5052 isl
.isl_union_flow_to_str
.restype
= POINTER(c_char
)
5053 isl
.isl_union_flow_to_str
.argtypes
= [c_void_p
]
5056 def __init__(self
, *args
, **keywords
):
5057 if "ptr" in keywords
:
5058 self
.ctx
= keywords
["ctx"]
5059 self
.ptr
= keywords
["ptr"]
5061 if len(args
) == 1 and type(args
[0]) == str:
5062 self
.ctx
= Context
.getDefaultInstance()
5063 self
.ptr
= isl
.isl_val_read_from_str(self
.ctx
, args
[0].encode('ascii'))
5065 if len(args
) == 1 and type(args
[0]) == int:
5066 self
.ctx
= Context
.getDefaultInstance()
5067 self
.ptr
= isl
.isl_val_int_from_si(self
.ctx
, args
[0])
5071 if hasattr(self
, 'ptr'):
5072 isl
.isl_val_free(self
.ptr
)
5075 if not arg0
.__class__
is val
:
5079 ptr
= isl
.isl_val_to_str(arg0
.ptr
)
5080 res
= cast(ptr
, c_char_p
).value
.decode('ascii')
5086 return 'isl.val("""%s""")' % s
5088 return 'isl.val("%s")' % s
5091 if not arg0
.__class__
is val
:
5096 res
= isl
.isl_val_abs(isl
.isl_val_copy(arg0
.ptr
))
5097 return val(ctx
=ctx
, ptr
=res
)
5098 def abs_eq(arg0
, arg1
):
5100 if not arg0
.__class__
is val
:
5105 if not arg1
.__class__
is val
:
5110 res
= isl
.isl_val_abs_eq(arg0
.ptr
, arg1
.ptr
)
5114 def add(arg0
, arg1
):
5116 if not arg0
.__class__
is val
:
5121 if not arg1
.__class__
is val
:
5126 res
= isl
.isl_val_add(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5127 return val(ctx
=ctx
, ptr
=res
)
5130 if not arg0
.__class__
is val
:
5135 res
= isl
.isl_val_ceil(isl
.isl_val_copy(arg0
.ptr
))
5136 return val(ctx
=ctx
, ptr
=res
)
5137 def cmp_si(arg0
, arg1
):
5139 if not arg0
.__class__
is val
:
5144 res
= isl
.isl_val_cmp_si(arg0
.ptr
, arg1
)
5146 def div(arg0
, arg1
):
5148 if not arg0
.__class__
is val
:
5153 if not arg1
.__class__
is val
:
5158 res
= isl
.isl_val_div(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5159 return val(ctx
=ctx
, ptr
=res
)
5162 if not arg0
.__class__
is val
:
5167 if not arg1
.__class__
is val
:
5172 res
= isl
.isl_val_eq(arg0
.ptr
, arg1
.ptr
)
5178 if not arg0
.__class__
is val
:
5183 res
= isl
.isl_val_floor(isl
.isl_val_copy(arg0
.ptr
))
5184 return val(ctx
=ctx
, ptr
=res
)
5185 def gcd(arg0
, arg1
):
5187 if not arg0
.__class__
is val
:
5192 if not arg1
.__class__
is val
:
5197 res
= isl
.isl_val_gcd(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5198 return val(ctx
=ctx
, ptr
=res
)
5201 if not arg0
.__class__
is val
:
5206 if not arg1
.__class__
is val
:
5211 res
= isl
.isl_val_ge(arg0
.ptr
, arg1
.ptr
)
5217 if not arg0
.__class__
is val
:
5222 if not arg1
.__class__
is val
:
5227 res
= isl
.isl_val_gt(arg0
.ptr
, arg1
.ptr
)
5233 ctx
= Context
.getDefaultInstance()
5234 res
= isl
.isl_val_infty(ctx
)
5235 return val(ctx
=ctx
, ptr
=res
)
5238 if not arg0
.__class__
is val
:
5243 res
= isl
.isl_val_inv(isl
.isl_val_copy(arg0
.ptr
))
5244 return val(ctx
=ctx
, ptr
=res
)
5245 def is_divisible_by(arg0
, arg1
):
5247 if not arg0
.__class__
is val
:
5252 if not arg1
.__class__
is val
:
5257 res
= isl
.isl_val_is_divisible_by(arg0
.ptr
, arg1
.ptr
)
5263 if not arg0
.__class__
is val
:
5268 res
= isl
.isl_val_is_infty(arg0
.ptr
)
5274 if not arg0
.__class__
is val
:
5279 res
= isl
.isl_val_is_int(arg0
.ptr
)
5285 if not arg0
.__class__
is val
:
5290 res
= isl
.isl_val_is_nan(arg0
.ptr
)
5296 if not arg0
.__class__
is val
:
5301 res
= isl
.isl_val_is_neg(arg0
.ptr
)
5305 def is_neginfty(arg0
):
5307 if not arg0
.__class__
is val
:
5312 res
= isl
.isl_val_is_neginfty(arg0
.ptr
)
5316 def is_negone(arg0
):
5318 if not arg0
.__class__
is val
:
5323 res
= isl
.isl_val_is_negone(arg0
.ptr
)
5327 def is_nonneg(arg0
):
5329 if not arg0
.__class__
is val
:
5334 res
= isl
.isl_val_is_nonneg(arg0
.ptr
)
5338 def is_nonpos(arg0
):
5340 if not arg0
.__class__
is val
:
5345 res
= isl
.isl_val_is_nonpos(arg0
.ptr
)
5351 if not arg0
.__class__
is val
:
5356 res
= isl
.isl_val_is_one(arg0
.ptr
)
5362 if not arg0
.__class__
is val
:
5367 res
= isl
.isl_val_is_pos(arg0
.ptr
)
5373 if not arg0
.__class__
is val
:
5378 res
= isl
.isl_val_is_rat(arg0
.ptr
)
5384 if not arg0
.__class__
is val
:
5389 res
= isl
.isl_val_is_zero(arg0
.ptr
)
5395 if not arg0
.__class__
is val
:
5400 if not arg1
.__class__
is val
:
5405 res
= isl
.isl_val_le(arg0
.ptr
, arg1
.ptr
)
5411 if not arg0
.__class__
is val
:
5416 if not arg1
.__class__
is val
:
5421 res
= isl
.isl_val_lt(arg0
.ptr
, arg1
.ptr
)
5425 def max(arg0
, arg1
):
5427 if not arg0
.__class__
is val
:
5432 if not arg1
.__class__
is val
:
5437 res
= isl
.isl_val_max(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5438 return val(ctx
=ctx
, ptr
=res
)
5439 def min(arg0
, arg1
):
5441 if not arg0
.__class__
is val
:
5446 if not arg1
.__class__
is val
:
5451 res
= isl
.isl_val_min(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5452 return val(ctx
=ctx
, ptr
=res
)
5453 def mod(arg0
, arg1
):
5455 if not arg0
.__class__
is val
:
5460 if not arg1
.__class__
is val
:
5465 res
= isl
.isl_val_mod(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5466 return val(ctx
=ctx
, ptr
=res
)
5467 def mul(arg0
, arg1
):
5469 if not arg0
.__class__
is val
:
5474 if not arg1
.__class__
is val
:
5479 res
= isl
.isl_val_mul(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5480 return val(ctx
=ctx
, ptr
=res
)
5483 ctx
= Context
.getDefaultInstance()
5484 res
= isl
.isl_val_nan(ctx
)
5485 return val(ctx
=ctx
, ptr
=res
)
5488 if not arg0
.__class__
is val
:
5493 if not arg1
.__class__
is val
:
5498 res
= isl
.isl_val_ne(arg0
.ptr
, arg1
.ptr
)
5504 if not arg0
.__class__
is val
:
5509 res
= isl
.isl_val_neg(isl
.isl_val_copy(arg0
.ptr
))
5510 return val(ctx
=ctx
, ptr
=res
)
5513 ctx
= Context
.getDefaultInstance()
5514 res
= isl
.isl_val_neginfty(ctx
)
5515 return val(ctx
=ctx
, ptr
=res
)
5518 ctx
= Context
.getDefaultInstance()
5519 res
= isl
.isl_val_negone(ctx
)
5520 return val(ctx
=ctx
, ptr
=res
)
5523 ctx
= Context
.getDefaultInstance()
5524 res
= isl
.isl_val_one(ctx
)
5525 return val(ctx
=ctx
, ptr
=res
)
5528 if not arg0
.__class__
is val
:
5533 res
= isl
.isl_val_sgn(arg0
.ptr
)
5535 def sub(arg0
, arg1
):
5537 if not arg0
.__class__
is val
:
5542 if not arg1
.__class__
is val
:
5547 res
= isl
.isl_val_sub(isl
.isl_val_copy(arg0
.ptr
), isl
.isl_val_copy(arg1
.ptr
))
5548 return val(ctx
=ctx
, ptr
=res
)
5551 if not arg0
.__class__
is val
:
5556 res
= isl
.isl_val_trunc(isl
.isl_val_copy(arg0
.ptr
))
5557 return val(ctx
=ctx
, ptr
=res
)
5560 ctx
= Context
.getDefaultInstance()
5561 res
= isl
.isl_val_zero(ctx
)
5562 return val(ctx
=ctx
, ptr
=res
)
5564 isl
.isl_val_read_from_str
.restype
= c_void_p
5565 isl
.isl_val_read_from_str
.argtypes
= [Context
, c_char_p
]
5566 isl
.isl_val_int_from_si
.restype
= c_void_p
5567 isl
.isl_val_int_from_si
.argtypes
= [Context
, c_long
]
5568 isl
.isl_val_abs
.restype
= c_void_p
5569 isl
.isl_val_abs
.argtypes
= [c_void_p
]
5570 isl
.isl_val_abs_eq
.restype
= c_bool
5571 isl
.isl_val_abs_eq
.argtypes
= [c_void_p
, c_void_p
]
5572 isl
.isl_val_add
.restype
= c_void_p
5573 isl
.isl_val_add
.argtypes
= [c_void_p
, c_void_p
]
5574 isl
.isl_val_ceil
.restype
= c_void_p
5575 isl
.isl_val_ceil
.argtypes
= [c_void_p
]
5576 isl
.isl_val_cmp_si
.argtypes
= [c_void_p
, c_long
]
5577 isl
.isl_val_div
.restype
= c_void_p
5578 isl
.isl_val_div
.argtypes
= [c_void_p
, c_void_p
]
5579 isl
.isl_val_eq
.restype
= c_bool
5580 isl
.isl_val_eq
.argtypes
= [c_void_p
, c_void_p
]
5581 isl
.isl_val_floor
.restype
= c_void_p
5582 isl
.isl_val_floor
.argtypes
= [c_void_p
]
5583 isl
.isl_val_gcd
.restype
= c_void_p
5584 isl
.isl_val_gcd
.argtypes
= [c_void_p
, c_void_p
]
5585 isl
.isl_val_ge
.restype
= c_bool
5586 isl
.isl_val_ge
.argtypes
= [c_void_p
, c_void_p
]
5587 isl
.isl_val_gt
.restype
= c_bool
5588 isl
.isl_val_gt
.argtypes
= [c_void_p
, c_void_p
]
5589 isl
.isl_val_infty
.restype
= c_void_p
5590 isl
.isl_val_infty
.argtypes
= [Context
]
5591 isl
.isl_val_inv
.restype
= c_void_p
5592 isl
.isl_val_inv
.argtypes
= [c_void_p
]
5593 isl
.isl_val_is_divisible_by
.restype
= c_bool
5594 isl
.isl_val_is_divisible_by
.argtypes
= [c_void_p
, c_void_p
]
5595 isl
.isl_val_is_infty
.restype
= c_bool
5596 isl
.isl_val_is_infty
.argtypes
= [c_void_p
]
5597 isl
.isl_val_is_int
.restype
= c_bool
5598 isl
.isl_val_is_int
.argtypes
= [c_void_p
]
5599 isl
.isl_val_is_nan
.restype
= c_bool
5600 isl
.isl_val_is_nan
.argtypes
= [c_void_p
]
5601 isl
.isl_val_is_neg
.restype
= c_bool
5602 isl
.isl_val_is_neg
.argtypes
= [c_void_p
]
5603 isl
.isl_val_is_neginfty
.restype
= c_bool
5604 isl
.isl_val_is_neginfty
.argtypes
= [c_void_p
]
5605 isl
.isl_val_is_negone
.restype
= c_bool
5606 isl
.isl_val_is_negone
.argtypes
= [c_void_p
]
5607 isl
.isl_val_is_nonneg
.restype
= c_bool
5608 isl
.isl_val_is_nonneg
.argtypes
= [c_void_p
]
5609 isl
.isl_val_is_nonpos
.restype
= c_bool
5610 isl
.isl_val_is_nonpos
.argtypes
= [c_void_p
]
5611 isl
.isl_val_is_one
.restype
= c_bool
5612 isl
.isl_val_is_one
.argtypes
= [c_void_p
]
5613 isl
.isl_val_is_pos
.restype
= c_bool
5614 isl
.isl_val_is_pos
.argtypes
= [c_void_p
]
5615 isl
.isl_val_is_rat
.restype
= c_bool
5616 isl
.isl_val_is_rat
.argtypes
= [c_void_p
]
5617 isl
.isl_val_is_zero
.restype
= c_bool
5618 isl
.isl_val_is_zero
.argtypes
= [c_void_p
]
5619 isl
.isl_val_le
.restype
= c_bool
5620 isl
.isl_val_le
.argtypes
= [c_void_p
, c_void_p
]
5621 isl
.isl_val_lt
.restype
= c_bool
5622 isl
.isl_val_lt
.argtypes
= [c_void_p
, c_void_p
]
5623 isl
.isl_val_max
.restype
= c_void_p
5624 isl
.isl_val_max
.argtypes
= [c_void_p
, c_void_p
]
5625 isl
.isl_val_min
.restype
= c_void_p
5626 isl
.isl_val_min
.argtypes
= [c_void_p
, c_void_p
]
5627 isl
.isl_val_mod
.restype
= c_void_p
5628 isl
.isl_val_mod
.argtypes
= [c_void_p
, c_void_p
]
5629 isl
.isl_val_mul
.restype
= c_void_p
5630 isl
.isl_val_mul
.argtypes
= [c_void_p
, c_void_p
]
5631 isl
.isl_val_nan
.restype
= c_void_p
5632 isl
.isl_val_nan
.argtypes
= [Context
]
5633 isl
.isl_val_ne
.restype
= c_bool
5634 isl
.isl_val_ne
.argtypes
= [c_void_p
, c_void_p
]
5635 isl
.isl_val_neg
.restype
= c_void_p
5636 isl
.isl_val_neg
.argtypes
= [c_void_p
]
5637 isl
.isl_val_neginfty
.restype
= c_void_p
5638 isl
.isl_val_neginfty
.argtypes
= [Context
]
5639 isl
.isl_val_negone
.restype
= c_void_p
5640 isl
.isl_val_negone
.argtypes
= [Context
]
5641 isl
.isl_val_one
.restype
= c_void_p
5642 isl
.isl_val_one
.argtypes
= [Context
]
5643 isl
.isl_val_sgn
.argtypes
= [c_void_p
]
5644 isl
.isl_val_sub
.restype
= c_void_p
5645 isl
.isl_val_sub
.argtypes
= [c_void_p
, c_void_p
]
5646 isl
.isl_val_trunc
.restype
= c_void_p
5647 isl
.isl_val_trunc
.argtypes
= [c_void_p
]
5648 isl
.isl_val_zero
.restype
= c_void_p
5649 isl
.isl_val_zero
.argtypes
= [Context
]
5650 isl
.isl_val_copy
.restype
= c_void_p
5651 isl
.isl_val_copy
.argtypes
= [c_void_p
]
5652 isl
.isl_val_free
.restype
= c_void_p
5653 isl
.isl_val_free
.argtypes
= [c_void_p
]
5654 isl
.isl_val_to_str
.restype
= POINTER(c_char
)
5655 isl
.isl_val_to_str
.argtypes
= [c_void_p
]