2 class union_pw_multi_aff(object):
3 def __init__(self, *args, **keywords):
5 self.ctx = keywords["ctx"]
6 self.ptr = keywords["ptr"]
8 if len(args) == 1 and args[0].__class__ is multi_aff:
9 self.ctx = Context.getDefaultInstance()
10 self.ptr = isl.isl_union_pw_multi_aff_from_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
12 if len(args) == 1 and args[0].__class__ is pw_multi_aff:
13 self.ctx = Context.getDefaultInstance()
14 self.ptr = isl.isl_union_pw_multi_aff_from_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr))
16 if len(args) == 1 and args[0].__class__ is union_pw_aff:
17 self.ctx = Context.getDefaultInstance()
18 self.ptr = isl.isl_union_pw_multi_aff_from_union_pw_aff(isl.isl_union_pw_aff_copy(args[0].ptr))
20 if len(args) == 1 and type(args[0]) == str:
21 self.ctx = Context.getDefaultInstance()
22 self.ptr = isl.isl_union_pw_multi_aff_read_from_str(self.ctx, args[0].encode('ascii'))
26 if hasattr(self, 'ptr'):
27 isl.isl_union_pw_multi_aff_free(self.ptr)
30 if not arg0.__class__ is union_pw_multi_aff:
31 arg0 = union_pw_multi_aff(arg0)
34 ptr = isl.isl_union_pw_multi_aff_to_str(arg0.ptr)
35 res = cast(ptr, c_char_p).value.decode('ascii')
41 return 'isl.union_pw_multi_aff("""%s""")' % s
43 return 'isl.union_pw_multi_aff("%s")' % s
46 if not arg0.__class__ is union_pw_multi_aff:
47 arg0 = union_pw_multi_aff(arg0)
51 if not arg1.__class__ is union_pw_multi_aff:
52 arg1 = union_pw_multi_aff(arg1)
56 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))
57 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
60 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
63 if not args[0].__class__ is union_pw_multi_aff:
64 args[0] = union_pw_multi_aff(args[0])
68 res = isl.isl_union_pw_multi_aff_apply_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
69 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
72 def as_multi_union_pw_aff(arg0):
74 if not arg0.__class__ is union_pw_multi_aff:
75 arg0 = union_pw_multi_aff(arg0)
79 res = isl.isl_union_pw_multi_aff_as_multi_union_pw_aff(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
80 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
82 def as_pw_multi_aff(arg0):
84 if not arg0.__class__ is union_pw_multi_aff:
85 arg0 = union_pw_multi_aff(arg0)
89 res = isl.isl_union_pw_multi_aff_as_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
90 obj = pw_multi_aff(ctx=ctx, ptr=res)
92 def as_union_map(arg0):
94 if not arg0.__class__ is union_pw_multi_aff:
95 arg0 = union_pw_multi_aff(arg0)
99 res = isl.isl_union_pw_multi_aff_as_union_map(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
100 obj = union_map(ctx=ctx, ptr=res)
104 if not arg0.__class__ is union_pw_multi_aff:
105 arg0 = union_pw_multi_aff(arg0)
109 res = isl.isl_union_pw_multi_aff_coalesce(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
110 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
114 if not arg0.__class__ is union_pw_multi_aff:
115 arg0 = union_pw_multi_aff(arg0)
119 res = isl.isl_union_pw_multi_aff_domain(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
120 obj = union_set(ctx=ctx, ptr=res)
122 def drop_unused_params(arg0):
124 if not arg0.__class__ is union_pw_multi_aff:
125 arg0 = union_pw_multi_aff(arg0)
129 res = isl.isl_union_pw_multi_aff_drop_unused_params(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
130 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
135 ctx = Context.getDefaultInstance()
136 res = isl.isl_union_pw_multi_aff_empty_ctx(ctx)
137 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
140 def extract_pw_multi_aff(arg0, arg1):
142 if not arg0.__class__ is union_pw_multi_aff:
143 arg0 = union_pw_multi_aff(arg0)
147 if not arg1.__class__ is space:
152 res = isl.isl_union_pw_multi_aff_extract_pw_multi_aff(arg0.ptr, isl.isl_space_copy(arg1.ptr))
153 obj = pw_multi_aff(ctx=ctx, ptr=res)
155 def flat_range_product(arg0, arg1):
157 if not arg0.__class__ is union_pw_multi_aff:
158 arg0 = union_pw_multi_aff(arg0)
162 if not arg1.__class__ is union_pw_multi_aff:
163 arg1 = union_pw_multi_aff(arg1)
167 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))
168 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
170 def gist(arg0, arg1):
172 if not arg0.__class__ is union_pw_multi_aff:
173 arg0 = union_pw_multi_aff(arg0)
177 if not arg1.__class__ is union_set:
178 arg1 = union_set(arg1)
182 res = isl.isl_union_pw_multi_aff_gist(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
183 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
185 def intersect_domain(*args):
186 if len(args) == 2 and args[1].__class__ is space:
189 if not args[0].__class__ is union_pw_multi_aff:
190 args[0] = union_pw_multi_aff(args[0])
194 res = isl.isl_union_pw_multi_aff_intersect_domain_space(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
195 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
197 if len(args) == 2 and args[1].__class__ is union_set:
200 if not args[0].__class__ is union_pw_multi_aff:
201 args[0] = union_pw_multi_aff(args[0])
205 res = isl.isl_union_pw_multi_aff_intersect_domain_union_set(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
206 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
209 def intersect_domain_wrapped_domain(arg0, arg1):
211 if not arg0.__class__ is union_pw_multi_aff:
212 arg0 = union_pw_multi_aff(arg0)
216 if not arg1.__class__ is union_set:
217 arg1 = union_set(arg1)
221 res = isl.isl_union_pw_multi_aff_intersect_domain_wrapped_domain(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
222 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
224 def intersect_domain_wrapped_range(arg0, arg1):
226 if not arg0.__class__ is union_pw_multi_aff:
227 arg0 = union_pw_multi_aff(arg0)
231 if not arg1.__class__ is union_set:
232 arg1 = union_set(arg1)
236 res = isl.isl_union_pw_multi_aff_intersect_domain_wrapped_range(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
237 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
239 def intersect_params(arg0, arg1):
241 if not arg0.__class__ is union_pw_multi_aff:
242 arg0 = union_pw_multi_aff(arg0)
246 if not arg1.__class__ is set:
251 res = isl.isl_union_pw_multi_aff_intersect_params(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
252 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
254 def involves_locals(arg0):
256 if not arg0.__class__ is union_pw_multi_aff:
257 arg0 = union_pw_multi_aff(arg0)
261 res = isl.isl_union_pw_multi_aff_involves_locals(arg0.ptr)
265 def isa_pw_multi_aff(arg0):
267 if not arg0.__class__ is union_pw_multi_aff:
268 arg0 = union_pw_multi_aff(arg0)
272 res = isl.isl_union_pw_multi_aff_isa_pw_multi_aff(arg0.ptr)
276 def plain_is_empty(arg0):
278 if not arg0.__class__ is union_pw_multi_aff:
279 arg0 = union_pw_multi_aff(arg0)
283 res = isl.isl_union_pw_multi_aff_plain_is_empty(arg0.ptr)
287 def plain_is_equal(arg0, arg1):
289 if not arg0.__class__ is union_pw_multi_aff:
290 arg0 = union_pw_multi_aff(arg0)
294 if not arg1.__class__ is union_pw_multi_aff:
295 arg1 = union_pw_multi_aff(arg1)
299 res = isl.isl_union_pw_multi_aff_plain_is_equal(arg0.ptr, arg1.ptr)
303 def preimage_domain_wrapped_domain(*args):
304 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
307 if not args[0].__class__ is union_pw_multi_aff:
308 args[0] = union_pw_multi_aff(args[0])
312 res = isl.isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
313 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
317 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
320 if not args[0].__class__ is union_pw_multi_aff:
321 args[0] = union_pw_multi_aff(args[0])
325 res = isl.isl_union_pw_multi_aff_pullback_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
326 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
329 def pw_multi_aff_list(arg0):
331 if not arg0.__class__ is union_pw_multi_aff:
332 arg0 = union_pw_multi_aff(arg0)
336 res = isl.isl_union_pw_multi_aff_get_pw_multi_aff_list(arg0.ptr)
337 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
339 def get_pw_multi_aff_list(arg0):
340 return arg0.pw_multi_aff_list()
341 def range_factor_domain(arg0):
343 if not arg0.__class__ is union_pw_multi_aff:
344 arg0 = union_pw_multi_aff(arg0)
348 res = isl.isl_union_pw_multi_aff_range_factor_domain(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
349 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
351 def range_factor_range(arg0):
353 if not arg0.__class__ is union_pw_multi_aff:
354 arg0 = union_pw_multi_aff(arg0)
358 res = isl.isl_union_pw_multi_aff_range_factor_range(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
359 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
361 def range_product(arg0, arg1):
363 if not arg0.__class__ is union_pw_multi_aff:
364 arg0 = union_pw_multi_aff(arg0)
368 if not arg1.__class__ is union_pw_multi_aff:
369 arg1 = union_pw_multi_aff(arg1)
373 res = isl.isl_union_pw_multi_aff_range_product(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
374 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
378 if not arg0.__class__ is union_pw_multi_aff:
379 arg0 = union_pw_multi_aff(arg0)
383 res = isl.isl_union_pw_multi_aff_get_space(arg0.ptr)
384 obj = space(ctx=ctx, ptr=res)
390 if not arg0.__class__ is union_pw_multi_aff:
391 arg0 = union_pw_multi_aff(arg0)
395 if not arg1.__class__ is union_pw_multi_aff:
396 arg1 = union_pw_multi_aff(arg1)
400 res = isl.isl_union_pw_multi_aff_sub(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
401 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
403 def subtract_domain(*args):
404 if len(args) == 2 and args[1].__class__ is space:
407 if not args[0].__class__ is union_pw_multi_aff:
408 args[0] = union_pw_multi_aff(args[0])
412 res = isl.isl_union_pw_multi_aff_subtract_domain_space(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
413 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
415 if len(args) == 2 and args[1].__class__ is union_set:
418 if not args[0].__class__ is union_pw_multi_aff:
419 args[0] = union_pw_multi_aff(args[0])
423 res = isl.isl_union_pw_multi_aff_subtract_domain_union_set(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
424 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
427 def union_add(arg0, arg1):
429 if not arg0.__class__ is union_pw_multi_aff:
430 arg0 = union_pw_multi_aff(arg0)
434 if not arg1.__class__ is union_pw_multi_aff:
435 arg1 = union_pw_multi_aff(arg1)
439 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))
440 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
443 isl.isl_union_pw_multi_aff_from_multi_aff.restype = c_void_p
444 isl.isl_union_pw_multi_aff_from_multi_aff.argtypes = [c_void_p]
445 isl.isl_union_pw_multi_aff_from_pw_multi_aff.restype = c_void_p
446 isl.isl_union_pw_multi_aff_from_pw_multi_aff.argtypes = [c_void_p]
447 isl.isl_union_pw_multi_aff_from_union_pw_aff.restype = c_void_p
448 isl.isl_union_pw_multi_aff_from_union_pw_aff.argtypes = [c_void_p]
449 isl.isl_union_pw_multi_aff_read_from_str.restype = c_void_p
450 isl.isl_union_pw_multi_aff_read_from_str.argtypes = [Context, c_char_p]
451 isl.isl_union_pw_multi_aff_add.restype = c_void_p
452 isl.isl_union_pw_multi_aff_add.argtypes = [c_void_p, c_void_p]
453 isl.isl_union_pw_multi_aff_apply_union_pw_multi_aff.restype = c_void_p
454 isl.isl_union_pw_multi_aff_apply_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
455 isl.isl_union_pw_multi_aff_as_multi_union_pw_aff.restype = c_void_p
456 isl.isl_union_pw_multi_aff_as_multi_union_pw_aff.argtypes = [c_void_p]
457 isl.isl_union_pw_multi_aff_as_pw_multi_aff.restype = c_void_p
458 isl.isl_union_pw_multi_aff_as_pw_multi_aff.argtypes = [c_void_p]
459 isl.isl_union_pw_multi_aff_as_union_map.restype = c_void_p
460 isl.isl_union_pw_multi_aff_as_union_map.argtypes = [c_void_p]
461 isl.isl_union_pw_multi_aff_coalesce.restype = c_void_p
462 isl.isl_union_pw_multi_aff_coalesce.argtypes = [c_void_p]
463 isl.isl_union_pw_multi_aff_domain.restype = c_void_p
464 isl.isl_union_pw_multi_aff_domain.argtypes = [c_void_p]
465 isl.isl_union_pw_multi_aff_drop_unused_params.restype = c_void_p
466 isl.isl_union_pw_multi_aff_drop_unused_params.argtypes = [c_void_p]
467 isl.isl_union_pw_multi_aff_empty_ctx.restype = c_void_p
468 isl.isl_union_pw_multi_aff_empty_ctx.argtypes = [Context]
469 isl.isl_union_pw_multi_aff_extract_pw_multi_aff.restype = c_void_p
470 isl.isl_union_pw_multi_aff_extract_pw_multi_aff.argtypes = [c_void_p, c_void_p]
471 isl.isl_union_pw_multi_aff_flat_range_product.restype = c_void_p
472 isl.isl_union_pw_multi_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
473 isl.isl_union_pw_multi_aff_gist.restype = c_void_p
474 isl.isl_union_pw_multi_aff_gist.argtypes = [c_void_p, c_void_p]
475 isl.isl_union_pw_multi_aff_intersect_domain_space.restype = c_void_p
476 isl.isl_union_pw_multi_aff_intersect_domain_space.argtypes = [c_void_p, c_void_p]
477 isl.isl_union_pw_multi_aff_intersect_domain_union_set.restype = c_void_p
478 isl.isl_union_pw_multi_aff_intersect_domain_union_set.argtypes = [c_void_p, c_void_p]
479 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_domain.restype = c_void_p
480 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
481 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_range.restype = c_void_p
482 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_range.argtypes = [c_void_p, c_void_p]
483 isl.isl_union_pw_multi_aff_intersect_params.restype = c_void_p
484 isl.isl_union_pw_multi_aff_intersect_params.argtypes = [c_void_p, c_void_p]
485 isl.isl_union_pw_multi_aff_involves_locals.argtypes = [c_void_p]
486 isl.isl_union_pw_multi_aff_isa_pw_multi_aff.argtypes = [c_void_p]
487 isl.isl_union_pw_multi_aff_plain_is_empty.argtypes = [c_void_p]
488 isl.isl_union_pw_multi_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
489 isl.isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff.restype = c_void_p
490 isl.isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
491 isl.isl_union_pw_multi_aff_pullback_union_pw_multi_aff.restype = c_void_p
492 isl.isl_union_pw_multi_aff_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
493 isl.isl_union_pw_multi_aff_get_pw_multi_aff_list.restype = c_void_p
494 isl.isl_union_pw_multi_aff_get_pw_multi_aff_list.argtypes = [c_void_p]
495 isl.isl_union_pw_multi_aff_range_factor_domain.restype = c_void_p
496 isl.isl_union_pw_multi_aff_range_factor_domain.argtypes = [c_void_p]
497 isl.isl_union_pw_multi_aff_range_factor_range.restype = c_void_p
498 isl.isl_union_pw_multi_aff_range_factor_range.argtypes = [c_void_p]
499 isl.isl_union_pw_multi_aff_range_product.restype = c_void_p
500 isl.isl_union_pw_multi_aff_range_product.argtypes = [c_void_p, c_void_p]
501 isl.isl_union_pw_multi_aff_get_space.restype = c_void_p
502 isl.isl_union_pw_multi_aff_get_space.argtypes = [c_void_p]
503 isl.isl_union_pw_multi_aff_sub.restype = c_void_p
504 isl.isl_union_pw_multi_aff_sub.argtypes = [c_void_p, c_void_p]
505 isl.isl_union_pw_multi_aff_subtract_domain_space.restype = c_void_p
506 isl.isl_union_pw_multi_aff_subtract_domain_space.argtypes = [c_void_p, c_void_p]
507 isl.isl_union_pw_multi_aff_subtract_domain_union_set.restype = c_void_p
508 isl.isl_union_pw_multi_aff_subtract_domain_union_set.argtypes = [c_void_p, c_void_p]
509 isl.isl_union_pw_multi_aff_union_add.restype = c_void_p
510 isl.isl_union_pw_multi_aff_union_add.argtypes = [c_void_p, c_void_p]
511 isl.isl_union_pw_multi_aff_copy.restype = c_void_p
512 isl.isl_union_pw_multi_aff_copy.argtypes = [c_void_p]
513 isl.isl_union_pw_multi_aff_free.restype = c_void_p
514 isl.isl_union_pw_multi_aff_free.argtypes = [c_void_p]
515 isl.isl_union_pw_multi_aff_to_str.restype = POINTER(c_char)
516 isl.isl_union_pw_multi_aff_to_str.argtypes = [c_void_p]
518 class multi_union_pw_aff(object):
519 def __init__(self, *args, **keywords):
520 if "ptr" in keywords:
521 self.ctx = keywords["ctx"]
522 self.ptr = keywords["ptr"]
524 if len(args) == 1 and args[0].__class__ is multi_pw_aff:
525 self.ctx = Context.getDefaultInstance()
526 self.ptr = isl.isl_multi_union_pw_aff_from_multi_pw_aff(isl.isl_multi_pw_aff_copy(args[0].ptr))
528 if len(args) == 1 and args[0].__class__ is union_pw_aff:
529 self.ctx = Context.getDefaultInstance()
530 self.ptr = isl.isl_multi_union_pw_aff_from_union_pw_aff(isl.isl_union_pw_aff_copy(args[0].ptr))
532 if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is union_pw_aff_list:
533 self.ctx = Context.getDefaultInstance()
534 self.ptr = isl.isl_multi_union_pw_aff_from_union_pw_aff_list(isl.isl_space_copy(args[0].ptr), isl.isl_union_pw_aff_list_copy(args[1].ptr))
536 if len(args) == 1 and type(args[0]) == str:
537 self.ctx = Context.getDefaultInstance()
538 self.ptr = isl.isl_multi_union_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
542 if hasattr(self, 'ptr'):
543 isl.isl_multi_union_pw_aff_free(self.ptr)
546 if not arg0.__class__ is multi_union_pw_aff:
547 arg0 = multi_union_pw_aff(arg0)
550 ptr = isl.isl_multi_union_pw_aff_to_str(arg0.ptr)
551 res = cast(ptr, c_char_p).value.decode('ascii')
557 return 'isl.multi_union_pw_aff("""%s""")' % s
559 return 'isl.multi_union_pw_aff("%s")' % s
562 if not arg0.__class__ is multi_union_pw_aff:
563 arg0 = multi_union_pw_aff(arg0)
567 if not arg1.__class__ is multi_union_pw_aff:
568 arg1 = multi_union_pw_aff(arg1)
572 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))
573 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
577 if not arg0.__class__ is multi_union_pw_aff:
578 arg0 = multi_union_pw_aff(arg0)
582 res = isl.isl_multi_union_pw_aff_get_at(arg0.ptr, arg1)
583 obj = union_pw_aff(ctx=ctx, ptr=res)
585 def get_at(arg0, arg1):
587 def bind(arg0, arg1):
589 if not arg0.__class__ is multi_union_pw_aff:
590 arg0 = multi_union_pw_aff(arg0)
594 if not arg1.__class__ is multi_id:
595 arg1 = multi_id(arg1)
599 res = isl.isl_multi_union_pw_aff_bind(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
600 obj = union_set(ctx=ctx, ptr=res)
604 if not arg0.__class__ is multi_union_pw_aff:
605 arg0 = multi_union_pw_aff(arg0)
609 res = isl.isl_multi_union_pw_aff_coalesce(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
610 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
614 if not arg0.__class__ is multi_union_pw_aff:
615 arg0 = multi_union_pw_aff(arg0)
619 res = isl.isl_multi_union_pw_aff_domain(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
620 obj = union_set(ctx=ctx, ptr=res)
622 def flat_range_product(arg0, arg1):
624 if not arg0.__class__ is multi_union_pw_aff:
625 arg0 = multi_union_pw_aff(arg0)
629 if not arg1.__class__ is multi_union_pw_aff:
630 arg1 = multi_union_pw_aff(arg1)
634 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))
635 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
637 def gist(arg0, arg1):
639 if not arg0.__class__ is multi_union_pw_aff:
640 arg0 = multi_union_pw_aff(arg0)
644 if not arg1.__class__ is union_set:
645 arg1 = union_set(arg1)
649 res = isl.isl_multi_union_pw_aff_gist(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
650 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
652 def gist_params(arg0, arg1):
654 if not arg0.__class__ is multi_union_pw_aff:
655 arg0 = multi_union_pw_aff(arg0)
659 if not arg1.__class__ is set:
664 res = isl.isl_multi_union_pw_aff_gist_params(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
665 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
667 def has_range_tuple_id(arg0):
669 if not arg0.__class__ is multi_union_pw_aff:
670 arg0 = multi_union_pw_aff(arg0)
674 res = isl.isl_multi_union_pw_aff_has_range_tuple_id(arg0.ptr)
678 def intersect_domain(arg0, arg1):
680 if not arg0.__class__ is multi_union_pw_aff:
681 arg0 = multi_union_pw_aff(arg0)
685 if not arg1.__class__ is union_set:
686 arg1 = union_set(arg1)
690 res = isl.isl_multi_union_pw_aff_intersect_domain(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
691 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
693 def intersect_params(arg0, arg1):
695 if not arg0.__class__ is multi_union_pw_aff:
696 arg0 = multi_union_pw_aff(arg0)
700 if not arg1.__class__ is set:
705 res = isl.isl_multi_union_pw_aff_intersect_params(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
706 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
708 def involves_nan(arg0):
710 if not arg0.__class__ is multi_union_pw_aff:
711 arg0 = multi_union_pw_aff(arg0)
715 res = isl.isl_multi_union_pw_aff_involves_nan(arg0.ptr)
721 if not arg0.__class__ is multi_union_pw_aff:
722 arg0 = multi_union_pw_aff(arg0)
726 res = isl.isl_multi_union_pw_aff_get_list(arg0.ptr)
727 obj = union_pw_aff_list(ctx=ctx, ptr=res)
733 if not arg0.__class__ is multi_union_pw_aff:
734 arg0 = multi_union_pw_aff(arg0)
738 res = isl.isl_multi_union_pw_aff_neg(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
739 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
741 def plain_is_equal(arg0, arg1):
743 if not arg0.__class__ is multi_union_pw_aff:
744 arg0 = multi_union_pw_aff(arg0)
748 if not arg1.__class__ is multi_union_pw_aff:
749 arg1 = multi_union_pw_aff(arg1)
753 res = isl.isl_multi_union_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
758 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
761 if not args[0].__class__ is multi_union_pw_aff:
762 args[0] = multi_union_pw_aff(args[0])
766 res = isl.isl_multi_union_pw_aff_pullback_union_pw_multi_aff(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
767 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
770 def range_product(arg0, arg1):
772 if not arg0.__class__ is multi_union_pw_aff:
773 arg0 = multi_union_pw_aff(arg0)
777 if not arg1.__class__ is multi_union_pw_aff:
778 arg1 = multi_union_pw_aff(arg1)
782 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))
783 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
785 def range_tuple_id(arg0):
787 if not arg0.__class__ is multi_union_pw_aff:
788 arg0 = multi_union_pw_aff(arg0)
792 res = isl.isl_multi_union_pw_aff_get_range_tuple_id(arg0.ptr)
793 obj = id(ctx=ctx, ptr=res)
795 def get_range_tuple_id(arg0):
796 return arg0.range_tuple_id()
797 def reset_range_tuple_id(arg0):
799 if not arg0.__class__ is multi_union_pw_aff:
800 arg0 = multi_union_pw_aff(arg0)
804 res = isl.isl_multi_union_pw_aff_reset_range_tuple_id(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
805 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
808 if len(args) == 2 and args[1].__class__ is multi_val:
811 if not args[0].__class__ is multi_union_pw_aff:
812 args[0] = multi_union_pw_aff(args[0])
816 res = isl.isl_multi_union_pw_aff_scale_multi_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
817 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
819 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
822 if not args[0].__class__ is multi_union_pw_aff:
823 args[0] = multi_union_pw_aff(args[0])
827 if not args[1].__class__ is val:
828 args[1] = val(args[1])
832 res = isl.isl_multi_union_pw_aff_scale_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
833 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
836 def scale_down(*args):
837 if len(args) == 2 and args[1].__class__ is multi_val:
840 if not args[0].__class__ is multi_union_pw_aff:
841 args[0] = multi_union_pw_aff(args[0])
845 res = isl.isl_multi_union_pw_aff_scale_down_multi_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
846 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
848 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
851 if not args[0].__class__ is multi_union_pw_aff:
852 args[0] = multi_union_pw_aff(args[0])
856 if not args[1].__class__ is val:
857 args[1] = val(args[1])
861 res = isl.isl_multi_union_pw_aff_scale_down_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
862 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
865 def set_at(arg0, arg1, arg2):
867 if not arg0.__class__ is multi_union_pw_aff:
868 arg0 = multi_union_pw_aff(arg0)
872 if not arg2.__class__ is union_pw_aff:
873 arg2 = union_pw_aff(arg2)
877 res = isl.isl_multi_union_pw_aff_set_at(isl.isl_multi_union_pw_aff_copy(arg0.ptr), arg1, isl.isl_union_pw_aff_copy(arg2.ptr))
878 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
880 def set_range_tuple(*args):
881 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
884 if not args[0].__class__ is multi_union_pw_aff:
885 args[0] = multi_union_pw_aff(args[0])
889 if not args[1].__class__ is id:
890 args[1] = id(args[1])
894 res = isl.isl_multi_union_pw_aff_set_range_tuple_id(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
895 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
900 if not arg0.__class__ is multi_union_pw_aff:
901 arg0 = multi_union_pw_aff(arg0)
905 res = isl.isl_multi_union_pw_aff_size(arg0.ptr)
911 if not arg0.__class__ is multi_union_pw_aff:
912 arg0 = multi_union_pw_aff(arg0)
916 res = isl.isl_multi_union_pw_aff_get_space(arg0.ptr)
917 obj = space(ctx=ctx, ptr=res)
923 if not arg0.__class__ is multi_union_pw_aff:
924 arg0 = multi_union_pw_aff(arg0)
928 if not arg1.__class__ is multi_union_pw_aff:
929 arg1 = multi_union_pw_aff(arg1)
933 res = isl.isl_multi_union_pw_aff_sub(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
934 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
936 def union_add(arg0, arg1):
938 if not arg0.__class__ is multi_union_pw_aff:
939 arg0 = multi_union_pw_aff(arg0)
943 if not arg1.__class__ is multi_union_pw_aff:
944 arg1 = multi_union_pw_aff(arg1)
948 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))
949 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
954 if not arg0.__class__ is space:
959 res = isl.isl_multi_union_pw_aff_zero(isl.isl_space_copy(arg0.ptr))
960 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
963 isl.isl_multi_union_pw_aff_from_multi_pw_aff.restype = c_void_p
964 isl.isl_multi_union_pw_aff_from_multi_pw_aff.argtypes = [c_void_p]
965 isl.isl_multi_union_pw_aff_from_union_pw_aff.restype = c_void_p
966 isl.isl_multi_union_pw_aff_from_union_pw_aff.argtypes = [c_void_p]
967 isl.isl_multi_union_pw_aff_from_union_pw_aff_list.restype = c_void_p
968 isl.isl_multi_union_pw_aff_from_union_pw_aff_list.argtypes = [c_void_p, c_void_p]
969 isl.isl_multi_union_pw_aff_read_from_str.restype = c_void_p
970 isl.isl_multi_union_pw_aff_read_from_str.argtypes = [Context, c_char_p]
971 isl.isl_multi_union_pw_aff_add.restype = c_void_p
972 isl.isl_multi_union_pw_aff_add.argtypes = [c_void_p, c_void_p]
973 isl.isl_multi_union_pw_aff_get_at.restype = c_void_p
974 isl.isl_multi_union_pw_aff_get_at.argtypes = [c_void_p, c_int]
975 isl.isl_multi_union_pw_aff_bind.restype = c_void_p
976 isl.isl_multi_union_pw_aff_bind.argtypes = [c_void_p, c_void_p]
977 isl.isl_multi_union_pw_aff_coalesce.restype = c_void_p
978 isl.isl_multi_union_pw_aff_coalesce.argtypes = [c_void_p]
979 isl.isl_multi_union_pw_aff_domain.restype = c_void_p
980 isl.isl_multi_union_pw_aff_domain.argtypes = [c_void_p]
981 isl.isl_multi_union_pw_aff_flat_range_product.restype = c_void_p
982 isl.isl_multi_union_pw_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
983 isl.isl_multi_union_pw_aff_gist.restype = c_void_p
984 isl.isl_multi_union_pw_aff_gist.argtypes = [c_void_p, c_void_p]
985 isl.isl_multi_union_pw_aff_gist_params.restype = c_void_p
986 isl.isl_multi_union_pw_aff_gist_params.argtypes = [c_void_p, c_void_p]
987 isl.isl_multi_union_pw_aff_has_range_tuple_id.argtypes = [c_void_p]
988 isl.isl_multi_union_pw_aff_intersect_domain.restype = c_void_p
989 isl.isl_multi_union_pw_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
990 isl.isl_multi_union_pw_aff_intersect_params.restype = c_void_p
991 isl.isl_multi_union_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
992 isl.isl_multi_union_pw_aff_involves_nan.argtypes = [c_void_p]
993 isl.isl_multi_union_pw_aff_get_list.restype = c_void_p
994 isl.isl_multi_union_pw_aff_get_list.argtypes = [c_void_p]
995 isl.isl_multi_union_pw_aff_neg.restype = c_void_p
996 isl.isl_multi_union_pw_aff_neg.argtypes = [c_void_p]
997 isl.isl_multi_union_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
998 isl.isl_multi_union_pw_aff_pullback_union_pw_multi_aff.restype = c_void_p
999 isl.isl_multi_union_pw_aff_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
1000 isl.isl_multi_union_pw_aff_range_product.restype = c_void_p
1001 isl.isl_multi_union_pw_aff_range_product.argtypes = [c_void_p, c_void_p]
1002 isl.isl_multi_union_pw_aff_get_range_tuple_id.restype = c_void_p
1003 isl.isl_multi_union_pw_aff_get_range_tuple_id.argtypes = [c_void_p]
1004 isl.isl_multi_union_pw_aff_reset_range_tuple_id.restype = c_void_p
1005 isl.isl_multi_union_pw_aff_reset_range_tuple_id.argtypes = [c_void_p]
1006 isl.isl_multi_union_pw_aff_scale_multi_val.restype = c_void_p
1007 isl.isl_multi_union_pw_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
1008 isl.isl_multi_union_pw_aff_scale_val.restype = c_void_p
1009 isl.isl_multi_union_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
1010 isl.isl_multi_union_pw_aff_scale_down_multi_val.restype = c_void_p
1011 isl.isl_multi_union_pw_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
1012 isl.isl_multi_union_pw_aff_scale_down_val.restype = c_void_p
1013 isl.isl_multi_union_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
1014 isl.isl_multi_union_pw_aff_set_at.restype = c_void_p
1015 isl.isl_multi_union_pw_aff_set_at.argtypes = [c_void_p, c_int, c_void_p]
1016 isl.isl_multi_union_pw_aff_set_range_tuple_id.restype = c_void_p
1017 isl.isl_multi_union_pw_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
1018 isl.isl_multi_union_pw_aff_size.argtypes = [c_void_p]
1019 isl.isl_multi_union_pw_aff_get_space.restype = c_void_p
1020 isl.isl_multi_union_pw_aff_get_space.argtypes = [c_void_p]
1021 isl.isl_multi_union_pw_aff_sub.restype = c_void_p
1022 isl.isl_multi_union_pw_aff_sub.argtypes = [c_void_p, c_void_p]
1023 isl.isl_multi_union_pw_aff_union_add.restype = c_void_p
1024 isl.isl_multi_union_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
1025 isl.isl_multi_union_pw_aff_zero.restype = c_void_p
1026 isl.isl_multi_union_pw_aff_zero.argtypes = [c_void_p]
1027 isl.isl_multi_union_pw_aff_copy.restype = c_void_p
1028 isl.isl_multi_union_pw_aff_copy.argtypes = [c_void_p]
1029 isl.isl_multi_union_pw_aff_free.restype = c_void_p
1030 isl.isl_multi_union_pw_aff_free.argtypes = [c_void_p]
1031 isl.isl_multi_union_pw_aff_to_str.restype = POINTER(c_char)
1032 isl.isl_multi_union_pw_aff_to_str.argtypes = [c_void_p]
1034 class union_pw_aff(union_pw_multi_aff, multi_union_pw_aff):
1035 def __init__(self, *args, **keywords):
1036 if "ptr" in keywords:
1037 self.ctx = keywords["ctx"]
1038 self.ptr = keywords["ptr"]
1040 if len(args) == 1 and args[0].__class__ is aff:
1041 self.ctx = Context.getDefaultInstance()
1042 self.ptr = isl.isl_union_pw_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
1044 if len(args) == 1 and args[0].__class__ is pw_aff:
1045 self.ctx = Context.getDefaultInstance()
1046 self.ptr = isl.isl_union_pw_aff_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
1048 if len(args) == 1 and type(args[0]) == str:
1049 self.ctx = Context.getDefaultInstance()
1050 self.ptr = isl.isl_union_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
1054 if hasattr(self, 'ptr'):
1055 isl.isl_union_pw_aff_free(self.ptr)
1058 if not arg0.__class__ is union_pw_aff:
1059 arg0 = union_pw_aff(arg0)
1062 ptr = isl.isl_union_pw_aff_to_str(arg0.ptr)
1063 res = cast(ptr, c_char_p).value.decode('ascii')
1069 return 'isl.union_pw_aff("""%s""")' % s
1071 return 'isl.union_pw_aff("%s")' % s
1072 def add(arg0, arg1):
1074 if not arg0.__class__ is union_pw_aff:
1075 arg0 = union_pw_aff(arg0)
1079 if not arg1.__class__ is union_pw_aff:
1080 arg1 = union_pw_aff(arg1)
1082 return union_pw_multi_aff(arg0).add(arg1)
1084 res = isl.isl_union_pw_aff_add(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
1085 obj = union_pw_aff(ctx=ctx, ptr=res)
1088 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
1091 if not args[0].__class__ is union_pw_aff:
1092 args[0] = union_pw_aff(args[0])
1096 if not args[1].__class__ is id:
1097 args[1] = id(args[1])
1101 res = isl.isl_union_pw_aff_bind_id(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
1102 obj = union_set(ctx=ctx, ptr=res)
1107 if not arg0.__class__ is union_pw_aff:
1108 arg0 = union_pw_aff(arg0)
1112 res = isl.isl_union_pw_aff_coalesce(isl.isl_union_pw_aff_copy(arg0.ptr))
1113 obj = union_pw_aff(ctx=ctx, ptr=res)
1117 if not arg0.__class__ is union_pw_aff:
1118 arg0 = union_pw_aff(arg0)
1122 res = isl.isl_union_pw_aff_domain(isl.isl_union_pw_aff_copy(arg0.ptr))
1123 obj = union_set(ctx=ctx, ptr=res)
1125 def drop_unused_params(arg0):
1127 if not arg0.__class__ is union_pw_aff:
1128 arg0 = union_pw_aff(arg0)
1132 res = isl.isl_union_pw_aff_drop_unused_params(isl.isl_union_pw_aff_copy(arg0.ptr))
1133 obj = union_pw_aff(ctx=ctx, ptr=res)
1135 def gist(arg0, arg1):
1137 if not arg0.__class__ is union_pw_aff:
1138 arg0 = union_pw_aff(arg0)
1142 if not arg1.__class__ is union_set:
1143 arg1 = union_set(arg1)
1145 return union_pw_multi_aff(arg0).gist(arg1)
1147 res = isl.isl_union_pw_aff_gist(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
1148 obj = union_pw_aff(ctx=ctx, ptr=res)
1150 def intersect_domain(*args):
1151 if len(args) == 2 and args[1].__class__ is space:
1154 if not args[0].__class__ is union_pw_aff:
1155 args[0] = union_pw_aff(args[0])
1159 res = isl.isl_union_pw_aff_intersect_domain_space(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
1160 obj = union_pw_aff(ctx=ctx, ptr=res)
1162 if len(args) == 2 and args[1].__class__ is union_set:
1165 if not args[0].__class__ is union_pw_aff:
1166 args[0] = union_pw_aff(args[0])
1170 res = isl.isl_union_pw_aff_intersect_domain_union_set(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
1171 obj = union_pw_aff(ctx=ctx, ptr=res)
1174 def intersect_domain_wrapped_domain(arg0, arg1):
1176 if not arg0.__class__ is union_pw_aff:
1177 arg0 = union_pw_aff(arg0)
1181 if not arg1.__class__ is union_set:
1182 arg1 = union_set(arg1)
1184 return union_pw_multi_aff(arg0).intersect_domain_wrapped_domain(arg1)
1186 res = isl.isl_union_pw_aff_intersect_domain_wrapped_domain(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
1187 obj = union_pw_aff(ctx=ctx, ptr=res)
1189 def intersect_domain_wrapped_range(arg0, arg1):
1191 if not arg0.__class__ is union_pw_aff:
1192 arg0 = union_pw_aff(arg0)
1196 if not arg1.__class__ is union_set:
1197 arg1 = union_set(arg1)
1199 return union_pw_multi_aff(arg0).intersect_domain_wrapped_range(arg1)
1201 res = isl.isl_union_pw_aff_intersect_domain_wrapped_range(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
1202 obj = union_pw_aff(ctx=ctx, ptr=res)
1204 def intersect_params(arg0, arg1):
1206 if not arg0.__class__ is union_pw_aff:
1207 arg0 = union_pw_aff(arg0)
1211 if not arg1.__class__ is set:
1214 return union_pw_multi_aff(arg0).intersect_params(arg1)
1216 res = isl.isl_union_pw_aff_intersect_params(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1217 obj = union_pw_aff(ctx=ctx, ptr=res)
1219 def plain_is_equal(arg0, arg1):
1221 if not arg0.__class__ is union_pw_aff:
1222 arg0 = union_pw_aff(arg0)
1226 if not arg1.__class__ is union_pw_aff:
1227 arg1 = union_pw_aff(arg1)
1229 return union_pw_multi_aff(arg0).plain_is_equal(arg1)
1231 res = isl.isl_union_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
1235 def pullback(*args):
1236 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
1239 if not args[0].__class__ is union_pw_aff:
1240 args[0] = union_pw_aff(args[0])
1244 res = isl.isl_union_pw_aff_pullback_union_pw_multi_aff(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
1245 obj = union_pw_aff(ctx=ctx, ptr=res)
1250 if not arg0.__class__ is union_pw_aff:
1251 arg0 = union_pw_aff(arg0)
1255 res = isl.isl_union_pw_aff_get_space(arg0.ptr)
1256 obj = space(ctx=ctx, ptr=res)
1258 def get_space(arg0):
1260 def sub(arg0, arg1):
1262 if not arg0.__class__ is union_pw_aff:
1263 arg0 = union_pw_aff(arg0)
1267 if not arg1.__class__ is union_pw_aff:
1268 arg1 = union_pw_aff(arg1)
1270 return union_pw_multi_aff(arg0).sub(arg1)
1272 res = isl.isl_union_pw_aff_sub(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
1273 obj = union_pw_aff(ctx=ctx, ptr=res)
1275 def subtract_domain(*args):
1276 if len(args) == 2 and args[1].__class__ is space:
1279 if not args[0].__class__ is union_pw_aff:
1280 args[0] = union_pw_aff(args[0])
1284 res = isl.isl_union_pw_aff_subtract_domain_space(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
1285 obj = union_pw_aff(ctx=ctx, ptr=res)
1287 if len(args) == 2 and args[1].__class__ is union_set:
1290 if not args[0].__class__ is union_pw_aff:
1291 args[0] = union_pw_aff(args[0])
1295 res = isl.isl_union_pw_aff_subtract_domain_union_set(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
1296 obj = union_pw_aff(ctx=ctx, ptr=res)
1301 if not arg0.__class__ is union_pw_aff:
1302 arg0 = union_pw_aff(arg0)
1306 res = isl.isl_union_pw_aff_to_list(isl.isl_union_pw_aff_copy(arg0.ptr))
1307 obj = union_pw_aff_list(ctx=ctx, ptr=res)
1309 def union_add(arg0, arg1):
1311 if not arg0.__class__ is union_pw_aff:
1312 arg0 = union_pw_aff(arg0)
1316 if not arg1.__class__ is union_pw_aff:
1317 arg1 = union_pw_aff(arg1)
1319 return union_pw_multi_aff(arg0).union_add(arg1)
1321 res = isl.isl_union_pw_aff_union_add(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
1322 obj = union_pw_aff(ctx=ctx, ptr=res)
1325 isl.isl_union_pw_aff_from_aff.restype = c_void_p
1326 isl.isl_union_pw_aff_from_aff.argtypes = [c_void_p]
1327 isl.isl_union_pw_aff_from_pw_aff.restype = c_void_p
1328 isl.isl_union_pw_aff_from_pw_aff.argtypes = [c_void_p]
1329 isl.isl_union_pw_aff_read_from_str.restype = c_void_p
1330 isl.isl_union_pw_aff_read_from_str.argtypes = [Context, c_char_p]
1331 isl.isl_union_pw_aff_add.restype = c_void_p
1332 isl.isl_union_pw_aff_add.argtypes = [c_void_p, c_void_p]
1333 isl.isl_union_pw_aff_bind_id.restype = c_void_p
1334 isl.isl_union_pw_aff_bind_id.argtypes = [c_void_p, c_void_p]
1335 isl.isl_union_pw_aff_coalesce.restype = c_void_p
1336 isl.isl_union_pw_aff_coalesce.argtypes = [c_void_p]
1337 isl.isl_union_pw_aff_domain.restype = c_void_p
1338 isl.isl_union_pw_aff_domain.argtypes = [c_void_p]
1339 isl.isl_union_pw_aff_drop_unused_params.restype = c_void_p
1340 isl.isl_union_pw_aff_drop_unused_params.argtypes = [c_void_p]
1341 isl.isl_union_pw_aff_gist.restype = c_void_p
1342 isl.isl_union_pw_aff_gist.argtypes = [c_void_p, c_void_p]
1343 isl.isl_union_pw_aff_intersect_domain_space.restype = c_void_p
1344 isl.isl_union_pw_aff_intersect_domain_space.argtypes = [c_void_p, c_void_p]
1345 isl.isl_union_pw_aff_intersect_domain_union_set.restype = c_void_p
1346 isl.isl_union_pw_aff_intersect_domain_union_set.argtypes = [c_void_p, c_void_p]
1347 isl.isl_union_pw_aff_intersect_domain_wrapped_domain.restype = c_void_p
1348 isl.isl_union_pw_aff_intersect_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
1349 isl.isl_union_pw_aff_intersect_domain_wrapped_range.restype = c_void_p
1350 isl.isl_union_pw_aff_intersect_domain_wrapped_range.argtypes = [c_void_p, c_void_p]
1351 isl.isl_union_pw_aff_intersect_params.restype = c_void_p
1352 isl.isl_union_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
1353 isl.isl_union_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
1354 isl.isl_union_pw_aff_pullback_union_pw_multi_aff.restype = c_void_p
1355 isl.isl_union_pw_aff_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
1356 isl.isl_union_pw_aff_get_space.restype = c_void_p
1357 isl.isl_union_pw_aff_get_space.argtypes = [c_void_p]
1358 isl.isl_union_pw_aff_sub.restype = c_void_p
1359 isl.isl_union_pw_aff_sub.argtypes = [c_void_p, c_void_p]
1360 isl.isl_union_pw_aff_subtract_domain_space.restype = c_void_p
1361 isl.isl_union_pw_aff_subtract_domain_space.argtypes = [c_void_p, c_void_p]
1362 isl.isl_union_pw_aff_subtract_domain_union_set.restype = c_void_p
1363 isl.isl_union_pw_aff_subtract_domain_union_set.argtypes = [c_void_p, c_void_p]
1364 isl.isl_union_pw_aff_to_list.restype = c_void_p
1365 isl.isl_union_pw_aff_to_list.argtypes = [c_void_p]
1366 isl.isl_union_pw_aff_union_add.restype = c_void_p
1367 isl.isl_union_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
1368 isl.isl_union_pw_aff_copy.restype = c_void_p
1369 isl.isl_union_pw_aff_copy.argtypes = [c_void_p]
1370 isl.isl_union_pw_aff_free.restype = c_void_p
1371 isl.isl_union_pw_aff_free.argtypes = [c_void_p]
1372 isl.isl_union_pw_aff_to_str.restype = POINTER(c_char)
1373 isl.isl_union_pw_aff_to_str.argtypes = [c_void_p]
1375 class multi_pw_aff(multi_union_pw_aff):
1376 def __init__(self, *args, **keywords):
1377 if "ptr" in keywords:
1378 self.ctx = keywords["ctx"]
1379 self.ptr = keywords["ptr"]
1381 if len(args) == 1 and args[0].__class__ is aff:
1382 self.ctx = Context.getDefaultInstance()
1383 self.ptr = isl.isl_multi_pw_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
1385 if len(args) == 1 and args[0].__class__ is multi_aff:
1386 self.ctx = Context.getDefaultInstance()
1387 self.ptr = isl.isl_multi_pw_aff_from_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
1389 if len(args) == 1 and args[0].__class__ is pw_aff:
1390 self.ctx = Context.getDefaultInstance()
1391 self.ptr = isl.isl_multi_pw_aff_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
1393 if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is pw_aff_list:
1394 self.ctx = Context.getDefaultInstance()
1395 self.ptr = isl.isl_multi_pw_aff_from_pw_aff_list(isl.isl_space_copy(args[0].ptr), isl.isl_pw_aff_list_copy(args[1].ptr))
1397 if len(args) == 1 and args[0].__class__ is pw_multi_aff:
1398 self.ctx = Context.getDefaultInstance()
1399 self.ptr = isl.isl_multi_pw_aff_from_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr))
1401 if len(args) == 1 and type(args[0]) == str:
1402 self.ctx = Context.getDefaultInstance()
1403 self.ptr = isl.isl_multi_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
1407 if hasattr(self, 'ptr'):
1408 isl.isl_multi_pw_aff_free(self.ptr)
1411 if not arg0.__class__ is multi_pw_aff:
1412 arg0 = multi_pw_aff(arg0)
1415 ptr = isl.isl_multi_pw_aff_to_str(arg0.ptr)
1416 res = cast(ptr, c_char_p).value.decode('ascii')
1422 return 'isl.multi_pw_aff("""%s""")' % s
1424 return 'isl.multi_pw_aff("%s")' % s
1425 def add(arg0, arg1):
1427 if not arg0.__class__ is multi_pw_aff:
1428 arg0 = multi_pw_aff(arg0)
1432 if not arg1.__class__ is multi_pw_aff:
1433 arg1 = multi_pw_aff(arg1)
1435 return multi_union_pw_aff(arg0).add(arg1)
1437 res = isl.isl_multi_pw_aff_add(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1438 obj = multi_pw_aff(ctx=ctx, ptr=res)
1440 def add_constant(*args):
1441 if len(args) == 2 and args[1].__class__ is multi_val:
1444 if not args[0].__class__ is multi_pw_aff:
1445 args[0] = multi_pw_aff(args[0])
1449 res = isl.isl_multi_pw_aff_add_constant_multi_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
1450 obj = multi_pw_aff(ctx=ctx, ptr=res)
1452 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
1455 if not args[0].__class__ is multi_pw_aff:
1456 args[0] = multi_pw_aff(args[0])
1460 if not args[1].__class__ is val:
1461 args[1] = val(args[1])
1465 res = isl.isl_multi_pw_aff_add_constant_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
1466 obj = multi_pw_aff(ctx=ctx, ptr=res)
1471 if not arg0.__class__ is multi_pw_aff:
1472 arg0 = multi_pw_aff(arg0)
1476 res = isl.isl_multi_pw_aff_as_map(isl.isl_multi_pw_aff_copy(arg0.ptr))
1477 obj = map(ctx=ctx, ptr=res)
1479 def as_multi_aff(arg0):
1481 if not arg0.__class__ is multi_pw_aff:
1482 arg0 = multi_pw_aff(arg0)
1486 res = isl.isl_multi_pw_aff_as_multi_aff(isl.isl_multi_pw_aff_copy(arg0.ptr))
1487 obj = multi_aff(ctx=ctx, ptr=res)
1491 if not arg0.__class__ is multi_pw_aff:
1492 arg0 = multi_pw_aff(arg0)
1496 res = isl.isl_multi_pw_aff_as_set(isl.isl_multi_pw_aff_copy(arg0.ptr))
1497 obj = set(ctx=ctx, ptr=res)
1501 if not arg0.__class__ is multi_pw_aff:
1502 arg0 = multi_pw_aff(arg0)
1506 res = isl.isl_multi_pw_aff_get_at(arg0.ptr, arg1)
1507 obj = pw_aff(ctx=ctx, ptr=res)
1509 def get_at(arg0, arg1):
1510 return arg0.at(arg1)
1511 def bind(arg0, arg1):
1513 if not arg0.__class__ is multi_pw_aff:
1514 arg0 = multi_pw_aff(arg0)
1518 if not arg1.__class__ is multi_id:
1519 arg1 = multi_id(arg1)
1521 return multi_union_pw_aff(arg0).bind(arg1)
1523 res = isl.isl_multi_pw_aff_bind(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
1524 obj = set(ctx=ctx, ptr=res)
1526 def bind_domain(arg0, arg1):
1528 if not arg0.__class__ is multi_pw_aff:
1529 arg0 = multi_pw_aff(arg0)
1533 if not arg1.__class__ is multi_id:
1534 arg1 = multi_id(arg1)
1536 return multi_union_pw_aff(arg0).bind_domain(arg1)
1538 res = isl.isl_multi_pw_aff_bind_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
1539 obj = multi_pw_aff(ctx=ctx, ptr=res)
1541 def bind_domain_wrapped_domain(arg0, arg1):
1543 if not arg0.__class__ is multi_pw_aff:
1544 arg0 = multi_pw_aff(arg0)
1548 if not arg1.__class__ is multi_id:
1549 arg1 = multi_id(arg1)
1551 return multi_union_pw_aff(arg0).bind_domain_wrapped_domain(arg1)
1553 res = isl.isl_multi_pw_aff_bind_domain_wrapped_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
1554 obj = multi_pw_aff(ctx=ctx, ptr=res)
1558 if not arg0.__class__ is multi_pw_aff:
1559 arg0 = multi_pw_aff(arg0)
1563 res = isl.isl_multi_pw_aff_coalesce(isl.isl_multi_pw_aff_copy(arg0.ptr))
1564 obj = multi_pw_aff(ctx=ctx, ptr=res)
1568 if not arg0.__class__ is multi_pw_aff:
1569 arg0 = multi_pw_aff(arg0)
1573 res = isl.isl_multi_pw_aff_domain(isl.isl_multi_pw_aff_copy(arg0.ptr))
1574 obj = set(ctx=ctx, ptr=res)
1576 def domain_reverse(arg0):
1578 if not arg0.__class__ is multi_pw_aff:
1579 arg0 = multi_pw_aff(arg0)
1583 res = isl.isl_multi_pw_aff_domain_reverse(isl.isl_multi_pw_aff_copy(arg0.ptr))
1584 obj = multi_pw_aff(ctx=ctx, ptr=res)
1586 def flat_range_product(arg0, arg1):
1588 if not arg0.__class__ is multi_pw_aff:
1589 arg0 = multi_pw_aff(arg0)
1593 if not arg1.__class__ is multi_pw_aff:
1594 arg1 = multi_pw_aff(arg1)
1596 return multi_union_pw_aff(arg0).flat_range_product(arg1)
1598 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))
1599 obj = multi_pw_aff(ctx=ctx, ptr=res)
1601 def gist(arg0, arg1):
1603 if not arg0.__class__ is multi_pw_aff:
1604 arg0 = multi_pw_aff(arg0)
1608 if not arg1.__class__ is set:
1611 return multi_union_pw_aff(arg0).gist(arg1)
1613 res = isl.isl_multi_pw_aff_gist(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1614 obj = multi_pw_aff(ctx=ctx, ptr=res)
1616 def gist_params(arg0, arg1):
1618 if not arg0.__class__ is multi_pw_aff:
1619 arg0 = multi_pw_aff(arg0)
1623 if not arg1.__class__ is set:
1626 return multi_union_pw_aff(arg0).gist_params(arg1)
1628 res = isl.isl_multi_pw_aff_gist_params(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1629 obj = multi_pw_aff(ctx=ctx, ptr=res)
1631 def has_range_tuple_id(arg0):
1633 if not arg0.__class__ is multi_pw_aff:
1634 arg0 = multi_pw_aff(arg0)
1638 res = isl.isl_multi_pw_aff_has_range_tuple_id(arg0.ptr)
1642 def identity(*args):
1646 if not args[0].__class__ is multi_pw_aff:
1647 args[0] = multi_pw_aff(args[0])
1651 res = isl.isl_multi_pw_aff_identity_multi_pw_aff(isl.isl_multi_pw_aff_copy(args[0].ptr))
1652 obj = multi_pw_aff(ctx=ctx, ptr=res)
1656 def identity_on_domain(*args):
1657 if len(args) == 1 and args[0].__class__ is space:
1659 res = isl.isl_multi_pw_aff_identity_on_domain_space(isl.isl_space_copy(args[0].ptr))
1660 obj = multi_pw_aff(ctx=ctx, ptr=res)
1663 def insert_domain(arg0, arg1):
1665 if not arg0.__class__ is multi_pw_aff:
1666 arg0 = multi_pw_aff(arg0)
1670 if not arg1.__class__ is space:
1673 return multi_union_pw_aff(arg0).insert_domain(arg1)
1675 res = isl.isl_multi_pw_aff_insert_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
1676 obj = multi_pw_aff(ctx=ctx, ptr=res)
1678 def intersect_domain(arg0, arg1):
1680 if not arg0.__class__ is multi_pw_aff:
1681 arg0 = multi_pw_aff(arg0)
1685 if not arg1.__class__ is set:
1688 return multi_union_pw_aff(arg0).intersect_domain(arg1)
1690 res = isl.isl_multi_pw_aff_intersect_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1691 obj = multi_pw_aff(ctx=ctx, ptr=res)
1693 def intersect_params(arg0, arg1):
1695 if not arg0.__class__ is multi_pw_aff:
1696 arg0 = multi_pw_aff(arg0)
1700 if not arg1.__class__ is set:
1703 return multi_union_pw_aff(arg0).intersect_params(arg1)
1705 res = isl.isl_multi_pw_aff_intersect_params(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1706 obj = multi_pw_aff(ctx=ctx, ptr=res)
1708 def involves_nan(arg0):
1710 if not arg0.__class__ is multi_pw_aff:
1711 arg0 = multi_pw_aff(arg0)
1715 res = isl.isl_multi_pw_aff_involves_nan(arg0.ptr)
1719 def involves_param(*args):
1720 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
1723 if not args[0].__class__ is multi_pw_aff:
1724 args[0] = multi_pw_aff(args[0])
1728 if not args[1].__class__ is id:
1729 args[1] = id(args[1])
1733 res = isl.isl_multi_pw_aff_involves_param_id(args[0].ptr, args[1].ptr)
1737 if len(args) == 2 and args[1].__class__ is id_list:
1740 if not args[0].__class__ is multi_pw_aff:
1741 args[0] = multi_pw_aff(args[0])
1745 res = isl.isl_multi_pw_aff_involves_param_id_list(args[0].ptr, args[1].ptr)
1750 def isa_multi_aff(arg0):
1752 if not arg0.__class__ is multi_pw_aff:
1753 arg0 = multi_pw_aff(arg0)
1757 res = isl.isl_multi_pw_aff_isa_multi_aff(arg0.ptr)
1763 if not arg0.__class__ is multi_pw_aff:
1764 arg0 = multi_pw_aff(arg0)
1768 res = isl.isl_multi_pw_aff_get_list(arg0.ptr)
1769 obj = pw_aff_list(ctx=ctx, ptr=res)
1773 def max(arg0, arg1):
1775 if not arg0.__class__ is multi_pw_aff:
1776 arg0 = multi_pw_aff(arg0)
1780 if not arg1.__class__ is multi_pw_aff:
1781 arg1 = multi_pw_aff(arg1)
1783 return multi_union_pw_aff(arg0).max(arg1)
1785 res = isl.isl_multi_pw_aff_max(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1786 obj = multi_pw_aff(ctx=ctx, ptr=res)
1788 def max_multi_val(arg0):
1790 if not arg0.__class__ is multi_pw_aff:
1791 arg0 = multi_pw_aff(arg0)
1795 res = isl.isl_multi_pw_aff_max_multi_val(isl.isl_multi_pw_aff_copy(arg0.ptr))
1796 obj = multi_val(ctx=ctx, ptr=res)
1798 def min(arg0, arg1):
1800 if not arg0.__class__ is multi_pw_aff:
1801 arg0 = multi_pw_aff(arg0)
1805 if not arg1.__class__ is multi_pw_aff:
1806 arg1 = multi_pw_aff(arg1)
1808 return multi_union_pw_aff(arg0).min(arg1)
1810 res = isl.isl_multi_pw_aff_min(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1811 obj = multi_pw_aff(ctx=ctx, ptr=res)
1813 def min_multi_val(arg0):
1815 if not arg0.__class__ is multi_pw_aff:
1816 arg0 = multi_pw_aff(arg0)
1820 res = isl.isl_multi_pw_aff_min_multi_val(isl.isl_multi_pw_aff_copy(arg0.ptr))
1821 obj = multi_val(ctx=ctx, ptr=res)
1825 if not arg0.__class__ is multi_pw_aff:
1826 arg0 = multi_pw_aff(arg0)
1830 res = isl.isl_multi_pw_aff_neg(isl.isl_multi_pw_aff_copy(arg0.ptr))
1831 obj = multi_pw_aff(ctx=ctx, ptr=res)
1833 def plain_is_equal(arg0, arg1):
1835 if not arg0.__class__ is multi_pw_aff:
1836 arg0 = multi_pw_aff(arg0)
1840 if not arg1.__class__ is multi_pw_aff:
1841 arg1 = multi_pw_aff(arg1)
1843 return multi_union_pw_aff(arg0).plain_is_equal(arg1)
1845 res = isl.isl_multi_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
1849 def product(arg0, arg1):
1851 if not arg0.__class__ is multi_pw_aff:
1852 arg0 = multi_pw_aff(arg0)
1856 if not arg1.__class__ is multi_pw_aff:
1857 arg1 = multi_pw_aff(arg1)
1859 return multi_union_pw_aff(arg0).product(arg1)
1861 res = isl.isl_multi_pw_aff_product(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1862 obj = multi_pw_aff(ctx=ctx, ptr=res)
1864 def pullback(*args):
1865 if len(args) == 2 and args[1].__class__ is multi_aff:
1868 if not args[0].__class__ is multi_pw_aff:
1869 args[0] = multi_pw_aff(args[0])
1873 res = isl.isl_multi_pw_aff_pullback_multi_aff(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
1874 obj = multi_pw_aff(ctx=ctx, ptr=res)
1876 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
1879 if not args[0].__class__ is multi_pw_aff:
1880 args[0] = multi_pw_aff(args[0])
1884 res = isl.isl_multi_pw_aff_pullback_multi_pw_aff(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
1885 obj = multi_pw_aff(ctx=ctx, ptr=res)
1887 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
1890 if not args[0].__class__ is multi_pw_aff:
1891 args[0] = multi_pw_aff(args[0])
1895 res = isl.isl_multi_pw_aff_pullback_pw_multi_aff(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
1896 obj = multi_pw_aff(ctx=ctx, ptr=res)
1899 def range_product(arg0, arg1):
1901 if not arg0.__class__ is multi_pw_aff:
1902 arg0 = multi_pw_aff(arg0)
1906 if not arg1.__class__ is multi_pw_aff:
1907 arg1 = multi_pw_aff(arg1)
1909 return multi_union_pw_aff(arg0).range_product(arg1)
1911 res = isl.isl_multi_pw_aff_range_product(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1912 obj = multi_pw_aff(ctx=ctx, ptr=res)
1914 def range_tuple_id(arg0):
1916 if not arg0.__class__ is multi_pw_aff:
1917 arg0 = multi_pw_aff(arg0)
1921 res = isl.isl_multi_pw_aff_get_range_tuple_id(arg0.ptr)
1922 obj = id(ctx=ctx, ptr=res)
1924 def get_range_tuple_id(arg0):
1925 return arg0.range_tuple_id()
1926 def reset_range_tuple_id(arg0):
1928 if not arg0.__class__ is multi_pw_aff:
1929 arg0 = multi_pw_aff(arg0)
1933 res = isl.isl_multi_pw_aff_reset_range_tuple_id(isl.isl_multi_pw_aff_copy(arg0.ptr))
1934 obj = multi_pw_aff(ctx=ctx, ptr=res)
1937 if len(args) == 2 and args[1].__class__ is multi_val:
1940 if not args[0].__class__ is multi_pw_aff:
1941 args[0] = multi_pw_aff(args[0])
1945 res = isl.isl_multi_pw_aff_scale_multi_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
1946 obj = multi_pw_aff(ctx=ctx, ptr=res)
1948 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
1951 if not args[0].__class__ is multi_pw_aff:
1952 args[0] = multi_pw_aff(args[0])
1956 if not args[1].__class__ is val:
1957 args[1] = val(args[1])
1961 res = isl.isl_multi_pw_aff_scale_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
1962 obj = multi_pw_aff(ctx=ctx, ptr=res)
1965 def scale_down(*args):
1966 if len(args) == 2 and args[1].__class__ is multi_val:
1969 if not args[0].__class__ is multi_pw_aff:
1970 args[0] = multi_pw_aff(args[0])
1974 res = isl.isl_multi_pw_aff_scale_down_multi_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
1975 obj = multi_pw_aff(ctx=ctx, ptr=res)
1977 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
1980 if not args[0].__class__ is multi_pw_aff:
1981 args[0] = multi_pw_aff(args[0])
1985 if not args[1].__class__ is val:
1986 args[1] = val(args[1])
1990 res = isl.isl_multi_pw_aff_scale_down_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
1991 obj = multi_pw_aff(ctx=ctx, ptr=res)
1994 def set_at(arg0, arg1, arg2):
1996 if not arg0.__class__ is multi_pw_aff:
1997 arg0 = multi_pw_aff(arg0)
2001 if not arg2.__class__ is pw_aff:
2004 return multi_union_pw_aff(arg0).set_at(arg1, arg2)
2006 res = isl.isl_multi_pw_aff_set_at(isl.isl_multi_pw_aff_copy(arg0.ptr), arg1, isl.isl_pw_aff_copy(arg2.ptr))
2007 obj = multi_pw_aff(ctx=ctx, ptr=res)
2009 def set_range_tuple(*args):
2010 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
2013 if not args[0].__class__ is multi_pw_aff:
2014 args[0] = multi_pw_aff(args[0])
2018 if not args[1].__class__ is id:
2019 args[1] = id(args[1])
2023 res = isl.isl_multi_pw_aff_set_range_tuple_id(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
2024 obj = multi_pw_aff(ctx=ctx, ptr=res)
2029 if not arg0.__class__ is multi_pw_aff:
2030 arg0 = multi_pw_aff(arg0)
2034 res = isl.isl_multi_pw_aff_size(arg0.ptr)
2040 if not arg0.__class__ is multi_pw_aff:
2041 arg0 = multi_pw_aff(arg0)
2045 res = isl.isl_multi_pw_aff_get_space(arg0.ptr)
2046 obj = space(ctx=ctx, ptr=res)
2048 def get_space(arg0):
2050 def sub(arg0, arg1):
2052 if not arg0.__class__ is multi_pw_aff:
2053 arg0 = multi_pw_aff(arg0)
2057 if not arg1.__class__ is multi_pw_aff:
2058 arg1 = multi_pw_aff(arg1)
2060 return multi_union_pw_aff(arg0).sub(arg1)
2062 res = isl.isl_multi_pw_aff_sub(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
2063 obj = multi_pw_aff(ctx=ctx, ptr=res)
2065 def unbind_params_insert_domain(arg0, arg1):
2067 if not arg0.__class__ is multi_pw_aff:
2068 arg0 = multi_pw_aff(arg0)
2072 if not arg1.__class__ is multi_id:
2073 arg1 = multi_id(arg1)
2075 return multi_union_pw_aff(arg0).unbind_params_insert_domain(arg1)
2077 res = isl.isl_multi_pw_aff_unbind_params_insert_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
2078 obj = multi_pw_aff(ctx=ctx, ptr=res)
2080 def union_add(arg0, arg1):
2082 if not arg0.__class__ is multi_pw_aff:
2083 arg0 = multi_pw_aff(arg0)
2087 if not arg1.__class__ is multi_pw_aff:
2088 arg1 = multi_pw_aff(arg1)
2090 return multi_union_pw_aff(arg0).union_add(arg1)
2092 res = isl.isl_multi_pw_aff_union_add(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
2093 obj = multi_pw_aff(ctx=ctx, ptr=res)
2098 if not arg0.__class__ is space:
2103 res = isl.isl_multi_pw_aff_zero(isl.isl_space_copy(arg0.ptr))
2104 obj = multi_pw_aff(ctx=ctx, ptr=res)
2107 isl.isl_multi_pw_aff_from_aff.restype = c_void_p
2108 isl.isl_multi_pw_aff_from_aff.argtypes = [c_void_p]
2109 isl.isl_multi_pw_aff_from_multi_aff.restype = c_void_p
2110 isl.isl_multi_pw_aff_from_multi_aff.argtypes = [c_void_p]
2111 isl.isl_multi_pw_aff_from_pw_aff.restype = c_void_p
2112 isl.isl_multi_pw_aff_from_pw_aff.argtypes = [c_void_p]
2113 isl.isl_multi_pw_aff_from_pw_aff_list.restype = c_void_p
2114 isl.isl_multi_pw_aff_from_pw_aff_list.argtypes = [c_void_p, c_void_p]
2115 isl.isl_multi_pw_aff_from_pw_multi_aff.restype = c_void_p
2116 isl.isl_multi_pw_aff_from_pw_multi_aff.argtypes = [c_void_p]
2117 isl.isl_multi_pw_aff_read_from_str.restype = c_void_p
2118 isl.isl_multi_pw_aff_read_from_str.argtypes = [Context, c_char_p]
2119 isl.isl_multi_pw_aff_add.restype = c_void_p
2120 isl.isl_multi_pw_aff_add.argtypes = [c_void_p, c_void_p]
2121 isl.isl_multi_pw_aff_add_constant_multi_val.restype = c_void_p
2122 isl.isl_multi_pw_aff_add_constant_multi_val.argtypes = [c_void_p, c_void_p]
2123 isl.isl_multi_pw_aff_add_constant_val.restype = c_void_p
2124 isl.isl_multi_pw_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
2125 isl.isl_multi_pw_aff_as_map.restype = c_void_p
2126 isl.isl_multi_pw_aff_as_map.argtypes = [c_void_p]
2127 isl.isl_multi_pw_aff_as_multi_aff.restype = c_void_p
2128 isl.isl_multi_pw_aff_as_multi_aff.argtypes = [c_void_p]
2129 isl.isl_multi_pw_aff_as_set.restype = c_void_p
2130 isl.isl_multi_pw_aff_as_set.argtypes = [c_void_p]
2131 isl.isl_multi_pw_aff_get_at.restype = c_void_p
2132 isl.isl_multi_pw_aff_get_at.argtypes = [c_void_p, c_int]
2133 isl.isl_multi_pw_aff_bind.restype = c_void_p
2134 isl.isl_multi_pw_aff_bind.argtypes = [c_void_p, c_void_p]
2135 isl.isl_multi_pw_aff_bind_domain.restype = c_void_p
2136 isl.isl_multi_pw_aff_bind_domain.argtypes = [c_void_p, c_void_p]
2137 isl.isl_multi_pw_aff_bind_domain_wrapped_domain.restype = c_void_p
2138 isl.isl_multi_pw_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
2139 isl.isl_multi_pw_aff_coalesce.restype = c_void_p
2140 isl.isl_multi_pw_aff_coalesce.argtypes = [c_void_p]
2141 isl.isl_multi_pw_aff_domain.restype = c_void_p
2142 isl.isl_multi_pw_aff_domain.argtypes = [c_void_p]
2143 isl.isl_multi_pw_aff_domain_reverse.restype = c_void_p
2144 isl.isl_multi_pw_aff_domain_reverse.argtypes = [c_void_p]
2145 isl.isl_multi_pw_aff_flat_range_product.restype = c_void_p
2146 isl.isl_multi_pw_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
2147 isl.isl_multi_pw_aff_gist.restype = c_void_p
2148 isl.isl_multi_pw_aff_gist.argtypes = [c_void_p, c_void_p]
2149 isl.isl_multi_pw_aff_gist_params.restype = c_void_p
2150 isl.isl_multi_pw_aff_gist_params.argtypes = [c_void_p, c_void_p]
2151 isl.isl_multi_pw_aff_has_range_tuple_id.argtypes = [c_void_p]
2152 isl.isl_multi_pw_aff_identity_multi_pw_aff.restype = c_void_p
2153 isl.isl_multi_pw_aff_identity_multi_pw_aff.argtypes = [c_void_p]
2154 isl.isl_multi_pw_aff_identity_on_domain_space.restype = c_void_p
2155 isl.isl_multi_pw_aff_identity_on_domain_space.argtypes = [c_void_p]
2156 isl.isl_multi_pw_aff_insert_domain.restype = c_void_p
2157 isl.isl_multi_pw_aff_insert_domain.argtypes = [c_void_p, c_void_p]
2158 isl.isl_multi_pw_aff_intersect_domain.restype = c_void_p
2159 isl.isl_multi_pw_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
2160 isl.isl_multi_pw_aff_intersect_params.restype = c_void_p
2161 isl.isl_multi_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
2162 isl.isl_multi_pw_aff_involves_nan.argtypes = [c_void_p]
2163 isl.isl_multi_pw_aff_involves_param_id.argtypes = [c_void_p, c_void_p]
2164 isl.isl_multi_pw_aff_involves_param_id_list.argtypes = [c_void_p, c_void_p]
2165 isl.isl_multi_pw_aff_isa_multi_aff.argtypes = [c_void_p]
2166 isl.isl_multi_pw_aff_get_list.restype = c_void_p
2167 isl.isl_multi_pw_aff_get_list.argtypes = [c_void_p]
2168 isl.isl_multi_pw_aff_max.restype = c_void_p
2169 isl.isl_multi_pw_aff_max.argtypes = [c_void_p, c_void_p]
2170 isl.isl_multi_pw_aff_max_multi_val.restype = c_void_p
2171 isl.isl_multi_pw_aff_max_multi_val.argtypes = [c_void_p]
2172 isl.isl_multi_pw_aff_min.restype = c_void_p
2173 isl.isl_multi_pw_aff_min.argtypes = [c_void_p, c_void_p]
2174 isl.isl_multi_pw_aff_min_multi_val.restype = c_void_p
2175 isl.isl_multi_pw_aff_min_multi_val.argtypes = [c_void_p]
2176 isl.isl_multi_pw_aff_neg.restype = c_void_p
2177 isl.isl_multi_pw_aff_neg.argtypes = [c_void_p]
2178 isl.isl_multi_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
2179 isl.isl_multi_pw_aff_product.restype = c_void_p
2180 isl.isl_multi_pw_aff_product.argtypes = [c_void_p, c_void_p]
2181 isl.isl_multi_pw_aff_pullback_multi_aff.restype = c_void_p
2182 isl.isl_multi_pw_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
2183 isl.isl_multi_pw_aff_pullback_multi_pw_aff.restype = c_void_p
2184 isl.isl_multi_pw_aff_pullback_multi_pw_aff.argtypes = [c_void_p, c_void_p]
2185 isl.isl_multi_pw_aff_pullback_pw_multi_aff.restype = c_void_p
2186 isl.isl_multi_pw_aff_pullback_pw_multi_aff.argtypes = [c_void_p, c_void_p]
2187 isl.isl_multi_pw_aff_range_product.restype = c_void_p
2188 isl.isl_multi_pw_aff_range_product.argtypes = [c_void_p, c_void_p]
2189 isl.isl_multi_pw_aff_get_range_tuple_id.restype = c_void_p
2190 isl.isl_multi_pw_aff_get_range_tuple_id.argtypes = [c_void_p]
2191 isl.isl_multi_pw_aff_reset_range_tuple_id.restype = c_void_p
2192 isl.isl_multi_pw_aff_reset_range_tuple_id.argtypes = [c_void_p]
2193 isl.isl_multi_pw_aff_scale_multi_val.restype = c_void_p
2194 isl.isl_multi_pw_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
2195 isl.isl_multi_pw_aff_scale_val.restype = c_void_p
2196 isl.isl_multi_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
2197 isl.isl_multi_pw_aff_scale_down_multi_val.restype = c_void_p
2198 isl.isl_multi_pw_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
2199 isl.isl_multi_pw_aff_scale_down_val.restype = c_void_p
2200 isl.isl_multi_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
2201 isl.isl_multi_pw_aff_set_at.restype = c_void_p
2202 isl.isl_multi_pw_aff_set_at.argtypes = [c_void_p, c_int, c_void_p]
2203 isl.isl_multi_pw_aff_set_range_tuple_id.restype = c_void_p
2204 isl.isl_multi_pw_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
2205 isl.isl_multi_pw_aff_size.argtypes = [c_void_p]
2206 isl.isl_multi_pw_aff_get_space.restype = c_void_p
2207 isl.isl_multi_pw_aff_get_space.argtypes = [c_void_p]
2208 isl.isl_multi_pw_aff_sub.restype = c_void_p
2209 isl.isl_multi_pw_aff_sub.argtypes = [c_void_p, c_void_p]
2210 isl.isl_multi_pw_aff_unbind_params_insert_domain.restype = c_void_p
2211 isl.isl_multi_pw_aff_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
2212 isl.isl_multi_pw_aff_union_add.restype = c_void_p
2213 isl.isl_multi_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
2214 isl.isl_multi_pw_aff_zero.restype = c_void_p
2215 isl.isl_multi_pw_aff_zero.argtypes = [c_void_p]
2216 isl.isl_multi_pw_aff_copy.restype = c_void_p
2217 isl.isl_multi_pw_aff_copy.argtypes = [c_void_p]
2218 isl.isl_multi_pw_aff_free.restype = c_void_p
2219 isl.isl_multi_pw_aff_free.argtypes = [c_void_p]
2220 isl.isl_multi_pw_aff_to_str.restype = POINTER(c_char)
2221 isl.isl_multi_pw_aff_to_str.argtypes = [c_void_p]
2223 class pw_multi_aff(union_pw_multi_aff, multi_pw_aff):
2224 def __init__(self, *args, **keywords):
2225 if "ptr" in keywords:
2226 self.ctx = keywords["ctx"]
2227 self.ptr = keywords["ptr"]
2229 if len(args) == 1 and args[0].__class__ is multi_aff:
2230 self.ctx = Context.getDefaultInstance()
2231 self.ptr = isl.isl_pw_multi_aff_from_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
2233 if len(args) == 1 and args[0].__class__ is pw_aff:
2234 self.ctx = Context.getDefaultInstance()
2235 self.ptr = isl.isl_pw_multi_aff_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
2237 if len(args) == 1 and type(args[0]) == str:
2238 self.ctx = Context.getDefaultInstance()
2239 self.ptr = isl.isl_pw_multi_aff_read_from_str(self.ctx, args[0].encode('ascii'))
2243 if hasattr(self, 'ptr'):
2244 isl.isl_pw_multi_aff_free(self.ptr)
2247 if not arg0.__class__ is pw_multi_aff:
2248 arg0 = pw_multi_aff(arg0)
2251 ptr = isl.isl_pw_multi_aff_to_str(arg0.ptr)
2252 res = cast(ptr, c_char_p).value.decode('ascii')
2258 return 'isl.pw_multi_aff("""%s""")' % s
2260 return 'isl.pw_multi_aff("%s")' % s
2261 def add(arg0, arg1):
2263 if not arg0.__class__ is pw_multi_aff:
2264 arg0 = pw_multi_aff(arg0)
2268 if not arg1.__class__ is pw_multi_aff:
2269 arg1 = pw_multi_aff(arg1)
2271 return union_pw_multi_aff(arg0).add(arg1)
2273 res = isl.isl_pw_multi_aff_add(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2274 obj = pw_multi_aff(ctx=ctx, ptr=res)
2276 def add_constant(*args):
2277 if len(args) == 2 and args[1].__class__ is multi_val:
2280 if not args[0].__class__ is pw_multi_aff:
2281 args[0] = pw_multi_aff(args[0])
2285 res = isl.isl_pw_multi_aff_add_constant_multi_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
2286 obj = pw_multi_aff(ctx=ctx, ptr=res)
2288 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
2291 if not args[0].__class__ is pw_multi_aff:
2292 args[0] = pw_multi_aff(args[0])
2296 if not args[1].__class__ is val:
2297 args[1] = val(args[1])
2301 res = isl.isl_pw_multi_aff_add_constant_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
2302 obj = pw_multi_aff(ctx=ctx, ptr=res)
2307 if not arg0.__class__ is pw_multi_aff:
2308 arg0 = pw_multi_aff(arg0)
2312 res = isl.isl_pw_multi_aff_as_map(isl.isl_pw_multi_aff_copy(arg0.ptr))
2313 obj = map(ctx=ctx, ptr=res)
2315 def as_multi_aff(arg0):
2317 if not arg0.__class__ is pw_multi_aff:
2318 arg0 = pw_multi_aff(arg0)
2322 res = isl.isl_pw_multi_aff_as_multi_aff(isl.isl_pw_multi_aff_copy(arg0.ptr))
2323 obj = multi_aff(ctx=ctx, ptr=res)
2327 if not arg0.__class__ is pw_multi_aff:
2328 arg0 = pw_multi_aff(arg0)
2332 res = isl.isl_pw_multi_aff_as_set(isl.isl_pw_multi_aff_copy(arg0.ptr))
2333 obj = set(ctx=ctx, ptr=res)
2337 if not arg0.__class__ is pw_multi_aff:
2338 arg0 = pw_multi_aff(arg0)
2342 res = isl.isl_pw_multi_aff_get_at(arg0.ptr, arg1)
2343 obj = pw_aff(ctx=ctx, ptr=res)
2345 def get_at(arg0, arg1):
2346 return arg0.at(arg1)
2347 def bind_domain(arg0, arg1):
2349 if not arg0.__class__ is pw_multi_aff:
2350 arg0 = pw_multi_aff(arg0)
2354 if not arg1.__class__ is multi_id:
2355 arg1 = multi_id(arg1)
2357 return union_pw_multi_aff(arg0).bind_domain(arg1)
2359 res = isl.isl_pw_multi_aff_bind_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
2360 obj = pw_multi_aff(ctx=ctx, ptr=res)
2362 def bind_domain_wrapped_domain(arg0, arg1):
2364 if not arg0.__class__ is pw_multi_aff:
2365 arg0 = pw_multi_aff(arg0)
2369 if not arg1.__class__ is multi_id:
2370 arg1 = multi_id(arg1)
2372 return union_pw_multi_aff(arg0).bind_domain_wrapped_domain(arg1)
2374 res = isl.isl_pw_multi_aff_bind_domain_wrapped_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
2375 obj = pw_multi_aff(ctx=ctx, ptr=res)
2379 if not arg0.__class__ is pw_multi_aff:
2380 arg0 = pw_multi_aff(arg0)
2384 res = isl.isl_pw_multi_aff_coalesce(isl.isl_pw_multi_aff_copy(arg0.ptr))
2385 obj = pw_multi_aff(ctx=ctx, ptr=res)
2389 if not arg0.__class__ is pw_multi_aff:
2390 arg0 = pw_multi_aff(arg0)
2394 res = isl.isl_pw_multi_aff_domain(isl.isl_pw_multi_aff_copy(arg0.ptr))
2395 obj = set(ctx=ctx, ptr=res)
2398 def domain_map(arg0):
2400 if not arg0.__class__ is space:
2405 res = isl.isl_pw_multi_aff_domain_map(isl.isl_space_copy(arg0.ptr))
2406 obj = pw_multi_aff(ctx=ctx, ptr=res)
2408 def domain_reverse(arg0):
2410 if not arg0.__class__ is pw_multi_aff:
2411 arg0 = pw_multi_aff(arg0)
2415 res = isl.isl_pw_multi_aff_domain_reverse(isl.isl_pw_multi_aff_copy(arg0.ptr))
2416 obj = pw_multi_aff(ctx=ctx, ptr=res)
2418 def drop_unused_params(arg0):
2420 if not arg0.__class__ is pw_multi_aff:
2421 arg0 = pw_multi_aff(arg0)
2425 res = isl.isl_pw_multi_aff_drop_unused_params(isl.isl_pw_multi_aff_copy(arg0.ptr))
2426 obj = pw_multi_aff(ctx=ctx, ptr=res)
2428 def flat_range_product(arg0, arg1):
2430 if not arg0.__class__ is pw_multi_aff:
2431 arg0 = pw_multi_aff(arg0)
2435 if not arg1.__class__ is pw_multi_aff:
2436 arg1 = pw_multi_aff(arg1)
2438 return union_pw_multi_aff(arg0).flat_range_product(arg1)
2440 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))
2441 obj = pw_multi_aff(ctx=ctx, ptr=res)
2443 def foreach_piece(arg0, arg1):
2445 if not arg0.__class__ is pw_multi_aff:
2446 arg0 = pw_multi_aff(arg0)
2450 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
2451 def cb_func(cb_arg0, cb_arg1, cb_arg2):
2452 cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
2453 cb_arg1 = multi_aff(ctx=arg0.ctx, ptr=(cb_arg1))
2455 arg1(cb_arg0, cb_arg1)
2456 except BaseException as e:
2462 res = isl.isl_pw_multi_aff_foreach_piece(arg0.ptr, cb1, None)
2463 if exc_info[0] is not None:
2467 def gist(arg0, arg1):
2469 if not arg0.__class__ is pw_multi_aff:
2470 arg0 = pw_multi_aff(arg0)
2474 if not arg1.__class__ is set:
2477 return union_pw_multi_aff(arg0).gist(arg1)
2479 res = isl.isl_pw_multi_aff_gist(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2480 obj = pw_multi_aff(ctx=ctx, ptr=res)
2482 def gist_params(arg0, arg1):
2484 if not arg0.__class__ is pw_multi_aff:
2485 arg0 = pw_multi_aff(arg0)
2489 if not arg1.__class__ is set:
2492 return union_pw_multi_aff(arg0).gist_params(arg1)
2494 res = isl.isl_pw_multi_aff_gist_params(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2495 obj = pw_multi_aff(ctx=ctx, ptr=res)
2497 def has_range_tuple_id(arg0):
2499 if not arg0.__class__ is pw_multi_aff:
2500 arg0 = pw_multi_aff(arg0)
2504 res = isl.isl_pw_multi_aff_has_range_tuple_id(arg0.ptr)
2509 def identity_on_domain(*args):
2510 if len(args) == 1 and args[0].__class__ is space:
2512 res = isl.isl_pw_multi_aff_identity_on_domain_space(isl.isl_space_copy(args[0].ptr))
2513 obj = pw_multi_aff(ctx=ctx, ptr=res)
2516 def insert_domain(arg0, arg1):
2518 if not arg0.__class__ is pw_multi_aff:
2519 arg0 = pw_multi_aff(arg0)
2523 if not arg1.__class__ is space:
2526 return union_pw_multi_aff(arg0).insert_domain(arg1)
2528 res = isl.isl_pw_multi_aff_insert_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
2529 obj = pw_multi_aff(ctx=ctx, ptr=res)
2531 def intersect_domain(arg0, arg1):
2533 if not arg0.__class__ is pw_multi_aff:
2534 arg0 = pw_multi_aff(arg0)
2538 if not arg1.__class__ is set:
2541 return union_pw_multi_aff(arg0).intersect_domain(arg1)
2543 res = isl.isl_pw_multi_aff_intersect_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2544 obj = pw_multi_aff(ctx=ctx, ptr=res)
2546 def intersect_params(arg0, arg1):
2548 if not arg0.__class__ is pw_multi_aff:
2549 arg0 = pw_multi_aff(arg0)
2553 if not arg1.__class__ is set:
2556 return union_pw_multi_aff(arg0).intersect_params(arg1)
2558 res = isl.isl_pw_multi_aff_intersect_params(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2559 obj = pw_multi_aff(ctx=ctx, ptr=res)
2561 def involves_locals(arg0):
2563 if not arg0.__class__ is pw_multi_aff:
2564 arg0 = pw_multi_aff(arg0)
2568 res = isl.isl_pw_multi_aff_involves_locals(arg0.ptr)
2572 def isa_multi_aff(arg0):
2574 if not arg0.__class__ is pw_multi_aff:
2575 arg0 = pw_multi_aff(arg0)
2579 res = isl.isl_pw_multi_aff_isa_multi_aff(arg0.ptr)
2583 def max_multi_val(arg0):
2585 if not arg0.__class__ is pw_multi_aff:
2586 arg0 = pw_multi_aff(arg0)
2590 res = isl.isl_pw_multi_aff_max_multi_val(isl.isl_pw_multi_aff_copy(arg0.ptr))
2591 obj = multi_val(ctx=ctx, ptr=res)
2593 def min_multi_val(arg0):
2595 if not arg0.__class__ is pw_multi_aff:
2596 arg0 = pw_multi_aff(arg0)
2600 res = isl.isl_pw_multi_aff_min_multi_val(isl.isl_pw_multi_aff_copy(arg0.ptr))
2601 obj = multi_val(ctx=ctx, ptr=res)
2604 def multi_val_on_domain(arg0, arg1):
2606 if not arg0.__class__ is set:
2611 if not arg1.__class__ is multi_val:
2612 arg1 = multi_val(arg1)
2614 return union_pw_multi_aff(arg0).multi_val_on_domain(arg1)
2616 res = isl.isl_pw_multi_aff_multi_val_on_domain(isl.isl_set_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
2617 obj = pw_multi_aff(ctx=ctx, ptr=res)
2621 if not arg0.__class__ is pw_multi_aff:
2622 arg0 = pw_multi_aff(arg0)
2626 res = isl.isl_pw_multi_aff_n_piece(arg0.ptr)
2630 def plain_is_equal(arg0, arg1):
2632 if not arg0.__class__ is pw_multi_aff:
2633 arg0 = pw_multi_aff(arg0)
2637 if not arg1.__class__ is pw_multi_aff:
2638 arg1 = pw_multi_aff(arg1)
2640 return union_pw_multi_aff(arg0).plain_is_equal(arg1)
2642 res = isl.isl_pw_multi_aff_plain_is_equal(arg0.ptr, arg1.ptr)
2646 def preimage_domain_wrapped_domain(*args):
2647 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
2650 if not args[0].__class__ is pw_multi_aff:
2651 args[0] = pw_multi_aff(args[0])
2655 res = isl.isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
2656 obj = pw_multi_aff(ctx=ctx, ptr=res)
2659 def product(arg0, arg1):
2661 if not arg0.__class__ is pw_multi_aff:
2662 arg0 = pw_multi_aff(arg0)
2666 if not arg1.__class__ is pw_multi_aff:
2667 arg1 = pw_multi_aff(arg1)
2669 return union_pw_multi_aff(arg0).product(arg1)
2671 res = isl.isl_pw_multi_aff_product(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2672 obj = pw_multi_aff(ctx=ctx, ptr=res)
2674 def pullback(*args):
2675 if len(args) == 2 and args[1].__class__ is multi_aff:
2678 if not args[0].__class__ is pw_multi_aff:
2679 args[0] = pw_multi_aff(args[0])
2683 res = isl.isl_pw_multi_aff_pullback_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
2684 obj = pw_multi_aff(ctx=ctx, ptr=res)
2686 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
2689 if not args[0].__class__ is pw_multi_aff:
2690 args[0] = pw_multi_aff(args[0])
2694 res = isl.isl_pw_multi_aff_pullback_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
2695 obj = pw_multi_aff(ctx=ctx, ptr=res)
2698 def range_factor_domain(arg0):
2700 if not arg0.__class__ is pw_multi_aff:
2701 arg0 = pw_multi_aff(arg0)
2705 res = isl.isl_pw_multi_aff_range_factor_domain(isl.isl_pw_multi_aff_copy(arg0.ptr))
2706 obj = pw_multi_aff(ctx=ctx, ptr=res)
2708 def range_factor_range(arg0):
2710 if not arg0.__class__ is pw_multi_aff:
2711 arg0 = pw_multi_aff(arg0)
2715 res = isl.isl_pw_multi_aff_range_factor_range(isl.isl_pw_multi_aff_copy(arg0.ptr))
2716 obj = pw_multi_aff(ctx=ctx, ptr=res)
2719 def range_map(arg0):
2721 if not arg0.__class__ is space:
2726 res = isl.isl_pw_multi_aff_range_map(isl.isl_space_copy(arg0.ptr))
2727 obj = pw_multi_aff(ctx=ctx, ptr=res)
2729 def range_product(arg0, arg1):
2731 if not arg0.__class__ is pw_multi_aff:
2732 arg0 = pw_multi_aff(arg0)
2736 if not arg1.__class__ is pw_multi_aff:
2737 arg1 = pw_multi_aff(arg1)
2739 return union_pw_multi_aff(arg0).range_product(arg1)
2741 res = isl.isl_pw_multi_aff_range_product(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2742 obj = pw_multi_aff(ctx=ctx, ptr=res)
2744 def range_tuple_id(arg0):
2746 if not arg0.__class__ is pw_multi_aff:
2747 arg0 = pw_multi_aff(arg0)
2751 res = isl.isl_pw_multi_aff_get_range_tuple_id(arg0.ptr)
2752 obj = id(ctx=ctx, ptr=res)
2754 def get_range_tuple_id(arg0):
2755 return arg0.range_tuple_id()
2757 if len(args) == 2 and args[1].__class__ is multi_val:
2760 if not args[0].__class__ is pw_multi_aff:
2761 args[0] = pw_multi_aff(args[0])
2765 res = isl.isl_pw_multi_aff_scale_multi_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
2766 obj = pw_multi_aff(ctx=ctx, ptr=res)
2768 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
2771 if not args[0].__class__ is pw_multi_aff:
2772 args[0] = pw_multi_aff(args[0])
2776 if not args[1].__class__ is val:
2777 args[1] = val(args[1])
2781 res = isl.isl_pw_multi_aff_scale_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
2782 obj = pw_multi_aff(ctx=ctx, ptr=res)
2785 def scale_down(*args):
2786 if len(args) == 2 and args[1].__class__ is multi_val:
2789 if not args[0].__class__ is pw_multi_aff:
2790 args[0] = pw_multi_aff(args[0])
2794 res = isl.isl_pw_multi_aff_scale_down_multi_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
2795 obj = pw_multi_aff(ctx=ctx, ptr=res)
2797 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
2800 if not args[0].__class__ is pw_multi_aff:
2801 args[0] = pw_multi_aff(args[0])
2805 if not args[1].__class__ is val:
2806 args[1] = val(args[1])
2810 res = isl.isl_pw_multi_aff_scale_down_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
2811 obj = pw_multi_aff(ctx=ctx, ptr=res)
2814 def set_range_tuple(*args):
2815 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
2818 if not args[0].__class__ is pw_multi_aff:
2819 args[0] = pw_multi_aff(args[0])
2823 if not args[1].__class__ is id:
2824 args[1] = id(args[1])
2828 res = isl.isl_pw_multi_aff_set_range_tuple_id(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
2829 obj = pw_multi_aff(ctx=ctx, ptr=res)
2834 if not arg0.__class__ is pw_multi_aff:
2835 arg0 = pw_multi_aff(arg0)
2839 res = isl.isl_pw_multi_aff_get_space(arg0.ptr)
2840 obj = space(ctx=ctx, ptr=res)
2842 def get_space(arg0):
2844 def sub(arg0, arg1):
2846 if not arg0.__class__ is pw_multi_aff:
2847 arg0 = pw_multi_aff(arg0)
2851 if not arg1.__class__ is pw_multi_aff:
2852 arg1 = pw_multi_aff(arg1)
2854 return union_pw_multi_aff(arg0).sub(arg1)
2856 res = isl.isl_pw_multi_aff_sub(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2857 obj = pw_multi_aff(ctx=ctx, ptr=res)
2859 def subtract_domain(arg0, arg1):
2861 if not arg0.__class__ is pw_multi_aff:
2862 arg0 = pw_multi_aff(arg0)
2866 if not arg1.__class__ is set:
2869 return union_pw_multi_aff(arg0).subtract_domain(arg1)
2871 res = isl.isl_pw_multi_aff_subtract_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2872 obj = pw_multi_aff(ctx=ctx, ptr=res)
2876 if not arg0.__class__ is pw_multi_aff:
2877 arg0 = pw_multi_aff(arg0)
2881 res = isl.isl_pw_multi_aff_to_list(isl.isl_pw_multi_aff_copy(arg0.ptr))
2882 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
2884 def to_multi_pw_aff(arg0):
2886 if not arg0.__class__ is pw_multi_aff:
2887 arg0 = pw_multi_aff(arg0)
2891 res = isl.isl_pw_multi_aff_to_multi_pw_aff(isl.isl_pw_multi_aff_copy(arg0.ptr))
2892 obj = multi_pw_aff(ctx=ctx, ptr=res)
2894 def to_union_pw_multi_aff(arg0):
2896 if not arg0.__class__ is pw_multi_aff:
2897 arg0 = pw_multi_aff(arg0)
2901 res = isl.isl_pw_multi_aff_to_union_pw_multi_aff(isl.isl_pw_multi_aff_copy(arg0.ptr))
2902 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
2904 def union_add(arg0, arg1):
2906 if not arg0.__class__ is pw_multi_aff:
2907 arg0 = pw_multi_aff(arg0)
2911 if not arg1.__class__ is pw_multi_aff:
2912 arg1 = pw_multi_aff(arg1)
2914 return union_pw_multi_aff(arg0).union_add(arg1)
2916 res = isl.isl_pw_multi_aff_union_add(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2917 obj = pw_multi_aff(ctx=ctx, ptr=res)
2922 if not arg0.__class__ is space:
2927 res = isl.isl_pw_multi_aff_zero(isl.isl_space_copy(arg0.ptr))
2928 obj = pw_multi_aff(ctx=ctx, ptr=res)
2931 isl.isl_pw_multi_aff_from_multi_aff.restype = c_void_p
2932 isl.isl_pw_multi_aff_from_multi_aff.argtypes = [c_void_p]
2933 isl.isl_pw_multi_aff_from_pw_aff.restype = c_void_p
2934 isl.isl_pw_multi_aff_from_pw_aff.argtypes = [c_void_p]
2935 isl.isl_pw_multi_aff_read_from_str.restype = c_void_p
2936 isl.isl_pw_multi_aff_read_from_str.argtypes = [Context, c_char_p]
2937 isl.isl_pw_multi_aff_add.restype = c_void_p
2938 isl.isl_pw_multi_aff_add.argtypes = [c_void_p, c_void_p]
2939 isl.isl_pw_multi_aff_add_constant_multi_val.restype = c_void_p
2940 isl.isl_pw_multi_aff_add_constant_multi_val.argtypes = [c_void_p, c_void_p]
2941 isl.isl_pw_multi_aff_add_constant_val.restype = c_void_p
2942 isl.isl_pw_multi_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
2943 isl.isl_pw_multi_aff_as_map.restype = c_void_p
2944 isl.isl_pw_multi_aff_as_map.argtypes = [c_void_p]
2945 isl.isl_pw_multi_aff_as_multi_aff.restype = c_void_p
2946 isl.isl_pw_multi_aff_as_multi_aff.argtypes = [c_void_p]
2947 isl.isl_pw_multi_aff_as_set.restype = c_void_p
2948 isl.isl_pw_multi_aff_as_set.argtypes = [c_void_p]
2949 isl.isl_pw_multi_aff_get_at.restype = c_void_p
2950 isl.isl_pw_multi_aff_get_at.argtypes = [c_void_p, c_int]
2951 isl.isl_pw_multi_aff_bind_domain.restype = c_void_p
2952 isl.isl_pw_multi_aff_bind_domain.argtypes = [c_void_p, c_void_p]
2953 isl.isl_pw_multi_aff_bind_domain_wrapped_domain.restype = c_void_p
2954 isl.isl_pw_multi_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
2955 isl.isl_pw_multi_aff_coalesce.restype = c_void_p
2956 isl.isl_pw_multi_aff_coalesce.argtypes = [c_void_p]
2957 isl.isl_pw_multi_aff_domain.restype = c_void_p
2958 isl.isl_pw_multi_aff_domain.argtypes = [c_void_p]
2959 isl.isl_pw_multi_aff_domain_map.restype = c_void_p
2960 isl.isl_pw_multi_aff_domain_map.argtypes = [c_void_p]
2961 isl.isl_pw_multi_aff_domain_reverse.restype = c_void_p
2962 isl.isl_pw_multi_aff_domain_reverse.argtypes = [c_void_p]
2963 isl.isl_pw_multi_aff_drop_unused_params.restype = c_void_p
2964 isl.isl_pw_multi_aff_drop_unused_params.argtypes = [c_void_p]
2965 isl.isl_pw_multi_aff_flat_range_product.restype = c_void_p
2966 isl.isl_pw_multi_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
2967 isl.isl_pw_multi_aff_foreach_piece.argtypes = [c_void_p, c_void_p, c_void_p]
2968 isl.isl_pw_multi_aff_gist.restype = c_void_p
2969 isl.isl_pw_multi_aff_gist.argtypes = [c_void_p, c_void_p]
2970 isl.isl_pw_multi_aff_gist_params.restype = c_void_p
2971 isl.isl_pw_multi_aff_gist_params.argtypes = [c_void_p, c_void_p]
2972 isl.isl_pw_multi_aff_has_range_tuple_id.argtypes = [c_void_p]
2973 isl.isl_pw_multi_aff_identity_on_domain_space.restype = c_void_p
2974 isl.isl_pw_multi_aff_identity_on_domain_space.argtypes = [c_void_p]
2975 isl.isl_pw_multi_aff_insert_domain.restype = c_void_p
2976 isl.isl_pw_multi_aff_insert_domain.argtypes = [c_void_p, c_void_p]
2977 isl.isl_pw_multi_aff_intersect_domain.restype = c_void_p
2978 isl.isl_pw_multi_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
2979 isl.isl_pw_multi_aff_intersect_params.restype = c_void_p
2980 isl.isl_pw_multi_aff_intersect_params.argtypes = [c_void_p, c_void_p]
2981 isl.isl_pw_multi_aff_involves_locals.argtypes = [c_void_p]
2982 isl.isl_pw_multi_aff_isa_multi_aff.argtypes = [c_void_p]
2983 isl.isl_pw_multi_aff_max_multi_val.restype = c_void_p
2984 isl.isl_pw_multi_aff_max_multi_val.argtypes = [c_void_p]
2985 isl.isl_pw_multi_aff_min_multi_val.restype = c_void_p
2986 isl.isl_pw_multi_aff_min_multi_val.argtypes = [c_void_p]
2987 isl.isl_pw_multi_aff_multi_val_on_domain.restype = c_void_p
2988 isl.isl_pw_multi_aff_multi_val_on_domain.argtypes = [c_void_p, c_void_p]
2989 isl.isl_pw_multi_aff_n_piece.argtypes = [c_void_p]
2990 isl.isl_pw_multi_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
2991 isl.isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff.restype = c_void_p
2992 isl.isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff.argtypes = [c_void_p, c_void_p]
2993 isl.isl_pw_multi_aff_product.restype = c_void_p
2994 isl.isl_pw_multi_aff_product.argtypes = [c_void_p, c_void_p]
2995 isl.isl_pw_multi_aff_pullback_multi_aff.restype = c_void_p
2996 isl.isl_pw_multi_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
2997 isl.isl_pw_multi_aff_pullback_pw_multi_aff.restype = c_void_p
2998 isl.isl_pw_multi_aff_pullback_pw_multi_aff.argtypes = [c_void_p, c_void_p]
2999 isl.isl_pw_multi_aff_range_factor_domain.restype = c_void_p
3000 isl.isl_pw_multi_aff_range_factor_domain.argtypes = [c_void_p]
3001 isl.isl_pw_multi_aff_range_factor_range.restype = c_void_p
3002 isl.isl_pw_multi_aff_range_factor_range.argtypes = [c_void_p]
3003 isl.isl_pw_multi_aff_range_map.restype = c_void_p
3004 isl.isl_pw_multi_aff_range_map.argtypes = [c_void_p]
3005 isl.isl_pw_multi_aff_range_product.restype = c_void_p
3006 isl.isl_pw_multi_aff_range_product.argtypes = [c_void_p, c_void_p]
3007 isl.isl_pw_multi_aff_get_range_tuple_id.restype = c_void_p
3008 isl.isl_pw_multi_aff_get_range_tuple_id.argtypes = [c_void_p]
3009 isl.isl_pw_multi_aff_scale_multi_val.restype = c_void_p
3010 isl.isl_pw_multi_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
3011 isl.isl_pw_multi_aff_scale_val.restype = c_void_p
3012 isl.isl_pw_multi_aff_scale_val.argtypes = [c_void_p, c_void_p]
3013 isl.isl_pw_multi_aff_scale_down_multi_val.restype = c_void_p
3014 isl.isl_pw_multi_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
3015 isl.isl_pw_multi_aff_scale_down_val.restype = c_void_p
3016 isl.isl_pw_multi_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
3017 isl.isl_pw_multi_aff_set_range_tuple_id.restype = c_void_p
3018 isl.isl_pw_multi_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
3019 isl.isl_pw_multi_aff_get_space.restype = c_void_p
3020 isl.isl_pw_multi_aff_get_space.argtypes = [c_void_p]
3021 isl.isl_pw_multi_aff_sub.restype = c_void_p
3022 isl.isl_pw_multi_aff_sub.argtypes = [c_void_p, c_void_p]
3023 isl.isl_pw_multi_aff_subtract_domain.restype = c_void_p
3024 isl.isl_pw_multi_aff_subtract_domain.argtypes = [c_void_p, c_void_p]
3025 isl.isl_pw_multi_aff_to_list.restype = c_void_p
3026 isl.isl_pw_multi_aff_to_list.argtypes = [c_void_p]
3027 isl.isl_pw_multi_aff_to_multi_pw_aff.restype = c_void_p
3028 isl.isl_pw_multi_aff_to_multi_pw_aff.argtypes = [c_void_p]
3029 isl.isl_pw_multi_aff_to_union_pw_multi_aff.restype = c_void_p
3030 isl.isl_pw_multi_aff_to_union_pw_multi_aff.argtypes = [c_void_p]
3031 isl.isl_pw_multi_aff_union_add.restype = c_void_p
3032 isl.isl_pw_multi_aff_union_add.argtypes = [c_void_p, c_void_p]
3033 isl.isl_pw_multi_aff_zero.restype = c_void_p
3034 isl.isl_pw_multi_aff_zero.argtypes = [c_void_p]
3035 isl.isl_pw_multi_aff_copy.restype = c_void_p
3036 isl.isl_pw_multi_aff_copy.argtypes = [c_void_p]
3037 isl.isl_pw_multi_aff_free.restype = c_void_p
3038 isl.isl_pw_multi_aff_free.argtypes = [c_void_p]
3039 isl.isl_pw_multi_aff_to_str.restype = POINTER(c_char)
3040 isl.isl_pw_multi_aff_to_str.argtypes = [c_void_p]
3042 class pw_aff(union_pw_aff, pw_multi_aff, multi_pw_aff):
3043 def __init__(self, *args, **keywords):
3044 if "ptr" in keywords:
3045 self.ctx = keywords["ctx"]
3046 self.ptr = keywords["ptr"]
3048 if len(args) == 1 and args[0].__class__ is aff:
3049 self.ctx = Context.getDefaultInstance()
3050 self.ptr = isl.isl_pw_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
3052 if len(args) == 1 and type(args[0]) == str:
3053 self.ctx = Context.getDefaultInstance()
3054 self.ptr = isl.isl_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
3058 if hasattr(self, 'ptr'):
3059 isl.isl_pw_aff_free(self.ptr)
3062 if not arg0.__class__ is pw_aff:
3066 ptr = isl.isl_pw_aff_to_str(arg0.ptr)
3067 res = cast(ptr, c_char_p).value.decode('ascii')
3073 return 'isl.pw_aff("""%s""")' % s
3075 return 'isl.pw_aff("%s")' % s
3076 def add(arg0, arg1):
3078 if not arg0.__class__ is pw_aff:
3083 if not arg1.__class__ is pw_aff:
3086 return union_pw_aff(arg0).add(arg1)
3088 res = isl.isl_pw_aff_add(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3089 obj = pw_aff(ctx=ctx, ptr=res)
3091 def add_constant(*args):
3092 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3095 if not args[0].__class__ is pw_aff:
3096 args[0] = pw_aff(args[0])
3100 if not args[1].__class__ is val:
3101 args[1] = val(args[1])
3105 res = isl.isl_pw_aff_add_constant_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3106 obj = pw_aff(ctx=ctx, ptr=res)
3111 if not arg0.__class__ is pw_aff:
3116 res = isl.isl_pw_aff_as_aff(isl.isl_pw_aff_copy(arg0.ptr))
3117 obj = aff(ctx=ctx, ptr=res)
3121 if not arg0.__class__ is pw_aff:
3126 res = isl.isl_pw_aff_as_map(isl.isl_pw_aff_copy(arg0.ptr))
3127 obj = map(ctx=ctx, ptr=res)
3130 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
3133 if not args[0].__class__ is pw_aff:
3134 args[0] = pw_aff(args[0])
3138 if not args[1].__class__ is id:
3139 args[1] = id(args[1])
3143 res = isl.isl_pw_aff_bind_id(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
3144 obj = set(ctx=ctx, ptr=res)
3147 def bind_domain(arg0, arg1):
3149 if not arg0.__class__ is pw_aff:
3154 if not arg1.__class__ is multi_id:
3155 arg1 = multi_id(arg1)
3157 return union_pw_aff(arg0).bind_domain(arg1)
3159 res = isl.isl_pw_aff_bind_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
3160 obj = pw_aff(ctx=ctx, ptr=res)
3162 def bind_domain_wrapped_domain(arg0, arg1):
3164 if not arg0.__class__ is pw_aff:
3169 if not arg1.__class__ is multi_id:
3170 arg1 = multi_id(arg1)
3172 return union_pw_aff(arg0).bind_domain_wrapped_domain(arg1)
3174 res = isl.isl_pw_aff_bind_domain_wrapped_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
3175 obj = pw_aff(ctx=ctx, ptr=res)
3179 if not arg0.__class__ is pw_aff:
3184 res = isl.isl_pw_aff_ceil(isl.isl_pw_aff_copy(arg0.ptr))
3185 obj = pw_aff(ctx=ctx, ptr=res)
3189 if not arg0.__class__ is pw_aff:
3194 res = isl.isl_pw_aff_coalesce(isl.isl_pw_aff_copy(arg0.ptr))
3195 obj = pw_aff(ctx=ctx, ptr=res)
3197 def cond(arg0, arg1, arg2):
3199 if not arg0.__class__ is pw_aff:
3204 if not arg1.__class__ is pw_aff:
3207 return union_pw_aff(arg0).cond(arg1, arg2)
3209 if not arg2.__class__ is pw_aff:
3212 return union_pw_aff(arg0).cond(arg1, arg2)
3214 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))
3215 obj = pw_aff(ctx=ctx, ptr=res)
3217 def div(arg0, arg1):
3219 if not arg0.__class__ is pw_aff:
3224 if not arg1.__class__ is pw_aff:
3227 return union_pw_aff(arg0).div(arg1)
3229 res = isl.isl_pw_aff_div(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3230 obj = pw_aff(ctx=ctx, ptr=res)
3234 if not arg0.__class__ is pw_aff:
3239 res = isl.isl_pw_aff_domain(isl.isl_pw_aff_copy(arg0.ptr))
3240 obj = set(ctx=ctx, ptr=res)
3242 def domain_reverse(arg0):
3244 if not arg0.__class__ is pw_aff:
3249 res = isl.isl_pw_aff_domain_reverse(isl.isl_pw_aff_copy(arg0.ptr))
3250 obj = pw_aff(ctx=ctx, ptr=res)
3252 def drop_unused_params(arg0):
3254 if not arg0.__class__ is pw_aff:
3259 res = isl.isl_pw_aff_drop_unused_params(isl.isl_pw_aff_copy(arg0.ptr))
3260 obj = pw_aff(ctx=ctx, ptr=res)
3262 def eq_set(arg0, arg1):
3264 if not arg0.__class__ is pw_aff:
3269 if not arg1.__class__ is pw_aff:
3272 return union_pw_aff(arg0).eq_set(arg1)
3274 res = isl.isl_pw_aff_eq_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3275 obj = set(ctx=ctx, ptr=res)
3277 def eval(arg0, arg1):
3279 if not arg0.__class__ is pw_aff:
3284 if not arg1.__class__ is point:
3287 return union_pw_aff(arg0).eval(arg1)
3289 res = isl.isl_pw_aff_eval(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_point_copy(arg1.ptr))
3290 obj = val(ctx=ctx, ptr=res)
3294 if not arg0.__class__ is pw_aff:
3299 res = isl.isl_pw_aff_floor(isl.isl_pw_aff_copy(arg0.ptr))
3300 obj = pw_aff(ctx=ctx, ptr=res)
3302 def ge_set(arg0, arg1):
3304 if not arg0.__class__ is pw_aff:
3309 if not arg1.__class__ is pw_aff:
3312 return union_pw_aff(arg0).ge_set(arg1)
3314 res = isl.isl_pw_aff_ge_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3315 obj = set(ctx=ctx, ptr=res)
3317 def gist(arg0, arg1):
3319 if not arg0.__class__ is pw_aff:
3324 if not arg1.__class__ is set:
3327 return union_pw_aff(arg0).gist(arg1)
3329 res = isl.isl_pw_aff_gist(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3330 obj = pw_aff(ctx=ctx, ptr=res)
3332 def gist_params(arg0, arg1):
3334 if not arg0.__class__ is pw_aff:
3339 if not arg1.__class__ is set:
3342 return union_pw_aff(arg0).gist_params(arg1)
3344 res = isl.isl_pw_aff_gist_params(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3345 obj = pw_aff(ctx=ctx, ptr=res)
3347 def gt_set(arg0, arg1):
3349 if not arg0.__class__ is pw_aff:
3354 if not arg1.__class__ is pw_aff:
3357 return union_pw_aff(arg0).gt_set(arg1)
3359 res = isl.isl_pw_aff_gt_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3360 obj = set(ctx=ctx, ptr=res)
3362 def insert_domain(arg0, arg1):
3364 if not arg0.__class__ is pw_aff:
3369 if not arg1.__class__ is space:
3372 return union_pw_aff(arg0).insert_domain(arg1)
3374 res = isl.isl_pw_aff_insert_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
3375 obj = pw_aff(ctx=ctx, ptr=res)
3377 def intersect_domain(arg0, arg1):
3379 if not arg0.__class__ is pw_aff:
3384 if not arg1.__class__ is set:
3387 return union_pw_aff(arg0).intersect_domain(arg1)
3389 res = isl.isl_pw_aff_intersect_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3390 obj = pw_aff(ctx=ctx, ptr=res)
3392 def intersect_params(arg0, arg1):
3394 if not arg0.__class__ is pw_aff:
3399 if not arg1.__class__ is set:
3402 return union_pw_aff(arg0).intersect_params(arg1)
3404 res = isl.isl_pw_aff_intersect_params(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3405 obj = pw_aff(ctx=ctx, ptr=res)
3409 if not arg0.__class__ is pw_aff:
3414 res = isl.isl_pw_aff_isa_aff(arg0.ptr)
3418 def le_set(arg0, arg1):
3420 if not arg0.__class__ is pw_aff:
3425 if not arg1.__class__ is pw_aff:
3428 return union_pw_aff(arg0).le_set(arg1)
3430 res = isl.isl_pw_aff_le_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3431 obj = set(ctx=ctx, ptr=res)
3433 def lt_set(arg0, arg1):
3435 if not arg0.__class__ is pw_aff:
3440 if not arg1.__class__ is pw_aff:
3443 return union_pw_aff(arg0).lt_set(arg1)
3445 res = isl.isl_pw_aff_lt_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3446 obj = set(ctx=ctx, ptr=res)
3448 def max(arg0, arg1):
3450 if not arg0.__class__ is pw_aff:
3455 if not arg1.__class__ is pw_aff:
3458 return union_pw_aff(arg0).max(arg1)
3460 res = isl.isl_pw_aff_max(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3461 obj = pw_aff(ctx=ctx, ptr=res)
3465 if not arg0.__class__ is pw_aff:
3470 res = isl.isl_pw_aff_max_val(isl.isl_pw_aff_copy(arg0.ptr))
3471 obj = val(ctx=ctx, ptr=res)
3473 def min(arg0, arg1):
3475 if not arg0.__class__ is pw_aff:
3480 if not arg1.__class__ is pw_aff:
3483 return union_pw_aff(arg0).min(arg1)
3485 res = isl.isl_pw_aff_min(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3486 obj = pw_aff(ctx=ctx, ptr=res)
3490 if not arg0.__class__ is pw_aff:
3495 res = isl.isl_pw_aff_min_val(isl.isl_pw_aff_copy(arg0.ptr))
3496 obj = val(ctx=ctx, ptr=res)
3499 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3502 if not args[0].__class__ is pw_aff:
3503 args[0] = pw_aff(args[0])
3507 if not args[1].__class__ is val:
3508 args[1] = val(args[1])
3512 res = isl.isl_pw_aff_mod_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3513 obj = pw_aff(ctx=ctx, ptr=res)
3516 def mul(arg0, arg1):
3518 if not arg0.__class__ is pw_aff:
3523 if not arg1.__class__ is pw_aff:
3526 return union_pw_aff(arg0).mul(arg1)
3528 res = isl.isl_pw_aff_mul(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3529 obj = pw_aff(ctx=ctx, ptr=res)
3531 def ne_set(arg0, arg1):
3533 if not arg0.__class__ is pw_aff:
3538 if not arg1.__class__ is pw_aff:
3541 return union_pw_aff(arg0).ne_set(arg1)
3543 res = isl.isl_pw_aff_ne_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3544 obj = set(ctx=ctx, ptr=res)
3548 if not arg0.__class__ is pw_aff:
3553 res = isl.isl_pw_aff_neg(isl.isl_pw_aff_copy(arg0.ptr))
3554 obj = pw_aff(ctx=ctx, ptr=res)
3557 def param_on_domain(*args):
3558 if len(args) == 2 and args[0].__class__ is set and (args[1].__class__ is id or type(args[1]) == str):
3561 if not args[1].__class__ is id:
3562 args[1] = id(args[1])
3566 res = isl.isl_pw_aff_param_on_domain_id(isl.isl_set_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
3567 obj = pw_aff(ctx=ctx, ptr=res)
3572 if not arg0.__class__ is pw_aff:
3577 res = isl.isl_pw_aff_params(isl.isl_pw_aff_copy(arg0.ptr))
3578 obj = set(ctx=ctx, ptr=res)
3580 def plain_is_equal(arg0, arg1):
3582 if not arg0.__class__ is pw_aff:
3587 if not arg1.__class__ is pw_aff:
3590 return union_pw_aff(arg0).plain_is_equal(arg1)
3592 res = isl.isl_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
3596 def pullback(*args):
3597 if len(args) == 2 and args[1].__class__ is multi_aff:
3600 if not args[0].__class__ is pw_aff:
3601 args[0] = pw_aff(args[0])
3605 res = isl.isl_pw_aff_pullback_multi_aff(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
3606 obj = pw_aff(ctx=ctx, ptr=res)
3608 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
3611 if not args[0].__class__ is pw_aff:
3612 args[0] = pw_aff(args[0])
3616 res = isl.isl_pw_aff_pullback_multi_pw_aff(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
3617 obj = pw_aff(ctx=ctx, ptr=res)
3619 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
3622 if not args[0].__class__ is pw_aff:
3623 args[0] = pw_aff(args[0])
3627 res = isl.isl_pw_aff_pullback_pw_multi_aff(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
3628 obj = pw_aff(ctx=ctx, ptr=res)
3632 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3635 if not args[0].__class__ is pw_aff:
3636 args[0] = pw_aff(args[0])
3640 if not args[1].__class__ is val:
3641 args[1] = val(args[1])
3645 res = isl.isl_pw_aff_scale_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3646 obj = pw_aff(ctx=ctx, ptr=res)
3649 def scale_down(*args):
3650 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3653 if not args[0].__class__ is pw_aff:
3654 args[0] = pw_aff(args[0])
3658 if not args[1].__class__ is val:
3659 args[1] = val(args[1])
3663 res = isl.isl_pw_aff_scale_down_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3664 obj = pw_aff(ctx=ctx, ptr=res)
3669 if not arg0.__class__ is pw_aff:
3674 res = isl.isl_pw_aff_get_space(arg0.ptr)
3675 obj = space(ctx=ctx, ptr=res)
3677 def get_space(arg0):
3679 def sub(arg0, arg1):
3681 if not arg0.__class__ is pw_aff:
3686 if not arg1.__class__ is pw_aff:
3689 return union_pw_aff(arg0).sub(arg1)
3691 res = isl.isl_pw_aff_sub(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3692 obj = pw_aff(ctx=ctx, ptr=res)
3694 def subtract_domain(arg0, arg1):
3696 if not arg0.__class__ is pw_aff:
3701 if not arg1.__class__ is set:
3704 return union_pw_aff(arg0).subtract_domain(arg1)
3706 res = isl.isl_pw_aff_subtract_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3707 obj = pw_aff(ctx=ctx, ptr=res)
3709 def tdiv_q(arg0, arg1):
3711 if not arg0.__class__ is pw_aff:
3716 if not arg1.__class__ is pw_aff:
3719 return union_pw_aff(arg0).tdiv_q(arg1)
3721 res = isl.isl_pw_aff_tdiv_q(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3722 obj = pw_aff(ctx=ctx, ptr=res)
3724 def tdiv_r(arg0, arg1):
3726 if not arg0.__class__ is pw_aff:
3731 if not arg1.__class__ is pw_aff:
3734 return union_pw_aff(arg0).tdiv_r(arg1)
3736 res = isl.isl_pw_aff_tdiv_r(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3737 obj = pw_aff(ctx=ctx, ptr=res)
3741 if not arg0.__class__ is pw_aff:
3746 res = isl.isl_pw_aff_to_list(isl.isl_pw_aff_copy(arg0.ptr))
3747 obj = pw_aff_list(ctx=ctx, ptr=res)
3749 def to_union_pw_aff(arg0):
3751 if not arg0.__class__ is pw_aff:
3756 res = isl.isl_pw_aff_to_union_pw_aff(isl.isl_pw_aff_copy(arg0.ptr))
3757 obj = union_pw_aff(ctx=ctx, ptr=res)
3759 def union_add(arg0, arg1):
3761 if not arg0.__class__ is pw_aff:
3766 if not arg1.__class__ is pw_aff:
3769 return union_pw_aff(arg0).union_add(arg1)
3771 res = isl.isl_pw_aff_union_add(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3772 obj = pw_aff(ctx=ctx, ptr=res)
3775 isl.isl_pw_aff_from_aff.restype = c_void_p
3776 isl.isl_pw_aff_from_aff.argtypes = [c_void_p]
3777 isl.isl_pw_aff_read_from_str.restype = c_void_p
3778 isl.isl_pw_aff_read_from_str.argtypes = [Context, c_char_p]
3779 isl.isl_pw_aff_add.restype = c_void_p
3780 isl.isl_pw_aff_add.argtypes = [c_void_p, c_void_p]
3781 isl.isl_pw_aff_add_constant_val.restype = c_void_p
3782 isl.isl_pw_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
3783 isl.isl_pw_aff_as_aff.restype = c_void_p
3784 isl.isl_pw_aff_as_aff.argtypes = [c_void_p]
3785 isl.isl_pw_aff_as_map.restype = c_void_p
3786 isl.isl_pw_aff_as_map.argtypes = [c_void_p]
3787 isl.isl_pw_aff_bind_id.restype = c_void_p
3788 isl.isl_pw_aff_bind_id.argtypes = [c_void_p, c_void_p]
3789 isl.isl_pw_aff_bind_domain.restype = c_void_p
3790 isl.isl_pw_aff_bind_domain.argtypes = [c_void_p, c_void_p]
3791 isl.isl_pw_aff_bind_domain_wrapped_domain.restype = c_void_p
3792 isl.isl_pw_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
3793 isl.isl_pw_aff_ceil.restype = c_void_p
3794 isl.isl_pw_aff_ceil.argtypes = [c_void_p]
3795 isl.isl_pw_aff_coalesce.restype = c_void_p
3796 isl.isl_pw_aff_coalesce.argtypes = [c_void_p]
3797 isl.isl_pw_aff_cond.restype = c_void_p
3798 isl.isl_pw_aff_cond.argtypes = [c_void_p, c_void_p, c_void_p]
3799 isl.isl_pw_aff_div.restype = c_void_p
3800 isl.isl_pw_aff_div.argtypes = [c_void_p, c_void_p]
3801 isl.isl_pw_aff_domain.restype = c_void_p
3802 isl.isl_pw_aff_domain.argtypes = [c_void_p]
3803 isl.isl_pw_aff_domain_reverse.restype = c_void_p
3804 isl.isl_pw_aff_domain_reverse.argtypes = [c_void_p]
3805 isl.isl_pw_aff_drop_unused_params.restype = c_void_p
3806 isl.isl_pw_aff_drop_unused_params.argtypes = [c_void_p]
3807 isl.isl_pw_aff_eq_set.restype = c_void_p
3808 isl.isl_pw_aff_eq_set.argtypes = [c_void_p, c_void_p]
3809 isl.isl_pw_aff_eval.restype = c_void_p
3810 isl.isl_pw_aff_eval.argtypes = [c_void_p, c_void_p]
3811 isl.isl_pw_aff_floor.restype = c_void_p
3812 isl.isl_pw_aff_floor.argtypes = [c_void_p]
3813 isl.isl_pw_aff_ge_set.restype = c_void_p
3814 isl.isl_pw_aff_ge_set.argtypes = [c_void_p, c_void_p]
3815 isl.isl_pw_aff_gist.restype = c_void_p
3816 isl.isl_pw_aff_gist.argtypes = [c_void_p, c_void_p]
3817 isl.isl_pw_aff_gist_params.restype = c_void_p
3818 isl.isl_pw_aff_gist_params.argtypes = [c_void_p, c_void_p]
3819 isl.isl_pw_aff_gt_set.restype = c_void_p
3820 isl.isl_pw_aff_gt_set.argtypes = [c_void_p, c_void_p]
3821 isl.isl_pw_aff_insert_domain.restype = c_void_p
3822 isl.isl_pw_aff_insert_domain.argtypes = [c_void_p, c_void_p]
3823 isl.isl_pw_aff_intersect_domain.restype = c_void_p
3824 isl.isl_pw_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
3825 isl.isl_pw_aff_intersect_params.restype = c_void_p
3826 isl.isl_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
3827 isl.isl_pw_aff_isa_aff.argtypes = [c_void_p]
3828 isl.isl_pw_aff_le_set.restype = c_void_p
3829 isl.isl_pw_aff_le_set.argtypes = [c_void_p, c_void_p]
3830 isl.isl_pw_aff_lt_set.restype = c_void_p
3831 isl.isl_pw_aff_lt_set.argtypes = [c_void_p, c_void_p]
3832 isl.isl_pw_aff_max.restype = c_void_p
3833 isl.isl_pw_aff_max.argtypes = [c_void_p, c_void_p]
3834 isl.isl_pw_aff_max_val.restype = c_void_p
3835 isl.isl_pw_aff_max_val.argtypes = [c_void_p]
3836 isl.isl_pw_aff_min.restype = c_void_p
3837 isl.isl_pw_aff_min.argtypes = [c_void_p, c_void_p]
3838 isl.isl_pw_aff_min_val.restype = c_void_p
3839 isl.isl_pw_aff_min_val.argtypes = [c_void_p]
3840 isl.isl_pw_aff_mod_val.restype = c_void_p
3841 isl.isl_pw_aff_mod_val.argtypes = [c_void_p, c_void_p]
3842 isl.isl_pw_aff_mul.restype = c_void_p
3843 isl.isl_pw_aff_mul.argtypes = [c_void_p, c_void_p]
3844 isl.isl_pw_aff_ne_set.restype = c_void_p
3845 isl.isl_pw_aff_ne_set.argtypes = [c_void_p, c_void_p]
3846 isl.isl_pw_aff_neg.restype = c_void_p
3847 isl.isl_pw_aff_neg.argtypes = [c_void_p]
3848 isl.isl_pw_aff_param_on_domain_id.restype = c_void_p
3849 isl.isl_pw_aff_param_on_domain_id.argtypes = [c_void_p, c_void_p]
3850 isl.isl_pw_aff_params.restype = c_void_p
3851 isl.isl_pw_aff_params.argtypes = [c_void_p]
3852 isl.isl_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
3853 isl.isl_pw_aff_pullback_multi_aff.restype = c_void_p
3854 isl.isl_pw_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
3855 isl.isl_pw_aff_pullback_multi_pw_aff.restype = c_void_p
3856 isl.isl_pw_aff_pullback_multi_pw_aff.argtypes = [c_void_p, c_void_p]
3857 isl.isl_pw_aff_pullback_pw_multi_aff.restype = c_void_p
3858 isl.isl_pw_aff_pullback_pw_multi_aff.argtypes = [c_void_p, c_void_p]
3859 isl.isl_pw_aff_scale_val.restype = c_void_p
3860 isl.isl_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
3861 isl.isl_pw_aff_scale_down_val.restype = c_void_p
3862 isl.isl_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
3863 isl.isl_pw_aff_get_space.restype = c_void_p
3864 isl.isl_pw_aff_get_space.argtypes = [c_void_p]
3865 isl.isl_pw_aff_sub.restype = c_void_p
3866 isl.isl_pw_aff_sub.argtypes = [c_void_p, c_void_p]
3867 isl.isl_pw_aff_subtract_domain.restype = c_void_p
3868 isl.isl_pw_aff_subtract_domain.argtypes = [c_void_p, c_void_p]
3869 isl.isl_pw_aff_tdiv_q.restype = c_void_p
3870 isl.isl_pw_aff_tdiv_q.argtypes = [c_void_p, c_void_p]
3871 isl.isl_pw_aff_tdiv_r.restype = c_void_p
3872 isl.isl_pw_aff_tdiv_r.argtypes = [c_void_p, c_void_p]
3873 isl.isl_pw_aff_to_list.restype = c_void_p
3874 isl.isl_pw_aff_to_list.argtypes = [c_void_p]
3875 isl.isl_pw_aff_to_union_pw_aff.restype = c_void_p
3876 isl.isl_pw_aff_to_union_pw_aff.argtypes = [c_void_p]
3877 isl.isl_pw_aff_union_add.restype = c_void_p
3878 isl.isl_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
3879 isl.isl_pw_aff_copy.restype = c_void_p
3880 isl.isl_pw_aff_copy.argtypes = [c_void_p]
3881 isl.isl_pw_aff_free.restype = c_void_p
3882 isl.isl_pw_aff_free.argtypes = [c_void_p]
3883 isl.isl_pw_aff_to_str.restype = POINTER(c_char)
3884 isl.isl_pw_aff_to_str.argtypes = [c_void_p]
3886 class multi_aff(pw_multi_aff, multi_pw_aff):
3887 def __init__(self, *args, **keywords):
3888 if "ptr" in keywords:
3889 self.ctx = keywords["ctx"]
3890 self.ptr = keywords["ptr"]
3892 if len(args) == 1 and args[0].__class__ is aff:
3893 self.ctx = Context.getDefaultInstance()
3894 self.ptr = isl.isl_multi_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
3896 if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is aff_list:
3897 self.ctx = Context.getDefaultInstance()
3898 self.ptr = isl.isl_multi_aff_from_aff_list(isl.isl_space_copy(args[0].ptr), isl.isl_aff_list_copy(args[1].ptr))
3900 if len(args) == 1 and type(args[0]) == str:
3901 self.ctx = Context.getDefaultInstance()
3902 self.ptr = isl.isl_multi_aff_read_from_str(self.ctx, args[0].encode('ascii'))
3906 if hasattr(self, 'ptr'):
3907 isl.isl_multi_aff_free(self.ptr)
3910 if not arg0.__class__ is multi_aff:
3911 arg0 = multi_aff(arg0)
3914 ptr = isl.isl_multi_aff_to_str(arg0.ptr)
3915 res = cast(ptr, c_char_p).value.decode('ascii')
3921 return 'isl.multi_aff("""%s""")' % s
3923 return 'isl.multi_aff("%s")' % s
3924 def add(arg0, arg1):
3926 if not arg0.__class__ is multi_aff:
3927 arg0 = multi_aff(arg0)
3931 if not arg1.__class__ is multi_aff:
3932 arg1 = multi_aff(arg1)
3934 return pw_multi_aff(arg0).add(arg1)
3936 res = isl.isl_multi_aff_add(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
3937 obj = multi_aff(ctx=ctx, ptr=res)
3939 def add_constant(*args):
3940 if len(args) == 2 and args[1].__class__ is multi_val:
3943 if not args[0].__class__ is multi_aff:
3944 args[0] = multi_aff(args[0])
3948 res = isl.isl_multi_aff_add_constant_multi_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
3949 obj = multi_aff(ctx=ctx, ptr=res)
3951 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3954 if not args[0].__class__ is multi_aff:
3955 args[0] = multi_aff(args[0])
3959 if not args[1].__class__ is val:
3960 args[1] = val(args[1])
3964 res = isl.isl_multi_aff_add_constant_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3965 obj = multi_aff(ctx=ctx, ptr=res)
3970 if not arg0.__class__ is multi_aff:
3971 arg0 = multi_aff(arg0)
3975 res = isl.isl_multi_aff_as_map(isl.isl_multi_aff_copy(arg0.ptr))
3976 obj = map(ctx=ctx, ptr=res)
3980 if not arg0.__class__ is multi_aff:
3981 arg0 = multi_aff(arg0)
3985 res = isl.isl_multi_aff_as_set(isl.isl_multi_aff_copy(arg0.ptr))
3986 obj = set(ctx=ctx, ptr=res)
3990 if not arg0.__class__ is multi_aff:
3991 arg0 = multi_aff(arg0)
3995 res = isl.isl_multi_aff_get_at(arg0.ptr, arg1)
3996 obj = aff(ctx=ctx, ptr=res)
3998 def get_at(arg0, arg1):
3999 return arg0.at(arg1)
4000 def bind(arg0, arg1):
4002 if not arg0.__class__ is multi_aff:
4003 arg0 = multi_aff(arg0)
4007 if not arg1.__class__ is multi_id:
4008 arg1 = multi_id(arg1)
4010 return pw_multi_aff(arg0).bind(arg1)
4012 res = isl.isl_multi_aff_bind(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4013 obj = basic_set(ctx=ctx, ptr=res)
4015 def bind_domain(arg0, arg1):
4017 if not arg0.__class__ is multi_aff:
4018 arg0 = multi_aff(arg0)
4022 if not arg1.__class__ is multi_id:
4023 arg1 = multi_id(arg1)
4025 return pw_multi_aff(arg0).bind_domain(arg1)
4027 res = isl.isl_multi_aff_bind_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4028 obj = multi_aff(ctx=ctx, ptr=res)
4030 def bind_domain_wrapped_domain(arg0, arg1):
4032 if not arg0.__class__ is multi_aff:
4033 arg0 = multi_aff(arg0)
4037 if not arg1.__class__ is multi_id:
4038 arg1 = multi_id(arg1)
4040 return pw_multi_aff(arg0).bind_domain_wrapped_domain(arg1)
4042 res = isl.isl_multi_aff_bind_domain_wrapped_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4043 obj = multi_aff(ctx=ctx, ptr=res)
4045 def constant_multi_val(arg0):
4047 if not arg0.__class__ is multi_aff:
4048 arg0 = multi_aff(arg0)
4052 res = isl.isl_multi_aff_get_constant_multi_val(arg0.ptr)
4053 obj = multi_val(ctx=ctx, ptr=res)
4055 def get_constant_multi_val(arg0):
4056 return arg0.constant_multi_val()
4058 def domain_map(arg0):
4060 if not arg0.__class__ is space:
4065 res = isl.isl_multi_aff_domain_map(isl.isl_space_copy(arg0.ptr))
4066 obj = multi_aff(ctx=ctx, ptr=res)
4068 def domain_reverse(arg0):
4070 if not arg0.__class__ is multi_aff:
4071 arg0 = multi_aff(arg0)
4075 res = isl.isl_multi_aff_domain_reverse(isl.isl_multi_aff_copy(arg0.ptr))
4076 obj = multi_aff(ctx=ctx, ptr=res)
4078 def flat_range_product(arg0, arg1):
4080 if not arg0.__class__ is multi_aff:
4081 arg0 = multi_aff(arg0)
4085 if not arg1.__class__ is multi_aff:
4086 arg1 = multi_aff(arg1)
4088 return pw_multi_aff(arg0).flat_range_product(arg1)
4090 res = isl.isl_multi_aff_flat_range_product(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4091 obj = multi_aff(ctx=ctx, ptr=res)
4095 if not arg0.__class__ is multi_aff:
4096 arg0 = multi_aff(arg0)
4100 res = isl.isl_multi_aff_floor(isl.isl_multi_aff_copy(arg0.ptr))
4101 obj = multi_aff(ctx=ctx, ptr=res)
4103 def gist(arg0, arg1):
4105 if not arg0.__class__ is multi_aff:
4106 arg0 = multi_aff(arg0)
4110 if not arg1.__class__ is set:
4113 return pw_multi_aff(arg0).gist(arg1)
4115 res = isl.isl_multi_aff_gist(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4116 obj = multi_aff(ctx=ctx, ptr=res)
4118 def gist_params(arg0, arg1):
4120 if not arg0.__class__ is multi_aff:
4121 arg0 = multi_aff(arg0)
4125 if not arg1.__class__ is set:
4128 return pw_multi_aff(arg0).gist_params(arg1)
4130 res = isl.isl_multi_aff_gist_params(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4131 obj = multi_aff(ctx=ctx, ptr=res)
4133 def has_range_tuple_id(arg0):
4135 if not arg0.__class__ is multi_aff:
4136 arg0 = multi_aff(arg0)
4140 res = isl.isl_multi_aff_has_range_tuple_id(arg0.ptr)
4144 def identity(*args):
4148 if not args[0].__class__ is multi_aff:
4149 args[0] = multi_aff(args[0])
4153 res = isl.isl_multi_aff_identity_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
4154 obj = multi_aff(ctx=ctx, ptr=res)
4158 def identity_on_domain(*args):
4159 if len(args) == 1 and args[0].__class__ is space:
4161 res = isl.isl_multi_aff_identity_on_domain_space(isl.isl_space_copy(args[0].ptr))
4162 obj = multi_aff(ctx=ctx, ptr=res)
4165 def insert_domain(arg0, arg1):
4167 if not arg0.__class__ is multi_aff:
4168 arg0 = multi_aff(arg0)
4172 if not arg1.__class__ is space:
4175 return pw_multi_aff(arg0).insert_domain(arg1)
4177 res = isl.isl_multi_aff_insert_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
4178 obj = multi_aff(ctx=ctx, ptr=res)
4180 def involves_locals(arg0):
4182 if not arg0.__class__ is multi_aff:
4183 arg0 = multi_aff(arg0)
4187 res = isl.isl_multi_aff_involves_locals(arg0.ptr)
4191 def involves_nan(arg0):
4193 if not arg0.__class__ is multi_aff:
4194 arg0 = multi_aff(arg0)
4198 res = isl.isl_multi_aff_involves_nan(arg0.ptr)
4204 if not arg0.__class__ is multi_aff:
4205 arg0 = multi_aff(arg0)
4209 res = isl.isl_multi_aff_get_list(arg0.ptr)
4210 obj = aff_list(ctx=ctx, ptr=res)
4215 def multi_val_on_domain(*args):
4216 if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is multi_val:
4218 res = isl.isl_multi_aff_multi_val_on_domain_space(isl.isl_space_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
4219 obj = multi_aff(ctx=ctx, ptr=res)
4224 if not arg0.__class__ is multi_aff:
4225 arg0 = multi_aff(arg0)
4229 res = isl.isl_multi_aff_neg(isl.isl_multi_aff_copy(arg0.ptr))
4230 obj = multi_aff(ctx=ctx, ptr=res)
4232 def plain_is_equal(arg0, arg1):
4234 if not arg0.__class__ is multi_aff:
4235 arg0 = multi_aff(arg0)
4239 if not arg1.__class__ is multi_aff:
4240 arg1 = multi_aff(arg1)
4242 return pw_multi_aff(arg0).plain_is_equal(arg1)
4244 res = isl.isl_multi_aff_plain_is_equal(arg0.ptr, arg1.ptr)
4248 def product(arg0, arg1):
4250 if not arg0.__class__ is multi_aff:
4251 arg0 = multi_aff(arg0)
4255 if not arg1.__class__ is multi_aff:
4256 arg1 = multi_aff(arg1)
4258 return pw_multi_aff(arg0).product(arg1)
4260 res = isl.isl_multi_aff_product(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4261 obj = multi_aff(ctx=ctx, ptr=res)
4263 def pullback(*args):
4264 if len(args) == 2 and args[1].__class__ is multi_aff:
4267 if not args[0].__class__ is multi_aff:
4268 args[0] = multi_aff(args[0])
4272 res = isl.isl_multi_aff_pullback_multi_aff(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
4273 obj = multi_aff(ctx=ctx, ptr=res)
4277 def range_map(arg0):
4279 if not arg0.__class__ is space:
4284 res = isl.isl_multi_aff_range_map(isl.isl_space_copy(arg0.ptr))
4285 obj = multi_aff(ctx=ctx, ptr=res)
4287 def range_product(arg0, arg1):
4289 if not arg0.__class__ is multi_aff:
4290 arg0 = multi_aff(arg0)
4294 if not arg1.__class__ is multi_aff:
4295 arg1 = multi_aff(arg1)
4297 return pw_multi_aff(arg0).range_product(arg1)
4299 res = isl.isl_multi_aff_range_product(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4300 obj = multi_aff(ctx=ctx, ptr=res)
4302 def range_tuple_id(arg0):
4304 if not arg0.__class__ is multi_aff:
4305 arg0 = multi_aff(arg0)
4309 res = isl.isl_multi_aff_get_range_tuple_id(arg0.ptr)
4310 obj = id(ctx=ctx, ptr=res)
4312 def get_range_tuple_id(arg0):
4313 return arg0.range_tuple_id()
4314 def reset_range_tuple_id(arg0):
4316 if not arg0.__class__ is multi_aff:
4317 arg0 = multi_aff(arg0)
4321 res = isl.isl_multi_aff_reset_range_tuple_id(isl.isl_multi_aff_copy(arg0.ptr))
4322 obj = multi_aff(ctx=ctx, ptr=res)
4325 if len(args) == 2 and args[1].__class__ is multi_val:
4328 if not args[0].__class__ is multi_aff:
4329 args[0] = multi_aff(args[0])
4333 res = isl.isl_multi_aff_scale_multi_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
4334 obj = multi_aff(ctx=ctx, ptr=res)
4336 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4339 if not args[0].__class__ is multi_aff:
4340 args[0] = multi_aff(args[0])
4344 if not args[1].__class__ is val:
4345 args[1] = val(args[1])
4349 res = isl.isl_multi_aff_scale_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4350 obj = multi_aff(ctx=ctx, ptr=res)
4353 def scale_down(*args):
4354 if len(args) == 2 and args[1].__class__ is multi_val:
4357 if not args[0].__class__ is multi_aff:
4358 args[0] = multi_aff(args[0])
4362 res = isl.isl_multi_aff_scale_down_multi_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
4363 obj = multi_aff(ctx=ctx, ptr=res)
4365 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4368 if not args[0].__class__ is multi_aff:
4369 args[0] = multi_aff(args[0])
4373 if not args[1].__class__ is val:
4374 args[1] = val(args[1])
4378 res = isl.isl_multi_aff_scale_down_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4379 obj = multi_aff(ctx=ctx, ptr=res)
4382 def set_at(arg0, arg1, arg2):
4384 if not arg0.__class__ is multi_aff:
4385 arg0 = multi_aff(arg0)
4389 if not arg2.__class__ is aff:
4392 return pw_multi_aff(arg0).set_at(arg1, arg2)
4394 res = isl.isl_multi_aff_set_at(isl.isl_multi_aff_copy(arg0.ptr), arg1, isl.isl_aff_copy(arg2.ptr))
4395 obj = multi_aff(ctx=ctx, ptr=res)
4397 def set_range_tuple(*args):
4398 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
4401 if not args[0].__class__ is multi_aff:
4402 args[0] = multi_aff(args[0])
4406 if not args[1].__class__ is id:
4407 args[1] = id(args[1])
4411 res = isl.isl_multi_aff_set_range_tuple_id(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
4412 obj = multi_aff(ctx=ctx, ptr=res)
4417 if not arg0.__class__ is multi_aff:
4418 arg0 = multi_aff(arg0)
4422 res = isl.isl_multi_aff_size(arg0.ptr)
4428 if not arg0.__class__ is multi_aff:
4429 arg0 = multi_aff(arg0)
4433 res = isl.isl_multi_aff_get_space(arg0.ptr)
4434 obj = space(ctx=ctx, ptr=res)
4436 def get_space(arg0):
4438 def sub(arg0, arg1):
4440 if not arg0.__class__ is multi_aff:
4441 arg0 = multi_aff(arg0)
4445 if not arg1.__class__ is multi_aff:
4446 arg1 = multi_aff(arg1)
4448 return pw_multi_aff(arg0).sub(arg1)
4450 res = isl.isl_multi_aff_sub(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4451 obj = multi_aff(ctx=ctx, ptr=res)
4453 def to_multi_pw_aff(arg0):
4455 if not arg0.__class__ is multi_aff:
4456 arg0 = multi_aff(arg0)
4460 res = isl.isl_multi_aff_to_multi_pw_aff(isl.isl_multi_aff_copy(arg0.ptr))
4461 obj = multi_pw_aff(ctx=ctx, ptr=res)
4463 def to_multi_union_pw_aff(arg0):
4465 if not arg0.__class__ is multi_aff:
4466 arg0 = multi_aff(arg0)
4470 res = isl.isl_multi_aff_to_multi_union_pw_aff(isl.isl_multi_aff_copy(arg0.ptr))
4471 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
4473 def to_pw_multi_aff(arg0):
4475 if not arg0.__class__ is multi_aff:
4476 arg0 = multi_aff(arg0)
4480 res = isl.isl_multi_aff_to_pw_multi_aff(isl.isl_multi_aff_copy(arg0.ptr))
4481 obj = pw_multi_aff(ctx=ctx, ptr=res)
4483 def unbind_params_insert_domain(arg0, arg1):
4485 if not arg0.__class__ is multi_aff:
4486 arg0 = multi_aff(arg0)
4490 if not arg1.__class__ is multi_id:
4491 arg1 = multi_id(arg1)
4493 return pw_multi_aff(arg0).unbind_params_insert_domain(arg1)
4495 res = isl.isl_multi_aff_unbind_params_insert_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4496 obj = multi_aff(ctx=ctx, ptr=res)
4501 if not arg0.__class__ is space:
4506 res = isl.isl_multi_aff_zero(isl.isl_space_copy(arg0.ptr))
4507 obj = multi_aff(ctx=ctx, ptr=res)
4510 isl.isl_multi_aff_from_aff.restype = c_void_p
4511 isl.isl_multi_aff_from_aff.argtypes = [c_void_p]
4512 isl.isl_multi_aff_from_aff_list.restype = c_void_p
4513 isl.isl_multi_aff_from_aff_list.argtypes = [c_void_p, c_void_p]
4514 isl.isl_multi_aff_read_from_str.restype = c_void_p
4515 isl.isl_multi_aff_read_from_str.argtypes = [Context, c_char_p]
4516 isl.isl_multi_aff_add.restype = c_void_p
4517 isl.isl_multi_aff_add.argtypes = [c_void_p, c_void_p]
4518 isl.isl_multi_aff_add_constant_multi_val.restype = c_void_p
4519 isl.isl_multi_aff_add_constant_multi_val.argtypes = [c_void_p, c_void_p]
4520 isl.isl_multi_aff_add_constant_val.restype = c_void_p
4521 isl.isl_multi_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
4522 isl.isl_multi_aff_as_map.restype = c_void_p
4523 isl.isl_multi_aff_as_map.argtypes = [c_void_p]
4524 isl.isl_multi_aff_as_set.restype = c_void_p
4525 isl.isl_multi_aff_as_set.argtypes = [c_void_p]
4526 isl.isl_multi_aff_get_at.restype = c_void_p
4527 isl.isl_multi_aff_get_at.argtypes = [c_void_p, c_int]
4528 isl.isl_multi_aff_bind.restype = c_void_p
4529 isl.isl_multi_aff_bind.argtypes = [c_void_p, c_void_p]
4530 isl.isl_multi_aff_bind_domain.restype = c_void_p
4531 isl.isl_multi_aff_bind_domain.argtypes = [c_void_p, c_void_p]
4532 isl.isl_multi_aff_bind_domain_wrapped_domain.restype = c_void_p
4533 isl.isl_multi_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
4534 isl.isl_multi_aff_get_constant_multi_val.restype = c_void_p
4535 isl.isl_multi_aff_get_constant_multi_val.argtypes = [c_void_p]
4536 isl.isl_multi_aff_domain_map.restype = c_void_p
4537 isl.isl_multi_aff_domain_map.argtypes = [c_void_p]
4538 isl.isl_multi_aff_domain_reverse.restype = c_void_p
4539 isl.isl_multi_aff_domain_reverse.argtypes = [c_void_p]
4540 isl.isl_multi_aff_flat_range_product.restype = c_void_p
4541 isl.isl_multi_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
4542 isl.isl_multi_aff_floor.restype = c_void_p
4543 isl.isl_multi_aff_floor.argtypes = [c_void_p]
4544 isl.isl_multi_aff_gist.restype = c_void_p
4545 isl.isl_multi_aff_gist.argtypes = [c_void_p, c_void_p]
4546 isl.isl_multi_aff_gist_params.restype = c_void_p
4547 isl.isl_multi_aff_gist_params.argtypes = [c_void_p, c_void_p]
4548 isl.isl_multi_aff_has_range_tuple_id.argtypes = [c_void_p]
4549 isl.isl_multi_aff_identity_multi_aff.restype = c_void_p
4550 isl.isl_multi_aff_identity_multi_aff.argtypes = [c_void_p]
4551 isl.isl_multi_aff_identity_on_domain_space.restype = c_void_p
4552 isl.isl_multi_aff_identity_on_domain_space.argtypes = [c_void_p]
4553 isl.isl_multi_aff_insert_domain.restype = c_void_p
4554 isl.isl_multi_aff_insert_domain.argtypes = [c_void_p, c_void_p]
4555 isl.isl_multi_aff_involves_locals.argtypes = [c_void_p]
4556 isl.isl_multi_aff_involves_nan.argtypes = [c_void_p]
4557 isl.isl_multi_aff_get_list.restype = c_void_p
4558 isl.isl_multi_aff_get_list.argtypes = [c_void_p]
4559 isl.isl_multi_aff_multi_val_on_domain_space.restype = c_void_p
4560 isl.isl_multi_aff_multi_val_on_domain_space.argtypes = [c_void_p, c_void_p]
4561 isl.isl_multi_aff_neg.restype = c_void_p
4562 isl.isl_multi_aff_neg.argtypes = [c_void_p]
4563 isl.isl_multi_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
4564 isl.isl_multi_aff_product.restype = c_void_p
4565 isl.isl_multi_aff_product.argtypes = [c_void_p, c_void_p]
4566 isl.isl_multi_aff_pullback_multi_aff.restype = c_void_p
4567 isl.isl_multi_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
4568 isl.isl_multi_aff_range_map.restype = c_void_p
4569 isl.isl_multi_aff_range_map.argtypes = [c_void_p]
4570 isl.isl_multi_aff_range_product.restype = c_void_p
4571 isl.isl_multi_aff_range_product.argtypes = [c_void_p, c_void_p]
4572 isl.isl_multi_aff_get_range_tuple_id.restype = c_void_p
4573 isl.isl_multi_aff_get_range_tuple_id.argtypes = [c_void_p]
4574 isl.isl_multi_aff_reset_range_tuple_id.restype = c_void_p
4575 isl.isl_multi_aff_reset_range_tuple_id.argtypes = [c_void_p]
4576 isl.isl_multi_aff_scale_multi_val.restype = c_void_p
4577 isl.isl_multi_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
4578 isl.isl_multi_aff_scale_val.restype = c_void_p
4579 isl.isl_multi_aff_scale_val.argtypes = [c_void_p, c_void_p]
4580 isl.isl_multi_aff_scale_down_multi_val.restype = c_void_p
4581 isl.isl_multi_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
4582 isl.isl_multi_aff_scale_down_val.restype = c_void_p
4583 isl.isl_multi_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
4584 isl.isl_multi_aff_set_at.restype = c_void_p
4585 isl.isl_multi_aff_set_at.argtypes = [c_void_p, c_int, c_void_p]
4586 isl.isl_multi_aff_set_range_tuple_id.restype = c_void_p
4587 isl.isl_multi_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
4588 isl.isl_multi_aff_size.argtypes = [c_void_p]
4589 isl.isl_multi_aff_get_space.restype = c_void_p
4590 isl.isl_multi_aff_get_space.argtypes = [c_void_p]
4591 isl.isl_multi_aff_sub.restype = c_void_p
4592 isl.isl_multi_aff_sub.argtypes = [c_void_p, c_void_p]
4593 isl.isl_multi_aff_to_multi_pw_aff.restype = c_void_p
4594 isl.isl_multi_aff_to_multi_pw_aff.argtypes = [c_void_p]
4595 isl.isl_multi_aff_to_multi_union_pw_aff.restype = c_void_p
4596 isl.isl_multi_aff_to_multi_union_pw_aff.argtypes = [c_void_p]
4597 isl.isl_multi_aff_to_pw_multi_aff.restype = c_void_p
4598 isl.isl_multi_aff_to_pw_multi_aff.argtypes = [c_void_p]
4599 isl.isl_multi_aff_unbind_params_insert_domain.restype = c_void_p
4600 isl.isl_multi_aff_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
4601 isl.isl_multi_aff_zero.restype = c_void_p
4602 isl.isl_multi_aff_zero.argtypes = [c_void_p]
4603 isl.isl_multi_aff_copy.restype = c_void_p
4604 isl.isl_multi_aff_copy.argtypes = [c_void_p]
4605 isl.isl_multi_aff_free.restype = c_void_p
4606 isl.isl_multi_aff_free.argtypes = [c_void_p]
4607 isl.isl_multi_aff_to_str.restype = POINTER(c_char)
4608 isl.isl_multi_aff_to_str.argtypes = [c_void_p]
4610 class aff(pw_aff, multi_aff):
4611 def __init__(self, *args, **keywords):
4612 if "ptr" in keywords:
4613 self.ctx = keywords["ctx"]
4614 self.ptr = keywords["ptr"]
4616 if len(args) == 1 and type(args[0]) == str:
4617 self.ctx = Context.getDefaultInstance()
4618 self.ptr = isl.isl_aff_read_from_str(self.ctx, args[0].encode('ascii'))
4622 if hasattr(self, 'ptr'):
4623 isl.isl_aff_free(self.ptr)
4626 if not arg0.__class__ is aff:
4630 ptr = isl.isl_aff_to_str(arg0.ptr)
4631 res = cast(ptr, c_char_p).value.decode('ascii')
4637 return 'isl.aff("""%s""")' % s
4639 return 'isl.aff("%s")' % s
4640 def add(arg0, arg1):
4642 if not arg0.__class__ is aff:
4647 if not arg1.__class__ is aff:
4650 return pw_aff(arg0).add(arg1)
4652 res = isl.isl_aff_add(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4653 obj = aff(ctx=ctx, ptr=res)
4655 def add_constant(*args):
4656 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4659 if not args[0].__class__ is aff:
4660 args[0] = aff(args[0])
4664 if not args[1].__class__ is val:
4665 args[1] = val(args[1])
4669 res = isl.isl_aff_add_constant_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4670 obj = aff(ctx=ctx, ptr=res)
4674 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
4677 if not args[0].__class__ is aff:
4678 args[0] = aff(args[0])
4682 if not args[1].__class__ is id:
4683 args[1] = id(args[1])
4687 res = isl.isl_aff_bind_id(isl.isl_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
4688 obj = basic_set(ctx=ctx, ptr=res)
4693 if not arg0.__class__ is aff:
4698 res = isl.isl_aff_ceil(isl.isl_aff_copy(arg0.ptr))
4699 obj = aff(ctx=ctx, ptr=res)
4701 def constant_val(arg0):
4703 if not arg0.__class__ is aff:
4708 res = isl.isl_aff_get_constant_val(arg0.ptr)
4709 obj = val(ctx=ctx, ptr=res)
4711 def get_constant_val(arg0):
4712 return arg0.constant_val()
4713 def div(arg0, arg1):
4715 if not arg0.__class__ is aff:
4720 if not arg1.__class__ is aff:
4723 return pw_aff(arg0).div(arg1)
4725 res = isl.isl_aff_div(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4726 obj = aff(ctx=ctx, ptr=res)
4728 def domain_reverse(arg0):
4730 if not arg0.__class__ is aff:
4735 res = isl.isl_aff_domain_reverse(isl.isl_aff_copy(arg0.ptr))
4736 obj = aff(ctx=ctx, ptr=res)
4738 def eq_set(arg0, arg1):
4740 if not arg0.__class__ is aff:
4745 if not arg1.__class__ is aff:
4748 return pw_aff(arg0).eq_set(arg1)
4750 res = isl.isl_aff_eq_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4751 obj = set(ctx=ctx, ptr=res)
4753 def eval(arg0, arg1):
4755 if not arg0.__class__ is aff:
4760 if not arg1.__class__ is point:
4763 return pw_aff(arg0).eval(arg1)
4765 res = isl.isl_aff_eval(isl.isl_aff_copy(arg0.ptr), isl.isl_point_copy(arg1.ptr))
4766 obj = val(ctx=ctx, ptr=res)
4770 if not arg0.__class__ is aff:
4775 res = isl.isl_aff_floor(isl.isl_aff_copy(arg0.ptr))
4776 obj = aff(ctx=ctx, ptr=res)
4778 def ge_set(arg0, arg1):
4780 if not arg0.__class__ is aff:
4785 if not arg1.__class__ is aff:
4788 return pw_aff(arg0).ge_set(arg1)
4790 res = isl.isl_aff_ge_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4791 obj = set(ctx=ctx, ptr=res)
4793 def gist(arg0, arg1):
4795 if not arg0.__class__ is aff:
4800 if not arg1.__class__ is set:
4803 return pw_aff(arg0).gist(arg1)
4805 res = isl.isl_aff_gist(isl.isl_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4806 obj = aff(ctx=ctx, ptr=res)
4808 def gist_params(arg0, arg1):
4810 if not arg0.__class__ is aff:
4815 if not arg1.__class__ is set:
4818 return pw_aff(arg0).gist_params(arg1)
4820 res = isl.isl_aff_gist_params(isl.isl_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4821 obj = aff(ctx=ctx, ptr=res)
4823 def gt_set(arg0, arg1):
4825 if not arg0.__class__ is aff:
4830 if not arg1.__class__ is aff:
4833 return pw_aff(arg0).gt_set(arg1)
4835 res = isl.isl_aff_gt_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4836 obj = set(ctx=ctx, ptr=res)
4840 if not arg0.__class__ is aff:
4845 res = isl.isl_aff_is_cst(arg0.ptr)
4849 def le_set(arg0, arg1):
4851 if not arg0.__class__ is aff:
4856 if not arg1.__class__ is aff:
4859 return pw_aff(arg0).le_set(arg1)
4861 res = isl.isl_aff_le_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4862 obj = set(ctx=ctx, ptr=res)
4864 def lt_set(arg0, arg1):
4866 if not arg0.__class__ is aff:
4871 if not arg1.__class__ is aff:
4874 return pw_aff(arg0).lt_set(arg1)
4876 res = isl.isl_aff_lt_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4877 obj = set(ctx=ctx, ptr=res)
4880 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4883 if not args[0].__class__ is aff:
4884 args[0] = aff(args[0])
4888 if not args[1].__class__ is val:
4889 args[1] = val(args[1])
4893 res = isl.isl_aff_mod_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4894 obj = aff(ctx=ctx, ptr=res)
4897 def mul(arg0, arg1):
4899 if not arg0.__class__ is aff:
4904 if not arg1.__class__ is aff:
4907 return pw_aff(arg0).mul(arg1)
4909 res = isl.isl_aff_mul(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4910 obj = aff(ctx=ctx, ptr=res)
4912 def ne_set(arg0, arg1):
4914 if not arg0.__class__ is aff:
4919 if not arg1.__class__ is aff:
4922 return pw_aff(arg0).ne_set(arg1)
4924 res = isl.isl_aff_ne_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4925 obj = set(ctx=ctx, ptr=res)
4929 if not arg0.__class__ is aff:
4934 res = isl.isl_aff_neg(isl.isl_aff_copy(arg0.ptr))
4935 obj = aff(ctx=ctx, ptr=res)
4937 def plain_is_equal(arg0, arg1):
4939 if not arg0.__class__ is aff:
4944 if not arg1.__class__ is aff:
4947 return pw_aff(arg0).plain_is_equal(arg1)
4949 res = isl.isl_aff_plain_is_equal(arg0.ptr, arg1.ptr)
4953 def pullback(*args):
4954 if len(args) == 2 and args[1].__class__ is multi_aff:
4957 if not args[0].__class__ is aff:
4958 args[0] = aff(args[0])
4962 res = isl.isl_aff_pullback_multi_aff(isl.isl_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
4963 obj = aff(ctx=ctx, ptr=res)
4967 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4970 if not args[0].__class__ is aff:
4971 args[0] = aff(args[0])
4975 if not args[1].__class__ is val:
4976 args[1] = val(args[1])
4980 res = isl.isl_aff_scale_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4981 obj = aff(ctx=ctx, ptr=res)
4984 def scale_down(*args):
4985 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4988 if not args[0].__class__ is aff:
4989 args[0] = aff(args[0])
4993 if not args[1].__class__ is val:
4994 args[1] = val(args[1])
4998 res = isl.isl_aff_scale_down_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4999 obj = aff(ctx=ctx, ptr=res)
5002 def sub(arg0, arg1):
5004 if not arg0.__class__ is aff:
5009 if not arg1.__class__ is aff:
5012 return pw_aff(arg0).sub(arg1)
5014 res = isl.isl_aff_sub(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
5015 obj = aff(ctx=ctx, ptr=res)
5019 if not arg0.__class__ is aff:
5024 res = isl.isl_aff_to_list(isl.isl_aff_copy(arg0.ptr))
5025 obj = aff_list(ctx=ctx, ptr=res)
5027 def unbind_params_insert_domain(arg0, arg1):
5029 if not arg0.__class__ is aff:
5034 if not arg1.__class__ is multi_id:
5035 arg1 = multi_id(arg1)
5037 return pw_aff(arg0).unbind_params_insert_domain(arg1)
5039 res = isl.isl_aff_unbind_params_insert_domain(isl.isl_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
5040 obj = aff(ctx=ctx, ptr=res)
5043 def zero_on_domain(*args):
5044 if len(args) == 1 and args[0].__class__ is space:
5046 res = isl.isl_aff_zero_on_domain_space(isl.isl_space_copy(args[0].ptr))
5047 obj = aff(ctx=ctx, ptr=res)
5051 isl.isl_aff_read_from_str.restype = c_void_p
5052 isl.isl_aff_read_from_str.argtypes = [Context, c_char_p]
5053 isl.isl_aff_add.restype = c_void_p
5054 isl.isl_aff_add.argtypes = [c_void_p, c_void_p]
5055 isl.isl_aff_add_constant_val.restype = c_void_p
5056 isl.isl_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
5057 isl.isl_aff_bind_id.restype = c_void_p
5058 isl.isl_aff_bind_id.argtypes = [c_void_p, c_void_p]
5059 isl.isl_aff_ceil.restype = c_void_p
5060 isl.isl_aff_ceil.argtypes = [c_void_p]
5061 isl.isl_aff_get_constant_val.restype = c_void_p
5062 isl.isl_aff_get_constant_val.argtypes = [c_void_p]
5063 isl.isl_aff_div.restype = c_void_p
5064 isl.isl_aff_div.argtypes = [c_void_p, c_void_p]
5065 isl.isl_aff_domain_reverse.restype = c_void_p
5066 isl.isl_aff_domain_reverse.argtypes = [c_void_p]
5067 isl.isl_aff_eq_set.restype = c_void_p
5068 isl.isl_aff_eq_set.argtypes = [c_void_p, c_void_p]
5069 isl.isl_aff_eval.restype = c_void_p
5070 isl.isl_aff_eval.argtypes = [c_void_p, c_void_p]
5071 isl.isl_aff_floor.restype = c_void_p
5072 isl.isl_aff_floor.argtypes = [c_void_p]
5073 isl.isl_aff_ge_set.restype = c_void_p
5074 isl.isl_aff_ge_set.argtypes = [c_void_p, c_void_p]
5075 isl.isl_aff_gist.restype = c_void_p
5076 isl.isl_aff_gist.argtypes = [c_void_p, c_void_p]
5077 isl.isl_aff_gist_params.restype = c_void_p
5078 isl.isl_aff_gist_params.argtypes = [c_void_p, c_void_p]
5079 isl.isl_aff_gt_set.restype = c_void_p
5080 isl.isl_aff_gt_set.argtypes = [c_void_p, c_void_p]
5081 isl.isl_aff_is_cst.argtypes = [c_void_p]
5082 isl.isl_aff_le_set.restype = c_void_p
5083 isl.isl_aff_le_set.argtypes = [c_void_p, c_void_p]
5084 isl.isl_aff_lt_set.restype = c_void_p
5085 isl.isl_aff_lt_set.argtypes = [c_void_p, c_void_p]
5086 isl.isl_aff_mod_val.restype = c_void_p
5087 isl.isl_aff_mod_val.argtypes = [c_void_p, c_void_p]
5088 isl.isl_aff_mul.restype = c_void_p
5089 isl.isl_aff_mul.argtypes = [c_void_p, c_void_p]
5090 isl.isl_aff_ne_set.restype = c_void_p
5091 isl.isl_aff_ne_set.argtypes = [c_void_p, c_void_p]
5092 isl.isl_aff_neg.restype = c_void_p
5093 isl.isl_aff_neg.argtypes = [c_void_p]
5094 isl.isl_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
5095 isl.isl_aff_pullback_multi_aff.restype = c_void_p
5096 isl.isl_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
5097 isl.isl_aff_scale_val.restype = c_void_p
5098 isl.isl_aff_scale_val.argtypes = [c_void_p, c_void_p]
5099 isl.isl_aff_scale_down_val.restype = c_void_p
5100 isl.isl_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
5101 isl.isl_aff_sub.restype = c_void_p
5102 isl.isl_aff_sub.argtypes = [c_void_p, c_void_p]
5103 isl.isl_aff_to_list.restype = c_void_p
5104 isl.isl_aff_to_list.argtypes = [c_void_p]
5105 isl.isl_aff_unbind_params_insert_domain.restype = c_void_p
5106 isl.isl_aff_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
5107 isl.isl_aff_zero_on_domain_space.restype = c_void_p
5108 isl.isl_aff_zero_on_domain_space.argtypes = [c_void_p]
5109 isl.isl_aff_copy.restype = c_void_p
5110 isl.isl_aff_copy.argtypes = [c_void_p]
5111 isl.isl_aff_free.restype = c_void_p
5112 isl.isl_aff_free.argtypes = [c_void_p]
5113 isl.isl_aff_to_str.restype = POINTER(c_char)
5114 isl.isl_aff_to_str.argtypes = [c_void_p]
5116 class aff_list(object):
5117 def __init__(self, *args, **keywords):
5118 if "ptr" in keywords:
5119 self.ctx = keywords["ctx"]
5120 self.ptr = keywords["ptr"]
5122 if len(args) == 1 and type(args[0]) == int:
5123 self.ctx = Context.getDefaultInstance()
5124 self.ptr = isl.isl_aff_list_alloc(self.ctx, args[0])
5126 if len(args) == 1 and args[0].__class__ is aff:
5127 self.ctx = Context.getDefaultInstance()
5128 self.ptr = isl.isl_aff_list_from_aff(isl.isl_aff_copy(args[0].ptr))
5130 if len(args) == 1 and type(args[0]) == str:
5131 self.ctx = Context.getDefaultInstance()
5132 self.ptr = isl.isl_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
5136 if hasattr(self, 'ptr'):
5137 isl.isl_aff_list_free(self.ptr)
5140 if not arg0.__class__ is aff_list:
5141 arg0 = aff_list(arg0)
5144 ptr = isl.isl_aff_list_to_str(arg0.ptr)
5145 res = cast(ptr, c_char_p).value.decode('ascii')
5151 return 'isl.aff_list("""%s""")' % s
5153 return 'isl.aff_list("%s")' % s
5154 def add(arg0, arg1):
5156 if not arg0.__class__ is aff_list:
5157 arg0 = aff_list(arg0)
5161 if not arg1.__class__ is aff:
5166 res = isl.isl_aff_list_add(isl.isl_aff_list_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
5167 obj = aff_list(ctx=ctx, ptr=res)
5171 if not arg0.__class__ is aff_list:
5172 arg0 = aff_list(arg0)
5176 res = isl.isl_aff_list_get_at(arg0.ptr, arg1)
5177 obj = aff(ctx=ctx, ptr=res)
5179 def get_at(arg0, arg1):
5180 return arg0.at(arg1)
5183 if not arg0.__class__ is aff_list:
5184 arg0 = aff_list(arg0)
5188 res = isl.isl_aff_list_clear(isl.isl_aff_list_copy(arg0.ptr))
5189 obj = aff_list(ctx=ctx, ptr=res)
5191 def concat(arg0, arg1):
5193 if not arg0.__class__ is aff_list:
5194 arg0 = aff_list(arg0)
5198 if not arg1.__class__ is aff_list:
5199 arg1 = aff_list(arg1)
5203 res = isl.isl_aff_list_concat(isl.isl_aff_list_copy(arg0.ptr), isl.isl_aff_list_copy(arg1.ptr))
5204 obj = aff_list(ctx=ctx, ptr=res)
5206 def drop(arg0, arg1, arg2):
5208 if not arg0.__class__ is aff_list:
5209 arg0 = aff_list(arg0)
5213 res = isl.isl_aff_list_drop(isl.isl_aff_list_copy(arg0.ptr), arg1, arg2)
5214 obj = aff_list(ctx=ctx, ptr=res)
5216 def foreach(arg0, arg1):
5218 if not arg0.__class__ is aff_list:
5219 arg0 = aff_list(arg0)
5223 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
5224 def cb_func(cb_arg0, cb_arg1):
5225 cb_arg0 = aff(ctx=arg0.ctx, ptr=(cb_arg0))
5228 except BaseException as e:
5234 res = isl.isl_aff_list_foreach(arg0.ptr, cb1, None)
5235 if exc_info[0] is not None:
5239 def foreach_scc(arg0, arg1, arg2):
5241 if not arg0.__class__ is aff_list:
5242 arg0 = aff_list(arg0)
5246 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
5247 def cb_func(cb_arg0, cb_arg1, cb_arg2):
5248 cb_arg0 = aff(ctx=arg0.ctx, ptr=isl.isl_aff_copy(cb_arg0))
5249 cb_arg1 = aff(ctx=arg0.ctx, ptr=isl.isl_aff_copy(cb_arg1))
5251 res = arg1(cb_arg0, cb_arg1)
5252 except BaseException as e:
5255 return 1 if res else 0
5258 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
5259 def cb_func(cb_arg0, cb_arg1):
5260 cb_arg0 = aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
5263 except BaseException as e:
5269 res = isl.isl_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
5270 if exc_info[0] is not None:
5274 def insert(arg0, arg1, arg2):
5276 if not arg0.__class__ is aff_list:
5277 arg0 = aff_list(arg0)
5281 if not arg2.__class__ is aff:
5286 res = isl.isl_aff_list_insert(isl.isl_aff_list_copy(arg0.ptr), arg1, isl.isl_aff_copy(arg2.ptr))
5287 obj = aff_list(ctx=ctx, ptr=res)
5289 def set_at(arg0, arg1, arg2):
5291 if not arg0.__class__ is aff_list:
5292 arg0 = aff_list(arg0)
5296 if not arg2.__class__ is aff:
5301 res = isl.isl_aff_list_set_at(isl.isl_aff_list_copy(arg0.ptr), arg1, isl.isl_aff_copy(arg2.ptr))
5302 obj = aff_list(ctx=ctx, ptr=res)
5306 if not arg0.__class__ is aff_list:
5307 arg0 = aff_list(arg0)
5311 res = isl.isl_aff_list_size(arg0.ptr)
5316 isl.isl_aff_list_alloc.restype = c_void_p
5317 isl.isl_aff_list_alloc.argtypes = [Context, c_int]
5318 isl.isl_aff_list_from_aff.restype = c_void_p
5319 isl.isl_aff_list_from_aff.argtypes = [c_void_p]
5320 isl.isl_aff_list_read_from_str.restype = c_void_p
5321 isl.isl_aff_list_read_from_str.argtypes = [Context, c_char_p]
5322 isl.isl_aff_list_add.restype = c_void_p
5323 isl.isl_aff_list_add.argtypes = [c_void_p, c_void_p]
5324 isl.isl_aff_list_get_at.restype = c_void_p
5325 isl.isl_aff_list_get_at.argtypes = [c_void_p, c_int]
5326 isl.isl_aff_list_clear.restype = c_void_p
5327 isl.isl_aff_list_clear.argtypes = [c_void_p]
5328 isl.isl_aff_list_concat.restype = c_void_p
5329 isl.isl_aff_list_concat.argtypes = [c_void_p, c_void_p]
5330 isl.isl_aff_list_drop.restype = c_void_p
5331 isl.isl_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
5332 isl.isl_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
5333 isl.isl_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
5334 isl.isl_aff_list_insert.restype = c_void_p
5335 isl.isl_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
5336 isl.isl_aff_list_set_at.restype = c_void_p
5337 isl.isl_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
5338 isl.isl_aff_list_size.argtypes = [c_void_p]
5339 isl.isl_aff_list_copy.restype = c_void_p
5340 isl.isl_aff_list_copy.argtypes = [c_void_p]
5341 isl.isl_aff_list_free.restype = c_void_p
5342 isl.isl_aff_list_free.argtypes = [c_void_p]
5343 isl.isl_aff_list_to_str.restype = POINTER(c_char)
5344 isl.isl_aff_list_to_str.argtypes = [c_void_p]
5346 class ast_build(object):
5347 def __init__(self, *args, **keywords):
5348 if "ptr" in keywords:
5349 self.ctx = keywords["ctx"]
5350 self.ptr = keywords["ptr"]
5353 self.ctx = Context.getDefaultInstance()
5354 self.ptr = isl.isl_ast_build_alloc(self.ctx)
5358 if hasattr(self, 'ptr'):
5359 isl.isl_ast_build_free(self.ptr)
5360 def copy_callbacks(self, obj):
5361 if hasattr(obj, 'at_each_domain'):
5362 self.at_each_domain = obj.at_each_domain
5363 def set_at_each_domain(arg0, arg1):
5365 if not arg0.__class__ is ast_build:
5366 arg0 = ast_build(arg0)
5370 fn = CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_void_p)
5371 def cb_func(cb_arg0, cb_arg1, cb_arg2):
5372 cb_arg0 = ast_node(ctx=arg0.ctx, ptr=(cb_arg0))
5373 cb_arg1 = ast_build(ctx=arg0.ctx, ptr=isl.isl_ast_build_copy(cb_arg1))
5375 res = arg1(cb_arg0, cb_arg1)
5376 except BaseException as e:
5379 return isl.isl_ast_node_copy(res.ptr)
5382 res = isl.isl_ast_build_set_at_each_domain(isl.isl_ast_build_copy(arg0.ptr), cb1, None)
5383 if exc_info[0] is not None:
5385 if hasattr(arg0, 'at_each_domain') and arg0.at_each_domain['exc_info'] != None:
5386 exc_info = arg0.at_each_domain['exc_info'][0]
5387 arg0.at_each_domain['exc_info'][0] = None
5388 if exc_info is not None:
5390 obj = ast_build(ctx=ctx, ptr=res)
5391 obj.copy_callbacks(arg0)
5392 obj.at_each_domain = { 'func': cb1, 'exc_info': exc_info }
5394 def access_from(*args):
5395 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
5398 if not args[0].__class__ is ast_build:
5399 args[0] = ast_build(args[0])
5403 res = isl.isl_ast_build_access_from_multi_pw_aff(args[0].ptr, isl.isl_multi_pw_aff_copy(args[1].ptr))
5404 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5405 exc_info = args[0].at_each_domain['exc_info'][0]
5406 args[0].at_each_domain['exc_info'][0] = None
5407 if exc_info is not None:
5409 obj = ast_expr(ctx=ctx, ptr=res)
5411 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
5414 if not args[0].__class__ is ast_build:
5415 args[0] = ast_build(args[0])
5419 res = isl.isl_ast_build_access_from_pw_multi_aff(args[0].ptr, isl.isl_pw_multi_aff_copy(args[1].ptr))
5420 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5421 exc_info = args[0].at_each_domain['exc_info'][0]
5422 args[0].at_each_domain['exc_info'][0] = None
5423 if exc_info is not None:
5425 obj = ast_expr(ctx=ctx, ptr=res)
5428 def call_from(*args):
5429 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
5432 if not args[0].__class__ is ast_build:
5433 args[0] = ast_build(args[0])
5437 res = isl.isl_ast_build_call_from_multi_pw_aff(args[0].ptr, isl.isl_multi_pw_aff_copy(args[1].ptr))
5438 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5439 exc_info = args[0].at_each_domain['exc_info'][0]
5440 args[0].at_each_domain['exc_info'][0] = None
5441 if exc_info is not None:
5443 obj = ast_expr(ctx=ctx, ptr=res)
5445 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
5448 if not args[0].__class__ is ast_build:
5449 args[0] = ast_build(args[0])
5453 res = isl.isl_ast_build_call_from_pw_multi_aff(args[0].ptr, isl.isl_pw_multi_aff_copy(args[1].ptr))
5454 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5455 exc_info = args[0].at_each_domain['exc_info'][0]
5456 args[0].at_each_domain['exc_info'][0] = None
5457 if exc_info is not None:
5459 obj = ast_expr(ctx=ctx, ptr=res)
5462 def expr_from(*args):
5463 if len(args) == 2 and args[1].__class__ is pw_aff:
5466 if not args[0].__class__ is ast_build:
5467 args[0] = ast_build(args[0])
5471 res = isl.isl_ast_build_expr_from_pw_aff(args[0].ptr, isl.isl_pw_aff_copy(args[1].ptr))
5472 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5473 exc_info = args[0].at_each_domain['exc_info'][0]
5474 args[0].at_each_domain['exc_info'][0] = None
5475 if exc_info is not None:
5477 obj = ast_expr(ctx=ctx, ptr=res)
5479 if len(args) == 2 and args[1].__class__ is set:
5482 if not args[0].__class__ is ast_build:
5483 args[0] = ast_build(args[0])
5487 res = isl.isl_ast_build_expr_from_set(args[0].ptr, isl.isl_set_copy(args[1].ptr))
5488 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5489 exc_info = args[0].at_each_domain['exc_info'][0]
5490 args[0].at_each_domain['exc_info'][0] = None
5491 if exc_info is not None:
5493 obj = ast_expr(ctx=ctx, ptr=res)
5497 def from_context(arg0):
5499 if not arg0.__class__ is set:
5504 res = isl.isl_ast_build_from_context(isl.isl_set_copy(arg0.ptr))
5505 obj = ast_build(ctx=ctx, ptr=res)
5507 def node_from(*args):
5508 if len(args) == 2 and args[1].__class__ is schedule:
5511 if not args[0].__class__ is ast_build:
5512 args[0] = ast_build(args[0])
5516 res = isl.isl_ast_build_node_from_schedule(args[0].ptr, isl.isl_schedule_copy(args[1].ptr))
5517 if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5518 exc_info = args[0].at_each_domain['exc_info'][0]
5519 args[0].at_each_domain['exc_info'][0] = None
5520 if exc_info is not None:
5522 obj = ast_node(ctx=ctx, ptr=res)
5525 def node_from_schedule_map(arg0, arg1):
5527 if not arg0.__class__ is ast_build:
5528 arg0 = ast_build(arg0)
5532 if not arg1.__class__ is union_map:
5533 arg1 = union_map(arg1)
5537 res = isl.isl_ast_build_node_from_schedule_map(arg0.ptr, isl.isl_union_map_copy(arg1.ptr))
5538 if hasattr(arg0, 'at_each_domain') and arg0.at_each_domain['exc_info'] != None:
5539 exc_info = arg0.at_each_domain['exc_info'][0]
5540 arg0.at_each_domain['exc_info'][0] = None
5541 if exc_info is not None:
5543 obj = ast_node(ctx=ctx, ptr=res)
5547 if not arg0.__class__ is ast_build:
5548 arg0 = ast_build(arg0)
5552 res = isl.isl_ast_build_get_schedule(arg0.ptr)
5553 if hasattr(arg0, 'at_each_domain') and arg0.at_each_domain['exc_info'] != None:
5554 exc_info = arg0.at_each_domain['exc_info'][0]
5555 arg0.at_each_domain['exc_info'][0] = None
5556 if exc_info is not None:
5558 obj = union_map(ctx=ctx, ptr=res)
5560 def get_schedule(arg0):
5561 return arg0.schedule()
5563 isl.isl_ast_build_alloc.restype = c_void_p
5564 isl.isl_ast_build_alloc.argtypes = [Context]
5565 isl.isl_ast_build_set_at_each_domain.restype = c_void_p
5566 isl.isl_ast_build_set_at_each_domain.argtypes = [c_void_p, c_void_p, c_void_p]
5567 isl.isl_ast_build_access_from_multi_pw_aff.restype = c_void_p
5568 isl.isl_ast_build_access_from_multi_pw_aff.argtypes = [c_void_p, c_void_p]
5569 isl.isl_ast_build_access_from_pw_multi_aff.restype = c_void_p
5570 isl.isl_ast_build_access_from_pw_multi_aff.argtypes = [c_void_p, c_void_p]
5571 isl.isl_ast_build_call_from_multi_pw_aff.restype = c_void_p
5572 isl.isl_ast_build_call_from_multi_pw_aff.argtypes = [c_void_p, c_void_p]
5573 isl.isl_ast_build_call_from_pw_multi_aff.restype = c_void_p
5574 isl.isl_ast_build_call_from_pw_multi_aff.argtypes = [c_void_p, c_void_p]
5575 isl.isl_ast_build_expr_from_pw_aff.restype = c_void_p
5576 isl.isl_ast_build_expr_from_pw_aff.argtypes = [c_void_p, c_void_p]
5577 isl.isl_ast_build_expr_from_set.restype = c_void_p
5578 isl.isl_ast_build_expr_from_set.argtypes = [c_void_p, c_void_p]
5579 isl.isl_ast_build_from_context.restype = c_void_p
5580 isl.isl_ast_build_from_context.argtypes = [c_void_p]
5581 isl.isl_ast_build_node_from_schedule.restype = c_void_p
5582 isl.isl_ast_build_node_from_schedule.argtypes = [c_void_p, c_void_p]
5583 isl.isl_ast_build_node_from_schedule_map.restype = c_void_p
5584 isl.isl_ast_build_node_from_schedule_map.argtypes = [c_void_p, c_void_p]
5585 isl.isl_ast_build_get_schedule.restype = c_void_p
5586 isl.isl_ast_build_get_schedule.argtypes = [c_void_p]
5587 isl.isl_ast_build_copy.restype = c_void_p
5588 isl.isl_ast_build_copy.argtypes = [c_void_p]
5589 isl.isl_ast_build_free.restype = c_void_p
5590 isl.isl_ast_build_free.argtypes = [c_void_p]
5592 class ast_expr(object):
5593 def __init__(self, *args, **keywords):
5594 if "ptr" in keywords:
5595 self.ctx = keywords["ctx"]
5596 self.ptr = keywords["ptr"]
5598 if len(args) == 1 and isinstance(args[0], ast_expr_op):
5599 self.ctx = args[0].ctx
5600 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5602 if len(args) == 1 and isinstance(args[0], ast_expr_id):
5603 self.ctx = args[0].ctx
5604 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5606 if len(args) == 1 and isinstance(args[0], ast_expr_int):
5607 self.ctx = args[0].ctx
5608 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5612 if hasattr(self, 'ptr'):
5613 isl.isl_ast_expr_free(self.ptr)
5614 def __new__(cls, *args, **keywords):
5615 if "ptr" in keywords:
5616 type = isl.isl_ast_expr_get_type(keywords["ptr"])
5618 return ast_expr_op(**keywords)
5620 return ast_expr_id(**keywords)
5622 return ast_expr_int(**keywords)
5624 return super(ast_expr, cls).__new__(cls)
5627 if not arg0.__class__ is ast_expr:
5628 arg0 = ast_expr(arg0)
5631 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5632 res = cast(ptr, c_char_p).value.decode('ascii')
5638 return 'isl.ast_expr("""%s""")' % s
5640 return 'isl.ast_expr("%s")' % s
5643 if not arg0.__class__ is ast_expr:
5644 arg0 = ast_expr(arg0)
5648 res = isl.isl_ast_expr_to_C_str(arg0.ptr)
5651 string = cast(res, c_char_p).value.decode('ascii')
5655 isl.isl_ast_expr_to_C_str.restype = POINTER(c_char)
5656 isl.isl_ast_expr_to_C_str.argtypes = [c_void_p]
5657 isl.isl_ast_expr_copy.restype = c_void_p
5658 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5659 isl.isl_ast_expr_free.restype = c_void_p
5660 isl.isl_ast_expr_free.argtypes = [c_void_p]
5661 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5662 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5663 isl.isl_ast_expr_get_type.argtypes = [c_void_p]
5665 class ast_expr_id(ast_expr):
5666 def __init__(self, *args, **keywords):
5667 if "ptr" in keywords:
5668 self.ctx = keywords["ctx"]
5669 self.ptr = keywords["ptr"]
5673 if hasattr(self, 'ptr'):
5674 isl.isl_ast_expr_free(self.ptr)
5675 def __new__(cls, *args, **keywords):
5676 return super(ast_expr_id, cls).__new__(cls)
5679 if not arg0.__class__ is ast_expr_id:
5680 arg0 = ast_expr_id(arg0)
5683 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5684 res = cast(ptr, c_char_p).value.decode('ascii')
5690 return 'isl.ast_expr_id("""%s""")' % s
5692 return 'isl.ast_expr_id("%s")' % s
5695 if not arg0.__class__ is ast_expr:
5696 arg0 = ast_expr(arg0)
5700 res = isl.isl_ast_expr_id_get_id(arg0.ptr)
5701 obj = id(ctx=ctx, ptr=res)
5706 isl.isl_ast_expr_id_get_id.restype = c_void_p
5707 isl.isl_ast_expr_id_get_id.argtypes = [c_void_p]
5708 isl.isl_ast_expr_copy.restype = c_void_p
5709 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5710 isl.isl_ast_expr_free.restype = c_void_p
5711 isl.isl_ast_expr_free.argtypes = [c_void_p]
5712 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5713 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5715 class ast_expr_int(ast_expr):
5716 def __init__(self, *args, **keywords):
5717 if "ptr" in keywords:
5718 self.ctx = keywords["ctx"]
5719 self.ptr = keywords["ptr"]
5723 if hasattr(self, 'ptr'):
5724 isl.isl_ast_expr_free(self.ptr)
5725 def __new__(cls, *args, **keywords):
5726 return super(ast_expr_int, cls).__new__(cls)
5729 if not arg0.__class__ is ast_expr_int:
5730 arg0 = ast_expr_int(arg0)
5733 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5734 res = cast(ptr, c_char_p).value.decode('ascii')
5740 return 'isl.ast_expr_int("""%s""")' % s
5742 return 'isl.ast_expr_int("%s")' % s
5745 if not arg0.__class__ is ast_expr:
5746 arg0 = ast_expr(arg0)
5750 res = isl.isl_ast_expr_int_get_val(arg0.ptr)
5751 obj = val(ctx=ctx, ptr=res)
5756 isl.isl_ast_expr_int_get_val.restype = c_void_p
5757 isl.isl_ast_expr_int_get_val.argtypes = [c_void_p]
5758 isl.isl_ast_expr_copy.restype = c_void_p
5759 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5760 isl.isl_ast_expr_free.restype = c_void_p
5761 isl.isl_ast_expr_free.argtypes = [c_void_p]
5762 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5763 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5765 class ast_expr_op(ast_expr):
5766 def __init__(self, *args, **keywords):
5767 if "ptr" in keywords:
5768 self.ctx = keywords["ctx"]
5769 self.ptr = keywords["ptr"]
5771 if len(args) == 1 and isinstance(args[0], ast_expr_op_and):
5772 self.ctx = args[0].ctx
5773 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5775 if len(args) == 1 and isinstance(args[0], ast_expr_op_and_then):
5776 self.ctx = args[0].ctx
5777 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5779 if len(args) == 1 and isinstance(args[0], ast_expr_op_or):
5780 self.ctx = args[0].ctx
5781 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5783 if len(args) == 1 and isinstance(args[0], ast_expr_op_or_else):
5784 self.ctx = args[0].ctx
5785 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5787 if len(args) == 1 and isinstance(args[0], ast_expr_op_max):
5788 self.ctx = args[0].ctx
5789 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5791 if len(args) == 1 and isinstance(args[0], ast_expr_op_min):
5792 self.ctx = args[0].ctx
5793 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5795 if len(args) == 1 and isinstance(args[0], ast_expr_op_minus):
5796 self.ctx = args[0].ctx
5797 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5799 if len(args) == 1 and isinstance(args[0], ast_expr_op_add):
5800 self.ctx = args[0].ctx
5801 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5803 if len(args) == 1 and isinstance(args[0], ast_expr_op_sub):
5804 self.ctx = args[0].ctx
5805 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5807 if len(args) == 1 and isinstance(args[0], ast_expr_op_mul):
5808 self.ctx = args[0].ctx
5809 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5811 if len(args) == 1 and isinstance(args[0], ast_expr_op_div):
5812 self.ctx = args[0].ctx
5813 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5815 if len(args) == 1 and isinstance(args[0], ast_expr_op_fdiv_q):
5816 self.ctx = args[0].ctx
5817 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5819 if len(args) == 1 and isinstance(args[0], ast_expr_op_pdiv_q):
5820 self.ctx = args[0].ctx
5821 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5823 if len(args) == 1 and isinstance(args[0], ast_expr_op_pdiv_r):
5824 self.ctx = args[0].ctx
5825 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5827 if len(args) == 1 and isinstance(args[0], ast_expr_op_zdiv_r):
5828 self.ctx = args[0].ctx
5829 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5831 if len(args) == 1 and isinstance(args[0], ast_expr_op_cond):
5832 self.ctx = args[0].ctx
5833 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5835 if len(args) == 1 and isinstance(args[0], ast_expr_op_select):
5836 self.ctx = args[0].ctx
5837 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5839 if len(args) == 1 and isinstance(args[0], ast_expr_op_eq):
5840 self.ctx = args[0].ctx
5841 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5843 if len(args) == 1 and isinstance(args[0], ast_expr_op_le):
5844 self.ctx = args[0].ctx
5845 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5847 if len(args) == 1 and isinstance(args[0], ast_expr_op_lt):
5848 self.ctx = args[0].ctx
5849 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5851 if len(args) == 1 and isinstance(args[0], ast_expr_op_ge):
5852 self.ctx = args[0].ctx
5853 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5855 if len(args) == 1 and isinstance(args[0], ast_expr_op_gt):
5856 self.ctx = args[0].ctx
5857 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5859 if len(args) == 1 and isinstance(args[0], ast_expr_op_call):
5860 self.ctx = args[0].ctx
5861 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5863 if len(args) == 1 and isinstance(args[0], ast_expr_op_access):
5864 self.ctx = args[0].ctx
5865 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5867 if len(args) == 1 and isinstance(args[0], ast_expr_op_member):
5868 self.ctx = args[0].ctx
5869 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5871 if len(args) == 1 and isinstance(args[0], ast_expr_op_address_of):
5872 self.ctx = args[0].ctx
5873 self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5877 if hasattr(self, 'ptr'):
5878 isl.isl_ast_expr_free(self.ptr)
5879 def __new__(cls, *args, **keywords):
5880 if "ptr" in keywords:
5881 type = isl.isl_ast_expr_op_get_type(keywords["ptr"])
5883 return ast_expr_op_and(**keywords)
5885 return ast_expr_op_and_then(**keywords)
5887 return ast_expr_op_or(**keywords)
5889 return ast_expr_op_or_else(**keywords)
5891 return ast_expr_op_max(**keywords)
5893 return ast_expr_op_min(**keywords)
5895 return ast_expr_op_minus(**keywords)
5897 return ast_expr_op_add(**keywords)
5899 return ast_expr_op_sub(**keywords)
5901 return ast_expr_op_mul(**keywords)
5903 return ast_expr_op_div(**keywords)
5905 return ast_expr_op_fdiv_q(**keywords)
5907 return ast_expr_op_pdiv_q(**keywords)
5909 return ast_expr_op_pdiv_r(**keywords)
5911 return ast_expr_op_zdiv_r(**keywords)
5913 return ast_expr_op_cond(**keywords)
5915 return ast_expr_op_select(**keywords)
5917 return ast_expr_op_eq(**keywords)
5919 return ast_expr_op_le(**keywords)
5921 return ast_expr_op_lt(**keywords)
5923 return ast_expr_op_ge(**keywords)
5925 return ast_expr_op_gt(**keywords)
5927 return ast_expr_op_call(**keywords)
5929 return ast_expr_op_access(**keywords)
5931 return ast_expr_op_member(**keywords)
5933 return ast_expr_op_address_of(**keywords)
5935 return super(ast_expr_op, cls).__new__(cls)
5938 if not arg0.__class__ is ast_expr_op:
5939 arg0 = ast_expr_op(arg0)
5942 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5943 res = cast(ptr, c_char_p).value.decode('ascii')
5949 return 'isl.ast_expr_op("""%s""")' % s
5951 return 'isl.ast_expr_op("%s")' % s
5952 def arg(arg0, arg1):
5954 if not arg0.__class__ is ast_expr:
5955 arg0 = ast_expr(arg0)
5959 res = isl.isl_ast_expr_op_get_arg(arg0.ptr, arg1)
5960 obj = ast_expr(ctx=ctx, ptr=res)
5962 def get_arg(arg0, arg1):
5963 return arg0.arg(arg1)
5966 if not arg0.__class__ is ast_expr:
5967 arg0 = ast_expr(arg0)
5971 res = isl.isl_ast_expr_op_get_n_arg(arg0.ptr)
5975 def get_n_arg(arg0):
5978 isl.isl_ast_expr_op_get_arg.restype = c_void_p
5979 isl.isl_ast_expr_op_get_arg.argtypes = [c_void_p, c_int]
5980 isl.isl_ast_expr_op_get_n_arg.argtypes = [c_void_p]
5981 isl.isl_ast_expr_copy.restype = c_void_p
5982 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5983 isl.isl_ast_expr_free.restype = c_void_p
5984 isl.isl_ast_expr_free.argtypes = [c_void_p]
5985 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5986 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5987 isl.isl_ast_expr_op_get_type.argtypes = [c_void_p]
5989 class ast_expr_op_access(ast_expr_op):
5990 def __init__(self, *args, **keywords):
5991 if "ptr" in keywords:
5992 self.ctx = keywords["ctx"]
5993 self.ptr = keywords["ptr"]
5997 if hasattr(self, 'ptr'):
5998 isl.isl_ast_expr_free(self.ptr)
5999 def __new__(cls, *args, **keywords):
6000 return super(ast_expr_op_access, cls).__new__(cls)
6003 if not arg0.__class__ is ast_expr_op_access:
6004 arg0 = ast_expr_op_access(arg0)
6007 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6008 res = cast(ptr, c_char_p).value.decode('ascii')
6014 return 'isl.ast_expr_op_access("""%s""")' % s
6016 return 'isl.ast_expr_op_access("%s")' % s
6018 isl.isl_ast_expr_copy.restype = c_void_p
6019 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6020 isl.isl_ast_expr_free.restype = c_void_p
6021 isl.isl_ast_expr_free.argtypes = [c_void_p]
6022 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6023 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6025 class ast_expr_op_add(ast_expr_op):
6026 def __init__(self, *args, **keywords):
6027 if "ptr" in keywords:
6028 self.ctx = keywords["ctx"]
6029 self.ptr = keywords["ptr"]
6033 if hasattr(self, 'ptr'):
6034 isl.isl_ast_expr_free(self.ptr)
6035 def __new__(cls, *args, **keywords):
6036 return super(ast_expr_op_add, cls).__new__(cls)
6039 if not arg0.__class__ is ast_expr_op_add:
6040 arg0 = ast_expr_op_add(arg0)
6043 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6044 res = cast(ptr, c_char_p).value.decode('ascii')
6050 return 'isl.ast_expr_op_add("""%s""")' % s
6052 return 'isl.ast_expr_op_add("%s")' % s
6054 isl.isl_ast_expr_copy.restype = c_void_p
6055 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6056 isl.isl_ast_expr_free.restype = c_void_p
6057 isl.isl_ast_expr_free.argtypes = [c_void_p]
6058 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6059 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6061 class ast_expr_op_address_of(ast_expr_op):
6062 def __init__(self, *args, **keywords):
6063 if "ptr" in keywords:
6064 self.ctx = keywords["ctx"]
6065 self.ptr = keywords["ptr"]
6069 if hasattr(self, 'ptr'):
6070 isl.isl_ast_expr_free(self.ptr)
6071 def __new__(cls, *args, **keywords):
6072 return super(ast_expr_op_address_of, cls).__new__(cls)
6075 if not arg0.__class__ is ast_expr_op_address_of:
6076 arg0 = ast_expr_op_address_of(arg0)
6079 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6080 res = cast(ptr, c_char_p).value.decode('ascii')
6086 return 'isl.ast_expr_op_address_of("""%s""")' % s
6088 return 'isl.ast_expr_op_address_of("%s")' % s
6090 isl.isl_ast_expr_copy.restype = c_void_p
6091 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6092 isl.isl_ast_expr_free.restype = c_void_p
6093 isl.isl_ast_expr_free.argtypes = [c_void_p]
6094 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6095 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6097 class ast_expr_op_and(ast_expr_op):
6098 def __init__(self, *args, **keywords):
6099 if "ptr" in keywords:
6100 self.ctx = keywords["ctx"]
6101 self.ptr = keywords["ptr"]
6105 if hasattr(self, 'ptr'):
6106 isl.isl_ast_expr_free(self.ptr)
6107 def __new__(cls, *args, **keywords):
6108 return super(ast_expr_op_and, cls).__new__(cls)
6111 if not arg0.__class__ is ast_expr_op_and:
6112 arg0 = ast_expr_op_and(arg0)
6115 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6116 res = cast(ptr, c_char_p).value.decode('ascii')
6122 return 'isl.ast_expr_op_and("""%s""")' % s
6124 return 'isl.ast_expr_op_and("%s")' % s
6126 isl.isl_ast_expr_copy.restype = c_void_p
6127 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6128 isl.isl_ast_expr_free.restype = c_void_p
6129 isl.isl_ast_expr_free.argtypes = [c_void_p]
6130 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6131 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6133 class ast_expr_op_and_then(ast_expr_op):
6134 def __init__(self, *args, **keywords):
6135 if "ptr" in keywords:
6136 self.ctx = keywords["ctx"]
6137 self.ptr = keywords["ptr"]
6141 if hasattr(self, 'ptr'):
6142 isl.isl_ast_expr_free(self.ptr)
6143 def __new__(cls, *args, **keywords):
6144 return super(ast_expr_op_and_then, cls).__new__(cls)
6147 if not arg0.__class__ is ast_expr_op_and_then:
6148 arg0 = ast_expr_op_and_then(arg0)
6151 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6152 res = cast(ptr, c_char_p).value.decode('ascii')
6158 return 'isl.ast_expr_op_and_then("""%s""")' % s
6160 return 'isl.ast_expr_op_and_then("%s")' % s
6162 isl.isl_ast_expr_copy.restype = c_void_p
6163 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6164 isl.isl_ast_expr_free.restype = c_void_p
6165 isl.isl_ast_expr_free.argtypes = [c_void_p]
6166 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6167 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6169 class ast_expr_op_call(ast_expr_op):
6170 def __init__(self, *args, **keywords):
6171 if "ptr" in keywords:
6172 self.ctx = keywords["ctx"]
6173 self.ptr = keywords["ptr"]
6177 if hasattr(self, 'ptr'):
6178 isl.isl_ast_expr_free(self.ptr)
6179 def __new__(cls, *args, **keywords):
6180 return super(ast_expr_op_call, cls).__new__(cls)
6183 if not arg0.__class__ is ast_expr_op_call:
6184 arg0 = ast_expr_op_call(arg0)
6187 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6188 res = cast(ptr, c_char_p).value.decode('ascii')
6194 return 'isl.ast_expr_op_call("""%s""")' % s
6196 return 'isl.ast_expr_op_call("%s")' % s
6198 isl.isl_ast_expr_copy.restype = c_void_p
6199 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6200 isl.isl_ast_expr_free.restype = c_void_p
6201 isl.isl_ast_expr_free.argtypes = [c_void_p]
6202 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6203 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6205 class ast_expr_op_cond(ast_expr_op):
6206 def __init__(self, *args, **keywords):
6207 if "ptr" in keywords:
6208 self.ctx = keywords["ctx"]
6209 self.ptr = keywords["ptr"]
6213 if hasattr(self, 'ptr'):
6214 isl.isl_ast_expr_free(self.ptr)
6215 def __new__(cls, *args, **keywords):
6216 return super(ast_expr_op_cond, cls).__new__(cls)
6219 if not arg0.__class__ is ast_expr_op_cond:
6220 arg0 = ast_expr_op_cond(arg0)
6223 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6224 res = cast(ptr, c_char_p).value.decode('ascii')
6230 return 'isl.ast_expr_op_cond("""%s""")' % s
6232 return 'isl.ast_expr_op_cond("%s")' % s
6234 isl.isl_ast_expr_copy.restype = c_void_p
6235 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6236 isl.isl_ast_expr_free.restype = c_void_p
6237 isl.isl_ast_expr_free.argtypes = [c_void_p]
6238 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6239 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6241 class ast_expr_op_div(ast_expr_op):
6242 def __init__(self, *args, **keywords):
6243 if "ptr" in keywords:
6244 self.ctx = keywords["ctx"]
6245 self.ptr = keywords["ptr"]
6249 if hasattr(self, 'ptr'):
6250 isl.isl_ast_expr_free(self.ptr)
6251 def __new__(cls, *args, **keywords):
6252 return super(ast_expr_op_div, cls).__new__(cls)
6255 if not arg0.__class__ is ast_expr_op_div:
6256 arg0 = ast_expr_op_div(arg0)
6259 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6260 res = cast(ptr, c_char_p).value.decode('ascii')
6266 return 'isl.ast_expr_op_div("""%s""")' % s
6268 return 'isl.ast_expr_op_div("%s")' % s
6270 isl.isl_ast_expr_copy.restype = c_void_p
6271 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6272 isl.isl_ast_expr_free.restype = c_void_p
6273 isl.isl_ast_expr_free.argtypes = [c_void_p]
6274 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6275 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6277 class ast_expr_op_eq(ast_expr_op):
6278 def __init__(self, *args, **keywords):
6279 if "ptr" in keywords:
6280 self.ctx = keywords["ctx"]
6281 self.ptr = keywords["ptr"]
6285 if hasattr(self, 'ptr'):
6286 isl.isl_ast_expr_free(self.ptr)
6287 def __new__(cls, *args, **keywords):
6288 return super(ast_expr_op_eq, cls).__new__(cls)
6291 if not arg0.__class__ is ast_expr_op_eq:
6292 arg0 = ast_expr_op_eq(arg0)
6295 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6296 res = cast(ptr, c_char_p).value.decode('ascii')
6302 return 'isl.ast_expr_op_eq("""%s""")' % s
6304 return 'isl.ast_expr_op_eq("%s")' % s
6306 isl.isl_ast_expr_copy.restype = c_void_p
6307 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6308 isl.isl_ast_expr_free.restype = c_void_p
6309 isl.isl_ast_expr_free.argtypes = [c_void_p]
6310 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6311 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6313 class ast_expr_op_fdiv_q(ast_expr_op):
6314 def __init__(self, *args, **keywords):
6315 if "ptr" in keywords:
6316 self.ctx = keywords["ctx"]
6317 self.ptr = keywords["ptr"]
6321 if hasattr(self, 'ptr'):
6322 isl.isl_ast_expr_free(self.ptr)
6323 def __new__(cls, *args, **keywords):
6324 return super(ast_expr_op_fdiv_q, cls).__new__(cls)
6327 if not arg0.__class__ is ast_expr_op_fdiv_q:
6328 arg0 = ast_expr_op_fdiv_q(arg0)
6331 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6332 res = cast(ptr, c_char_p).value.decode('ascii')
6338 return 'isl.ast_expr_op_fdiv_q("""%s""")' % s
6340 return 'isl.ast_expr_op_fdiv_q("%s")' % s
6342 isl.isl_ast_expr_copy.restype = c_void_p
6343 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6344 isl.isl_ast_expr_free.restype = c_void_p
6345 isl.isl_ast_expr_free.argtypes = [c_void_p]
6346 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6347 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6349 class ast_expr_op_ge(ast_expr_op):
6350 def __init__(self, *args, **keywords):
6351 if "ptr" in keywords:
6352 self.ctx = keywords["ctx"]
6353 self.ptr = keywords["ptr"]
6357 if hasattr(self, 'ptr'):
6358 isl.isl_ast_expr_free(self.ptr)
6359 def __new__(cls, *args, **keywords):
6360 return super(ast_expr_op_ge, cls).__new__(cls)
6363 if not arg0.__class__ is ast_expr_op_ge:
6364 arg0 = ast_expr_op_ge(arg0)
6367 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6368 res = cast(ptr, c_char_p).value.decode('ascii')
6374 return 'isl.ast_expr_op_ge("""%s""")' % s
6376 return 'isl.ast_expr_op_ge("%s")' % s
6378 isl.isl_ast_expr_copy.restype = c_void_p
6379 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6380 isl.isl_ast_expr_free.restype = c_void_p
6381 isl.isl_ast_expr_free.argtypes = [c_void_p]
6382 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6383 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6385 class ast_expr_op_gt(ast_expr_op):
6386 def __init__(self, *args, **keywords):
6387 if "ptr" in keywords:
6388 self.ctx = keywords["ctx"]
6389 self.ptr = keywords["ptr"]
6393 if hasattr(self, 'ptr'):
6394 isl.isl_ast_expr_free(self.ptr)
6395 def __new__(cls, *args, **keywords):
6396 return super(ast_expr_op_gt, cls).__new__(cls)
6399 if not arg0.__class__ is ast_expr_op_gt:
6400 arg0 = ast_expr_op_gt(arg0)
6403 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6404 res = cast(ptr, c_char_p).value.decode('ascii')
6410 return 'isl.ast_expr_op_gt("""%s""")' % s
6412 return 'isl.ast_expr_op_gt("%s")' % s
6414 isl.isl_ast_expr_copy.restype = c_void_p
6415 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6416 isl.isl_ast_expr_free.restype = c_void_p
6417 isl.isl_ast_expr_free.argtypes = [c_void_p]
6418 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6419 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6421 class ast_expr_op_le(ast_expr_op):
6422 def __init__(self, *args, **keywords):
6423 if "ptr" in keywords:
6424 self.ctx = keywords["ctx"]
6425 self.ptr = keywords["ptr"]
6429 if hasattr(self, 'ptr'):
6430 isl.isl_ast_expr_free(self.ptr)
6431 def __new__(cls, *args, **keywords):
6432 return super(ast_expr_op_le, cls).__new__(cls)
6435 if not arg0.__class__ is ast_expr_op_le:
6436 arg0 = ast_expr_op_le(arg0)
6439 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6440 res = cast(ptr, c_char_p).value.decode('ascii')
6446 return 'isl.ast_expr_op_le("""%s""")' % s
6448 return 'isl.ast_expr_op_le("%s")' % s
6450 isl.isl_ast_expr_copy.restype = c_void_p
6451 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6452 isl.isl_ast_expr_free.restype = c_void_p
6453 isl.isl_ast_expr_free.argtypes = [c_void_p]
6454 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6455 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6457 class ast_expr_op_lt(ast_expr_op):
6458 def __init__(self, *args, **keywords):
6459 if "ptr" in keywords:
6460 self.ctx = keywords["ctx"]
6461 self.ptr = keywords["ptr"]
6465 if hasattr(self, 'ptr'):
6466 isl.isl_ast_expr_free(self.ptr)
6467 def __new__(cls, *args, **keywords):
6468 return super(ast_expr_op_lt, cls).__new__(cls)
6471 if not arg0.__class__ is ast_expr_op_lt:
6472 arg0 = ast_expr_op_lt(arg0)
6475 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6476 res = cast(ptr, c_char_p).value.decode('ascii')
6482 return 'isl.ast_expr_op_lt("""%s""")' % s
6484 return 'isl.ast_expr_op_lt("%s")' % s
6486 isl.isl_ast_expr_copy.restype = c_void_p
6487 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6488 isl.isl_ast_expr_free.restype = c_void_p
6489 isl.isl_ast_expr_free.argtypes = [c_void_p]
6490 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6491 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6493 class ast_expr_op_max(ast_expr_op):
6494 def __init__(self, *args, **keywords):
6495 if "ptr" in keywords:
6496 self.ctx = keywords["ctx"]
6497 self.ptr = keywords["ptr"]
6501 if hasattr(self, 'ptr'):
6502 isl.isl_ast_expr_free(self.ptr)
6503 def __new__(cls, *args, **keywords):
6504 return super(ast_expr_op_max, cls).__new__(cls)
6507 if not arg0.__class__ is ast_expr_op_max:
6508 arg0 = ast_expr_op_max(arg0)
6511 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6512 res = cast(ptr, c_char_p).value.decode('ascii')
6518 return 'isl.ast_expr_op_max("""%s""")' % s
6520 return 'isl.ast_expr_op_max("%s")' % s
6522 isl.isl_ast_expr_copy.restype = c_void_p
6523 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6524 isl.isl_ast_expr_free.restype = c_void_p
6525 isl.isl_ast_expr_free.argtypes = [c_void_p]
6526 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6527 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6529 class ast_expr_op_member(ast_expr_op):
6530 def __init__(self, *args, **keywords):
6531 if "ptr" in keywords:
6532 self.ctx = keywords["ctx"]
6533 self.ptr = keywords["ptr"]
6537 if hasattr(self, 'ptr'):
6538 isl.isl_ast_expr_free(self.ptr)
6539 def __new__(cls, *args, **keywords):
6540 return super(ast_expr_op_member, cls).__new__(cls)
6543 if not arg0.__class__ is ast_expr_op_member:
6544 arg0 = ast_expr_op_member(arg0)
6547 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6548 res = cast(ptr, c_char_p).value.decode('ascii')
6554 return 'isl.ast_expr_op_member("""%s""")' % s
6556 return 'isl.ast_expr_op_member("%s")' % s
6558 isl.isl_ast_expr_copy.restype = c_void_p
6559 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6560 isl.isl_ast_expr_free.restype = c_void_p
6561 isl.isl_ast_expr_free.argtypes = [c_void_p]
6562 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6563 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6565 class ast_expr_op_min(ast_expr_op):
6566 def __init__(self, *args, **keywords):
6567 if "ptr" in keywords:
6568 self.ctx = keywords["ctx"]
6569 self.ptr = keywords["ptr"]
6573 if hasattr(self, 'ptr'):
6574 isl.isl_ast_expr_free(self.ptr)
6575 def __new__(cls, *args, **keywords):
6576 return super(ast_expr_op_min, cls).__new__(cls)
6579 if not arg0.__class__ is ast_expr_op_min:
6580 arg0 = ast_expr_op_min(arg0)
6583 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6584 res = cast(ptr, c_char_p).value.decode('ascii')
6590 return 'isl.ast_expr_op_min("""%s""")' % s
6592 return 'isl.ast_expr_op_min("%s")' % s
6594 isl.isl_ast_expr_copy.restype = c_void_p
6595 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6596 isl.isl_ast_expr_free.restype = c_void_p
6597 isl.isl_ast_expr_free.argtypes = [c_void_p]
6598 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6599 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6601 class ast_expr_op_minus(ast_expr_op):
6602 def __init__(self, *args, **keywords):
6603 if "ptr" in keywords:
6604 self.ctx = keywords["ctx"]
6605 self.ptr = keywords["ptr"]
6609 if hasattr(self, 'ptr'):
6610 isl.isl_ast_expr_free(self.ptr)
6611 def __new__(cls, *args, **keywords):
6612 return super(ast_expr_op_minus, cls).__new__(cls)
6615 if not arg0.__class__ is ast_expr_op_minus:
6616 arg0 = ast_expr_op_minus(arg0)
6619 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6620 res = cast(ptr, c_char_p).value.decode('ascii')
6626 return 'isl.ast_expr_op_minus("""%s""")' % s
6628 return 'isl.ast_expr_op_minus("%s")' % s
6630 isl.isl_ast_expr_copy.restype = c_void_p
6631 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6632 isl.isl_ast_expr_free.restype = c_void_p
6633 isl.isl_ast_expr_free.argtypes = [c_void_p]
6634 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6635 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6637 class ast_expr_op_mul(ast_expr_op):
6638 def __init__(self, *args, **keywords):
6639 if "ptr" in keywords:
6640 self.ctx = keywords["ctx"]
6641 self.ptr = keywords["ptr"]
6645 if hasattr(self, 'ptr'):
6646 isl.isl_ast_expr_free(self.ptr)
6647 def __new__(cls, *args, **keywords):
6648 return super(ast_expr_op_mul, cls).__new__(cls)
6651 if not arg0.__class__ is ast_expr_op_mul:
6652 arg0 = ast_expr_op_mul(arg0)
6655 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6656 res = cast(ptr, c_char_p).value.decode('ascii')
6662 return 'isl.ast_expr_op_mul("""%s""")' % s
6664 return 'isl.ast_expr_op_mul("%s")' % s
6666 isl.isl_ast_expr_copy.restype = c_void_p
6667 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6668 isl.isl_ast_expr_free.restype = c_void_p
6669 isl.isl_ast_expr_free.argtypes = [c_void_p]
6670 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6671 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6673 class ast_expr_op_or(ast_expr_op):
6674 def __init__(self, *args, **keywords):
6675 if "ptr" in keywords:
6676 self.ctx = keywords["ctx"]
6677 self.ptr = keywords["ptr"]
6681 if hasattr(self, 'ptr'):
6682 isl.isl_ast_expr_free(self.ptr)
6683 def __new__(cls, *args, **keywords):
6684 return super(ast_expr_op_or, cls).__new__(cls)
6687 if not arg0.__class__ is ast_expr_op_or:
6688 arg0 = ast_expr_op_or(arg0)
6691 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6692 res = cast(ptr, c_char_p).value.decode('ascii')
6698 return 'isl.ast_expr_op_or("""%s""")' % s
6700 return 'isl.ast_expr_op_or("%s")' % s
6702 isl.isl_ast_expr_copy.restype = c_void_p
6703 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6704 isl.isl_ast_expr_free.restype = c_void_p
6705 isl.isl_ast_expr_free.argtypes = [c_void_p]
6706 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6707 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6709 class ast_expr_op_or_else(ast_expr_op):
6710 def __init__(self, *args, **keywords):
6711 if "ptr" in keywords:
6712 self.ctx = keywords["ctx"]
6713 self.ptr = keywords["ptr"]
6717 if hasattr(self, 'ptr'):
6718 isl.isl_ast_expr_free(self.ptr)
6719 def __new__(cls, *args, **keywords):
6720 return super(ast_expr_op_or_else, cls).__new__(cls)
6723 if not arg0.__class__ is ast_expr_op_or_else:
6724 arg0 = ast_expr_op_or_else(arg0)
6727 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6728 res = cast(ptr, c_char_p).value.decode('ascii')
6734 return 'isl.ast_expr_op_or_else("""%s""")' % s
6736 return 'isl.ast_expr_op_or_else("%s")' % s
6738 isl.isl_ast_expr_copy.restype = c_void_p
6739 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6740 isl.isl_ast_expr_free.restype = c_void_p
6741 isl.isl_ast_expr_free.argtypes = [c_void_p]
6742 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6743 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6745 class ast_expr_op_pdiv_q(ast_expr_op):
6746 def __init__(self, *args, **keywords):
6747 if "ptr" in keywords:
6748 self.ctx = keywords["ctx"]
6749 self.ptr = keywords["ptr"]
6753 if hasattr(self, 'ptr'):
6754 isl.isl_ast_expr_free(self.ptr)
6755 def __new__(cls, *args, **keywords):
6756 return super(ast_expr_op_pdiv_q, cls).__new__(cls)
6759 if not arg0.__class__ is ast_expr_op_pdiv_q:
6760 arg0 = ast_expr_op_pdiv_q(arg0)
6763 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6764 res = cast(ptr, c_char_p).value.decode('ascii')
6770 return 'isl.ast_expr_op_pdiv_q("""%s""")' % s
6772 return 'isl.ast_expr_op_pdiv_q("%s")' % s
6774 isl.isl_ast_expr_copy.restype = c_void_p
6775 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6776 isl.isl_ast_expr_free.restype = c_void_p
6777 isl.isl_ast_expr_free.argtypes = [c_void_p]
6778 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6779 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6781 class ast_expr_op_pdiv_r(ast_expr_op):
6782 def __init__(self, *args, **keywords):
6783 if "ptr" in keywords:
6784 self.ctx = keywords["ctx"]
6785 self.ptr = keywords["ptr"]
6789 if hasattr(self, 'ptr'):
6790 isl.isl_ast_expr_free(self.ptr)
6791 def __new__(cls, *args, **keywords):
6792 return super(ast_expr_op_pdiv_r, cls).__new__(cls)
6795 if not arg0.__class__ is ast_expr_op_pdiv_r:
6796 arg0 = ast_expr_op_pdiv_r(arg0)
6799 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6800 res = cast(ptr, c_char_p).value.decode('ascii')
6806 return 'isl.ast_expr_op_pdiv_r("""%s""")' % s
6808 return 'isl.ast_expr_op_pdiv_r("%s")' % s
6810 isl.isl_ast_expr_copy.restype = c_void_p
6811 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6812 isl.isl_ast_expr_free.restype = c_void_p
6813 isl.isl_ast_expr_free.argtypes = [c_void_p]
6814 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6815 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6817 class ast_expr_op_select(ast_expr_op):
6818 def __init__(self, *args, **keywords):
6819 if "ptr" in keywords:
6820 self.ctx = keywords["ctx"]
6821 self.ptr = keywords["ptr"]
6825 if hasattr(self, 'ptr'):
6826 isl.isl_ast_expr_free(self.ptr)
6827 def __new__(cls, *args, **keywords):
6828 return super(ast_expr_op_select, cls).__new__(cls)
6831 if not arg0.__class__ is ast_expr_op_select:
6832 arg0 = ast_expr_op_select(arg0)
6835 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6836 res = cast(ptr, c_char_p).value.decode('ascii')
6842 return 'isl.ast_expr_op_select("""%s""")' % s
6844 return 'isl.ast_expr_op_select("%s")' % s
6846 isl.isl_ast_expr_copy.restype = c_void_p
6847 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6848 isl.isl_ast_expr_free.restype = c_void_p
6849 isl.isl_ast_expr_free.argtypes = [c_void_p]
6850 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6851 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6853 class ast_expr_op_sub(ast_expr_op):
6854 def __init__(self, *args, **keywords):
6855 if "ptr" in keywords:
6856 self.ctx = keywords["ctx"]
6857 self.ptr = keywords["ptr"]
6861 if hasattr(self, 'ptr'):
6862 isl.isl_ast_expr_free(self.ptr)
6863 def __new__(cls, *args, **keywords):
6864 return super(ast_expr_op_sub, cls).__new__(cls)
6867 if not arg0.__class__ is ast_expr_op_sub:
6868 arg0 = ast_expr_op_sub(arg0)
6871 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6872 res = cast(ptr, c_char_p).value.decode('ascii')
6878 return 'isl.ast_expr_op_sub("""%s""")' % s
6880 return 'isl.ast_expr_op_sub("%s")' % s
6882 isl.isl_ast_expr_copy.restype = c_void_p
6883 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6884 isl.isl_ast_expr_free.restype = c_void_p
6885 isl.isl_ast_expr_free.argtypes = [c_void_p]
6886 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6887 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6889 class ast_expr_op_zdiv_r(ast_expr_op):
6890 def __init__(self, *args, **keywords):
6891 if "ptr" in keywords:
6892 self.ctx = keywords["ctx"]
6893 self.ptr = keywords["ptr"]
6897 if hasattr(self, 'ptr'):
6898 isl.isl_ast_expr_free(self.ptr)
6899 def __new__(cls, *args, **keywords):
6900 return super(ast_expr_op_zdiv_r, cls).__new__(cls)
6903 if not arg0.__class__ is ast_expr_op_zdiv_r:
6904 arg0 = ast_expr_op_zdiv_r(arg0)
6907 ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6908 res = cast(ptr, c_char_p).value.decode('ascii')
6914 return 'isl.ast_expr_op_zdiv_r("""%s""")' % s
6916 return 'isl.ast_expr_op_zdiv_r("%s")' % s
6918 isl.isl_ast_expr_copy.restype = c_void_p
6919 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6920 isl.isl_ast_expr_free.restype = c_void_p
6921 isl.isl_ast_expr_free.argtypes = [c_void_p]
6922 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6923 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6925 class ast_node(object):
6926 def __init__(self, *args, **keywords):
6927 if "ptr" in keywords:
6928 self.ctx = keywords["ctx"]
6929 self.ptr = keywords["ptr"]
6931 if len(args) == 1 and isinstance(args[0], ast_node_for):
6932 self.ctx = args[0].ctx
6933 self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6935 if len(args) == 1 and isinstance(args[0], ast_node_if):
6936 self.ctx = args[0].ctx
6937 self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6939 if len(args) == 1 and isinstance(args[0], ast_node_block):
6940 self.ctx = args[0].ctx
6941 self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6943 if len(args) == 1 and isinstance(args[0], ast_node_mark):
6944 self.ctx = args[0].ctx
6945 self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6947 if len(args) == 1 and isinstance(args[0], ast_node_user):
6948 self.ctx = args[0].ctx
6949 self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6953 if hasattr(self, 'ptr'):
6954 isl.isl_ast_node_free(self.ptr)
6955 def __new__(cls, *args, **keywords):
6956 if "ptr" in keywords:
6957 type = isl.isl_ast_node_get_type(keywords["ptr"])
6959 return ast_node_for(**keywords)
6961 return ast_node_if(**keywords)
6963 return ast_node_block(**keywords)
6965 return ast_node_mark(**keywords)
6967 return ast_node_user(**keywords)
6969 return super(ast_node, cls).__new__(cls)
6972 if not arg0.__class__ is ast_node:
6973 arg0 = ast_node(arg0)
6976 ptr = isl.isl_ast_node_to_str(arg0.ptr)
6977 res = cast(ptr, c_char_p).value.decode('ascii')
6983 return 'isl.ast_node("""%s""")' % s
6985 return 'isl.ast_node("%s")' % s
6986 def map_descendant_bottom_up(arg0, arg1):
6988 if not arg0.__class__ is ast_node:
6989 arg0 = ast_node(arg0)
6993 fn = CFUNCTYPE(c_void_p, c_void_p, c_void_p)
6994 def cb_func(cb_arg0, cb_arg1):
6995 cb_arg0 = ast_node(ctx=arg0.ctx, ptr=(cb_arg0))
6998 except BaseException as e:
7001 return isl.isl_ast_node_copy(res.ptr)
7004 res = isl.isl_ast_node_map_descendant_bottom_up(isl.isl_ast_node_copy(arg0.ptr), cb1, None)
7005 if exc_info[0] is not None:
7007 obj = ast_node(ctx=ctx, ptr=res)
7011 if not arg0.__class__ is ast_node:
7012 arg0 = ast_node(arg0)
7016 res = isl.isl_ast_node_to_C_str(arg0.ptr)
7019 string = cast(res, c_char_p).value.decode('ascii')
7024 if not arg0.__class__ is ast_node:
7025 arg0 = ast_node(arg0)
7029 res = isl.isl_ast_node_to_list(isl.isl_ast_node_copy(arg0.ptr))
7030 obj = ast_node_list(ctx=ctx, ptr=res)
7033 isl.isl_ast_node_map_descendant_bottom_up.restype = c_void_p
7034 isl.isl_ast_node_map_descendant_bottom_up.argtypes = [c_void_p, c_void_p, c_void_p]
7035 isl.isl_ast_node_to_C_str.restype = POINTER(c_char)
7036 isl.isl_ast_node_to_C_str.argtypes = [c_void_p]
7037 isl.isl_ast_node_to_list.restype = c_void_p
7038 isl.isl_ast_node_to_list.argtypes = [c_void_p]
7039 isl.isl_ast_node_copy.restype = c_void_p
7040 isl.isl_ast_node_copy.argtypes = [c_void_p]
7041 isl.isl_ast_node_free.restype = c_void_p
7042 isl.isl_ast_node_free.argtypes = [c_void_p]
7043 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7044 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7045 isl.isl_ast_node_get_type.argtypes = [c_void_p]
7047 class ast_node_block(ast_node):
7048 def __init__(self, *args, **keywords):
7049 if "ptr" in keywords:
7050 self.ctx = keywords["ctx"]
7051 self.ptr = keywords["ptr"]
7053 if len(args) == 1 and args[0].__class__ is ast_node_list:
7054 self.ctx = Context.getDefaultInstance()
7055 self.ptr = isl.isl_ast_node_block_from_children(isl.isl_ast_node_list_copy(args[0].ptr))
7059 if hasattr(self, 'ptr'):
7060 isl.isl_ast_node_free(self.ptr)
7061 def __new__(cls, *args, **keywords):
7062 return super(ast_node_block, cls).__new__(cls)
7065 if not arg0.__class__ is ast_node_block:
7066 arg0 = ast_node_block(arg0)
7069 ptr = isl.isl_ast_node_to_str(arg0.ptr)
7070 res = cast(ptr, c_char_p).value.decode('ascii')
7076 return 'isl.ast_node_block("""%s""")' % s
7078 return 'isl.ast_node_block("%s")' % s
7081 if not arg0.__class__ is ast_node:
7082 arg0 = ast_node(arg0)
7086 res = isl.isl_ast_node_block_get_children(arg0.ptr)
7087 obj = ast_node_list(ctx=ctx, ptr=res)
7089 def get_children(arg0):
7090 return arg0.children()
7092 isl.isl_ast_node_block_from_children.restype = c_void_p
7093 isl.isl_ast_node_block_from_children.argtypes = [c_void_p]
7094 isl.isl_ast_node_block_get_children.restype = c_void_p
7095 isl.isl_ast_node_block_get_children.argtypes = [c_void_p]
7096 isl.isl_ast_node_copy.restype = c_void_p
7097 isl.isl_ast_node_copy.argtypes = [c_void_p]
7098 isl.isl_ast_node_free.restype = c_void_p
7099 isl.isl_ast_node_free.argtypes = [c_void_p]
7100 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7101 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7103 class ast_node_for(ast_node):
7104 def __init__(self, *args, **keywords):
7105 if "ptr" in keywords:
7106 self.ctx = keywords["ctx"]
7107 self.ptr = keywords["ptr"]
7111 if hasattr(self, 'ptr'):
7112 isl.isl_ast_node_free(self.ptr)
7113 def __new__(cls, *args, **keywords):
7114 return super(ast_node_for, cls).__new__(cls)
7117 if not arg0.__class__ is ast_node_for:
7118 arg0 = ast_node_for(arg0)
7121 ptr = isl.isl_ast_node_to_str(arg0.ptr)
7122 res = cast(ptr, c_char_p).value.decode('ascii')
7128 return 'isl.ast_node_for("""%s""")' % s
7130 return 'isl.ast_node_for("%s")' % s
7133 if not arg0.__class__ is ast_node:
7134 arg0 = ast_node(arg0)
7138 res = isl.isl_ast_node_for_get_body(arg0.ptr)
7139 obj = ast_node(ctx=ctx, ptr=res)
7145 if not arg0.__class__ is ast_node:
7146 arg0 = ast_node(arg0)
7150 res = isl.isl_ast_node_for_get_cond(arg0.ptr)
7151 obj = ast_expr(ctx=ctx, ptr=res)
7157 if not arg0.__class__ is ast_node:
7158 arg0 = ast_node(arg0)
7162 res = isl.isl_ast_node_for_get_inc(arg0.ptr)
7163 obj = ast_expr(ctx=ctx, ptr=res)
7169 if not arg0.__class__ is ast_node:
7170 arg0 = ast_node(arg0)
7174 res = isl.isl_ast_node_for_get_init(arg0.ptr)
7175 obj = ast_expr(ctx=ctx, ptr=res)
7179 def is_degenerate(arg0):
7181 if not arg0.__class__ is ast_node:
7182 arg0 = ast_node(arg0)
7186 res = isl.isl_ast_node_for_is_degenerate(arg0.ptr)
7192 if not arg0.__class__ is ast_node:
7193 arg0 = ast_node(arg0)
7197 res = isl.isl_ast_node_for_get_iterator(arg0.ptr)
7198 obj = ast_expr(ctx=ctx, ptr=res)
7200 def get_iterator(arg0):
7201 return arg0.iterator()
7203 isl.isl_ast_node_for_get_body.restype = c_void_p
7204 isl.isl_ast_node_for_get_body.argtypes = [c_void_p]
7205 isl.isl_ast_node_for_get_cond.restype = c_void_p
7206 isl.isl_ast_node_for_get_cond.argtypes = [c_void_p]
7207 isl.isl_ast_node_for_get_inc.restype = c_void_p
7208 isl.isl_ast_node_for_get_inc.argtypes = [c_void_p]
7209 isl.isl_ast_node_for_get_init.restype = c_void_p
7210 isl.isl_ast_node_for_get_init.argtypes = [c_void_p]
7211 isl.isl_ast_node_for_is_degenerate.argtypes = [c_void_p]
7212 isl.isl_ast_node_for_get_iterator.restype = c_void_p
7213 isl.isl_ast_node_for_get_iterator.argtypes = [c_void_p]
7214 isl.isl_ast_node_copy.restype = c_void_p
7215 isl.isl_ast_node_copy.argtypes = [c_void_p]
7216 isl.isl_ast_node_free.restype = c_void_p
7217 isl.isl_ast_node_free.argtypes = [c_void_p]
7218 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7219 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7221 class ast_node_if(ast_node):
7222 def __init__(self, *args, **keywords):
7223 if "ptr" in keywords:
7224 self.ctx = keywords["ctx"]
7225 self.ptr = keywords["ptr"]
7229 if hasattr(self, 'ptr'):
7230 isl.isl_ast_node_free(self.ptr)
7231 def __new__(cls, *args, **keywords):
7232 return super(ast_node_if, cls).__new__(cls)
7235 if not arg0.__class__ is ast_node_if:
7236 arg0 = ast_node_if(arg0)
7239 ptr = isl.isl_ast_node_to_str(arg0.ptr)
7240 res = cast(ptr, c_char_p).value.decode('ascii')
7246 return 'isl.ast_node_if("""%s""")' % s
7248 return 'isl.ast_node_if("%s")' % s
7251 if not arg0.__class__ is ast_node:
7252 arg0 = ast_node(arg0)
7256 res = isl.isl_ast_node_if_get_cond(arg0.ptr)
7257 obj = ast_expr(ctx=ctx, ptr=res)
7261 def else_node(arg0):
7263 if not arg0.__class__ is ast_node:
7264 arg0 = ast_node(arg0)
7268 res = isl.isl_ast_node_if_get_else_node(arg0.ptr)
7269 obj = ast_node(ctx=ctx, ptr=res)
7271 def get_else_node(arg0):
7272 return arg0.else_node()
7273 def has_else_node(arg0):
7275 if not arg0.__class__ is ast_node:
7276 arg0 = ast_node(arg0)
7280 res = isl.isl_ast_node_if_has_else_node(arg0.ptr)
7284 def then_node(arg0):
7286 if not arg0.__class__ is ast_node:
7287 arg0 = ast_node(arg0)
7291 res = isl.isl_ast_node_if_get_then_node(arg0.ptr)
7292 obj = ast_node(ctx=ctx, ptr=res)
7294 def get_then_node(arg0):
7295 return arg0.then_node()
7297 isl.isl_ast_node_if_get_cond.restype = c_void_p
7298 isl.isl_ast_node_if_get_cond.argtypes = [c_void_p]
7299 isl.isl_ast_node_if_get_else_node.restype = c_void_p
7300 isl.isl_ast_node_if_get_else_node.argtypes = [c_void_p]
7301 isl.isl_ast_node_if_has_else_node.argtypes = [c_void_p]
7302 isl.isl_ast_node_if_get_then_node.restype = c_void_p
7303 isl.isl_ast_node_if_get_then_node.argtypes = [c_void_p]
7304 isl.isl_ast_node_copy.restype = c_void_p
7305 isl.isl_ast_node_copy.argtypes = [c_void_p]
7306 isl.isl_ast_node_free.restype = c_void_p
7307 isl.isl_ast_node_free.argtypes = [c_void_p]
7308 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7309 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7311 class ast_node_list(object):
7312 def __init__(self, *args, **keywords):
7313 if "ptr" in keywords:
7314 self.ctx = keywords["ctx"]
7315 self.ptr = keywords["ptr"]
7317 if len(args) == 1 and type(args[0]) == int:
7318 self.ctx = Context.getDefaultInstance()
7319 self.ptr = isl.isl_ast_node_list_alloc(self.ctx, args[0])
7321 if len(args) == 1 and args[0].__class__ is ast_node:
7322 self.ctx = Context.getDefaultInstance()
7323 self.ptr = isl.isl_ast_node_list_from_ast_node(isl.isl_ast_node_copy(args[0].ptr))
7327 if hasattr(self, 'ptr'):
7328 isl.isl_ast_node_list_free(self.ptr)
7331 if not arg0.__class__ is ast_node_list:
7332 arg0 = ast_node_list(arg0)
7335 ptr = isl.isl_ast_node_list_to_str(arg0.ptr)
7336 res = cast(ptr, c_char_p).value.decode('ascii')
7342 return 'isl.ast_node_list("""%s""")' % s
7344 return 'isl.ast_node_list("%s")' % s
7345 def add(arg0, arg1):
7347 if not arg0.__class__ is ast_node_list:
7348 arg0 = ast_node_list(arg0)
7352 if not arg1.__class__ is ast_node:
7353 arg1 = ast_node(arg1)
7357 res = isl.isl_ast_node_list_add(isl.isl_ast_node_list_copy(arg0.ptr), isl.isl_ast_node_copy(arg1.ptr))
7358 obj = ast_node_list(ctx=ctx, ptr=res)
7362 if not arg0.__class__ is ast_node_list:
7363 arg0 = ast_node_list(arg0)
7367 res = isl.isl_ast_node_list_get_at(arg0.ptr, arg1)
7368 obj = ast_node(ctx=ctx, ptr=res)
7370 def get_at(arg0, arg1):
7371 return arg0.at(arg1)
7374 if not arg0.__class__ is ast_node_list:
7375 arg0 = ast_node_list(arg0)
7379 res = isl.isl_ast_node_list_clear(isl.isl_ast_node_list_copy(arg0.ptr))
7380 obj = ast_node_list(ctx=ctx, ptr=res)
7382 def concat(arg0, arg1):
7384 if not arg0.__class__ is ast_node_list:
7385 arg0 = ast_node_list(arg0)
7389 if not arg1.__class__ is ast_node_list:
7390 arg1 = ast_node_list(arg1)
7394 res = isl.isl_ast_node_list_concat(isl.isl_ast_node_list_copy(arg0.ptr), isl.isl_ast_node_list_copy(arg1.ptr))
7395 obj = ast_node_list(ctx=ctx, ptr=res)
7397 def drop(arg0, arg1, arg2):
7399 if not arg0.__class__ is ast_node_list:
7400 arg0 = ast_node_list(arg0)
7404 res = isl.isl_ast_node_list_drop(isl.isl_ast_node_list_copy(arg0.ptr), arg1, arg2)
7405 obj = ast_node_list(ctx=ctx, ptr=res)
7407 def foreach(arg0, arg1):
7409 if not arg0.__class__ is ast_node_list:
7410 arg0 = ast_node_list(arg0)
7414 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
7415 def cb_func(cb_arg0, cb_arg1):
7416 cb_arg0 = ast_node(ctx=arg0.ctx, ptr=(cb_arg0))
7419 except BaseException as e:
7425 res = isl.isl_ast_node_list_foreach(arg0.ptr, cb1, None)
7426 if exc_info[0] is not None:
7430 def foreach_scc(arg0, arg1, arg2):
7432 if not arg0.__class__ is ast_node_list:
7433 arg0 = ast_node_list(arg0)
7437 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
7438 def cb_func(cb_arg0, cb_arg1, cb_arg2):
7439 cb_arg0 = ast_node(ctx=arg0.ctx, ptr=isl.isl_ast_node_copy(cb_arg0))
7440 cb_arg1 = ast_node(ctx=arg0.ctx, ptr=isl.isl_ast_node_copy(cb_arg1))
7442 res = arg1(cb_arg0, cb_arg1)
7443 except BaseException as e:
7446 return 1 if res else 0
7449 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
7450 def cb_func(cb_arg0, cb_arg1):
7451 cb_arg0 = ast_node_list(ctx=arg0.ctx, ptr=(cb_arg0))
7454 except BaseException as e:
7460 res = isl.isl_ast_node_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
7461 if exc_info[0] is not None:
7465 def insert(arg0, arg1, arg2):
7467 if not arg0.__class__ is ast_node_list:
7468 arg0 = ast_node_list(arg0)
7472 if not arg2.__class__ is ast_node:
7473 arg2 = ast_node(arg2)
7477 res = isl.isl_ast_node_list_insert(isl.isl_ast_node_list_copy(arg0.ptr), arg1, isl.isl_ast_node_copy(arg2.ptr))
7478 obj = ast_node_list(ctx=ctx, ptr=res)
7480 def set_at(arg0, arg1, arg2):
7482 if not arg0.__class__ is ast_node_list:
7483 arg0 = ast_node_list(arg0)
7487 if not arg2.__class__ is ast_node:
7488 arg2 = ast_node(arg2)
7492 res = isl.isl_ast_node_list_set_at(isl.isl_ast_node_list_copy(arg0.ptr), arg1, isl.isl_ast_node_copy(arg2.ptr))
7493 obj = ast_node_list(ctx=ctx, ptr=res)
7497 if not arg0.__class__ is ast_node_list:
7498 arg0 = ast_node_list(arg0)
7502 res = isl.isl_ast_node_list_size(arg0.ptr)
7507 isl.isl_ast_node_list_alloc.restype = c_void_p
7508 isl.isl_ast_node_list_alloc.argtypes = [Context, c_int]
7509 isl.isl_ast_node_list_from_ast_node.restype = c_void_p
7510 isl.isl_ast_node_list_from_ast_node.argtypes = [c_void_p]
7511 isl.isl_ast_node_list_add.restype = c_void_p
7512 isl.isl_ast_node_list_add.argtypes = [c_void_p, c_void_p]
7513 isl.isl_ast_node_list_get_at.restype = c_void_p
7514 isl.isl_ast_node_list_get_at.argtypes = [c_void_p, c_int]
7515 isl.isl_ast_node_list_clear.restype = c_void_p
7516 isl.isl_ast_node_list_clear.argtypes = [c_void_p]
7517 isl.isl_ast_node_list_concat.restype = c_void_p
7518 isl.isl_ast_node_list_concat.argtypes = [c_void_p, c_void_p]
7519 isl.isl_ast_node_list_drop.restype = c_void_p
7520 isl.isl_ast_node_list_drop.argtypes = [c_void_p, c_int, c_int]
7521 isl.isl_ast_node_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
7522 isl.isl_ast_node_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
7523 isl.isl_ast_node_list_insert.restype = c_void_p
7524 isl.isl_ast_node_list_insert.argtypes = [c_void_p, c_int, c_void_p]
7525 isl.isl_ast_node_list_set_at.restype = c_void_p
7526 isl.isl_ast_node_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
7527 isl.isl_ast_node_list_size.argtypes = [c_void_p]
7528 isl.isl_ast_node_list_copy.restype = c_void_p
7529 isl.isl_ast_node_list_copy.argtypes = [c_void_p]
7530 isl.isl_ast_node_list_free.restype = c_void_p
7531 isl.isl_ast_node_list_free.argtypes = [c_void_p]
7532 isl.isl_ast_node_list_to_str.restype = POINTER(c_char)
7533 isl.isl_ast_node_list_to_str.argtypes = [c_void_p]
7535 class ast_node_mark(ast_node):
7536 def __init__(self, *args, **keywords):
7537 if "ptr" in keywords:
7538 self.ctx = keywords["ctx"]
7539 self.ptr = keywords["ptr"]
7543 if hasattr(self, 'ptr'):
7544 isl.isl_ast_node_free(self.ptr)
7545 def __new__(cls, *args, **keywords):
7546 return super(ast_node_mark, cls).__new__(cls)
7549 if not arg0.__class__ is ast_node_mark:
7550 arg0 = ast_node_mark(arg0)
7553 ptr = isl.isl_ast_node_to_str(arg0.ptr)
7554 res = cast(ptr, c_char_p).value.decode('ascii')
7560 return 'isl.ast_node_mark("""%s""")' % s
7562 return 'isl.ast_node_mark("%s")' % s
7565 if not arg0.__class__ is ast_node:
7566 arg0 = ast_node(arg0)
7570 res = isl.isl_ast_node_mark_get_id(arg0.ptr)
7571 obj = id(ctx=ctx, ptr=res)
7577 if not arg0.__class__ is ast_node:
7578 arg0 = ast_node(arg0)
7582 res = isl.isl_ast_node_mark_get_node(arg0.ptr)
7583 obj = ast_node(ctx=ctx, ptr=res)
7588 isl.isl_ast_node_mark_get_id.restype = c_void_p
7589 isl.isl_ast_node_mark_get_id.argtypes = [c_void_p]
7590 isl.isl_ast_node_mark_get_node.restype = c_void_p
7591 isl.isl_ast_node_mark_get_node.argtypes = [c_void_p]
7592 isl.isl_ast_node_copy.restype = c_void_p
7593 isl.isl_ast_node_copy.argtypes = [c_void_p]
7594 isl.isl_ast_node_free.restype = c_void_p
7595 isl.isl_ast_node_free.argtypes = [c_void_p]
7596 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7597 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7599 class ast_node_user(ast_node):
7600 def __init__(self, *args, **keywords):
7601 if "ptr" in keywords:
7602 self.ctx = keywords["ctx"]
7603 self.ptr = keywords["ptr"]
7605 if len(args) == 1 and args[0].__class__ is ast_expr:
7606 self.ctx = Context.getDefaultInstance()
7607 self.ptr = isl.isl_ast_node_user_from_expr(isl.isl_ast_expr_copy(args[0].ptr))
7611 if hasattr(self, 'ptr'):
7612 isl.isl_ast_node_free(self.ptr)
7613 def __new__(cls, *args, **keywords):
7614 return super(ast_node_user, cls).__new__(cls)
7617 if not arg0.__class__ is ast_node_user:
7618 arg0 = ast_node_user(arg0)
7621 ptr = isl.isl_ast_node_to_str(arg0.ptr)
7622 res = cast(ptr, c_char_p).value.decode('ascii')
7628 return 'isl.ast_node_user("""%s""")' % s
7630 return 'isl.ast_node_user("%s")' % s
7633 if not arg0.__class__ is ast_node:
7634 arg0 = ast_node(arg0)
7638 res = isl.isl_ast_node_user_get_expr(arg0.ptr)
7639 obj = ast_expr(ctx=ctx, ptr=res)
7644 isl.isl_ast_node_user_from_expr.restype = c_void_p
7645 isl.isl_ast_node_user_from_expr.argtypes = [c_void_p]
7646 isl.isl_ast_node_user_get_expr.restype = c_void_p
7647 isl.isl_ast_node_user_get_expr.argtypes = [c_void_p]
7648 isl.isl_ast_node_copy.restype = c_void_p
7649 isl.isl_ast_node_copy.argtypes = [c_void_p]
7650 isl.isl_ast_node_free.restype = c_void_p
7651 isl.isl_ast_node_free.argtypes = [c_void_p]
7652 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7653 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7655 class union_map(object):
7656 def __init__(self, *args, **keywords):
7657 if "ptr" in keywords:
7658 self.ctx = keywords["ctx"]
7659 self.ptr = keywords["ptr"]
7661 if len(args) == 1 and args[0].__class__ is basic_map:
7662 self.ctx = Context.getDefaultInstance()
7663 self.ptr = isl.isl_union_map_from_basic_map(isl.isl_basic_map_copy(args[0].ptr))
7665 if len(args) == 1 and args[0].__class__ is map:
7666 self.ctx = Context.getDefaultInstance()
7667 self.ptr = isl.isl_union_map_from_map(isl.isl_map_copy(args[0].ptr))
7669 if len(args) == 1 and type(args[0]) == str:
7670 self.ctx = Context.getDefaultInstance()
7671 self.ptr = isl.isl_union_map_read_from_str(self.ctx, args[0].encode('ascii'))
7675 if hasattr(self, 'ptr'):
7676 isl.isl_union_map_free(self.ptr)
7679 if not arg0.__class__ is union_map:
7680 arg0 = union_map(arg0)
7683 ptr = isl.isl_union_map_to_str(arg0.ptr)
7684 res = cast(ptr, c_char_p).value.decode('ascii')
7690 return 'isl.union_map("""%s""")' % s
7692 return 'isl.union_map("%s")' % s
7693 def affine_hull(arg0):
7695 if not arg0.__class__ is union_map:
7696 arg0 = union_map(arg0)
7700 res = isl.isl_union_map_affine_hull(isl.isl_union_map_copy(arg0.ptr))
7701 obj = union_map(ctx=ctx, ptr=res)
7703 def apply_domain(arg0, arg1):
7705 if not arg0.__class__ is union_map:
7706 arg0 = union_map(arg0)
7710 if not arg1.__class__ is union_map:
7711 arg1 = union_map(arg1)
7715 res = isl.isl_union_map_apply_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
7716 obj = union_map(ctx=ctx, ptr=res)
7718 def apply_range(arg0, arg1):
7720 if not arg0.__class__ is union_map:
7721 arg0 = union_map(arg0)
7725 if not arg1.__class__ is union_map:
7726 arg1 = union_map(arg1)
7730 res = isl.isl_union_map_apply_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
7731 obj = union_map(ctx=ctx, ptr=res)
7735 if not arg0.__class__ is union_map:
7736 arg0 = union_map(arg0)
7740 res = isl.isl_union_map_as_map(isl.isl_union_map_copy(arg0.ptr))
7741 obj = map(ctx=ctx, ptr=res)
7743 def as_multi_union_pw_aff(arg0):
7745 if not arg0.__class__ is union_map:
7746 arg0 = union_map(arg0)
7750 res = isl.isl_union_map_as_multi_union_pw_aff(isl.isl_union_map_copy(arg0.ptr))
7751 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
7753 def as_union_pw_multi_aff(arg0):
7755 if not arg0.__class__ is union_map:
7756 arg0 = union_map(arg0)
7760 res = isl.isl_union_map_as_union_pw_multi_aff(isl.isl_union_map_copy(arg0.ptr))
7761 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
7763 def bind_range(arg0, arg1):
7765 if not arg0.__class__ is union_map:
7766 arg0 = union_map(arg0)
7770 if not arg1.__class__ is multi_id:
7771 arg1 = multi_id(arg1)
7775 res = isl.isl_union_map_bind_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
7776 obj = union_set(ctx=ctx, ptr=res)
7780 if not arg0.__class__ is union_map:
7781 arg0 = union_map(arg0)
7785 res = isl.isl_union_map_coalesce(isl.isl_union_map_copy(arg0.ptr))
7786 obj = union_map(ctx=ctx, ptr=res)
7788 def compute_divs(arg0):
7790 if not arg0.__class__ is union_map:
7791 arg0 = union_map(arg0)
7795 res = isl.isl_union_map_compute_divs(isl.isl_union_map_copy(arg0.ptr))
7796 obj = union_map(ctx=ctx, ptr=res)
7800 if not arg0.__class__ is union_map:
7801 arg0 = union_map(arg0)
7805 res = isl.isl_union_map_curry(isl.isl_union_map_copy(arg0.ptr))
7806 obj = union_map(ctx=ctx, ptr=res)
7810 if not arg0.__class__ is union_map:
7811 arg0 = union_map(arg0)
7815 res = isl.isl_union_map_deltas(isl.isl_union_map_copy(arg0.ptr))
7816 obj = union_set(ctx=ctx, ptr=res)
7818 def detect_equalities(arg0):
7820 if not arg0.__class__ is union_map:
7821 arg0 = union_map(arg0)
7825 res = isl.isl_union_map_detect_equalities(isl.isl_union_map_copy(arg0.ptr))
7826 obj = union_map(ctx=ctx, ptr=res)
7830 if not arg0.__class__ is union_map:
7831 arg0 = union_map(arg0)
7835 res = isl.isl_union_map_domain(isl.isl_union_map_copy(arg0.ptr))
7836 obj = union_set(ctx=ctx, ptr=res)
7838 def domain_factor_domain(arg0):
7840 if not arg0.__class__ is union_map:
7841 arg0 = union_map(arg0)
7845 res = isl.isl_union_map_domain_factor_domain(isl.isl_union_map_copy(arg0.ptr))
7846 obj = union_map(ctx=ctx, ptr=res)
7848 def domain_factor_range(arg0):
7850 if not arg0.__class__ is union_map:
7851 arg0 = union_map(arg0)
7855 res = isl.isl_union_map_domain_factor_range(isl.isl_union_map_copy(arg0.ptr))
7856 obj = union_map(ctx=ctx, ptr=res)
7858 def domain_map(arg0):
7860 if not arg0.__class__ is union_map:
7861 arg0 = union_map(arg0)
7865 res = isl.isl_union_map_domain_map(isl.isl_union_map_copy(arg0.ptr))
7866 obj = union_map(ctx=ctx, ptr=res)
7868 def domain_map_union_pw_multi_aff(arg0):
7870 if not arg0.__class__ is union_map:
7871 arg0 = union_map(arg0)
7875 res = isl.isl_union_map_domain_map_union_pw_multi_aff(isl.isl_union_map_copy(arg0.ptr))
7876 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
7878 def domain_product(arg0, arg1):
7880 if not arg0.__class__ is union_map:
7881 arg0 = union_map(arg0)
7885 if not arg1.__class__ is union_map:
7886 arg1 = union_map(arg1)
7890 res = isl.isl_union_map_domain_product(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
7891 obj = union_map(ctx=ctx, ptr=res)
7893 def domain_reverse(arg0):
7895 if not arg0.__class__ is union_map:
7896 arg0 = union_map(arg0)
7900 res = isl.isl_union_map_domain_reverse(isl.isl_union_map_copy(arg0.ptr))
7901 obj = union_map(ctx=ctx, ptr=res)
7903 def drop_unused_params(arg0):
7905 if not arg0.__class__ is union_map:
7906 arg0 = union_map(arg0)
7910 res = isl.isl_union_map_drop_unused_params(isl.isl_union_map_copy(arg0.ptr))
7911 obj = union_map(ctx=ctx, ptr=res)
7916 ctx = Context.getDefaultInstance()
7917 res = isl.isl_union_map_empty_ctx(ctx)
7918 obj = union_map(ctx=ctx, ptr=res)
7922 if len(args) == 2 and args[1].__class__ is multi_union_pw_aff:
7925 if not args[0].__class__ is union_map:
7926 args[0] = union_map(args[0])
7930 res = isl.isl_union_map_eq_at_multi_union_pw_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_union_pw_aff_copy(args[1].ptr))
7931 obj = union_map(ctx=ctx, ptr=res)
7934 def every_map(arg0, arg1):
7936 if not arg0.__class__ is union_map:
7937 arg0 = union_map(arg0)
7941 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
7942 def cb_func(cb_arg0, cb_arg1):
7943 cb_arg0 = map(ctx=arg0.ctx, ptr=isl.isl_map_copy(cb_arg0))
7946 except BaseException as e:
7949 return 1 if res else 0
7952 res = isl.isl_union_map_every_map(arg0.ptr, cb1, None)
7953 if exc_info[0] is not None:
7958 def extract_map(arg0, arg1):
7960 if not arg0.__class__ is union_map:
7961 arg0 = union_map(arg0)
7965 if not arg1.__class__ is space:
7970 res = isl.isl_union_map_extract_map(arg0.ptr, isl.isl_space_copy(arg1.ptr))
7971 obj = map(ctx=ctx, ptr=res)
7973 def factor_domain(arg0):
7975 if not arg0.__class__ is union_map:
7976 arg0 = union_map(arg0)
7980 res = isl.isl_union_map_factor_domain(isl.isl_union_map_copy(arg0.ptr))
7981 obj = union_map(ctx=ctx, ptr=res)
7983 def factor_range(arg0):
7985 if not arg0.__class__ is union_map:
7986 arg0 = union_map(arg0)
7990 res = isl.isl_union_map_factor_range(isl.isl_union_map_copy(arg0.ptr))
7991 obj = union_map(ctx=ctx, ptr=res)
7993 def fixed_power(*args):
7994 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
7997 if not args[0].__class__ is union_map:
7998 args[0] = union_map(args[0])
8002 if not args[1].__class__ is val:
8003 args[1] = val(args[1])
8007 res = isl.isl_union_map_fixed_power_val(isl.isl_union_map_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
8008 obj = union_map(ctx=ctx, ptr=res)
8011 def foreach_map(arg0, arg1):
8013 if not arg0.__class__ is union_map:
8014 arg0 = union_map(arg0)
8018 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
8019 def cb_func(cb_arg0, cb_arg1):
8020 cb_arg0 = map(ctx=arg0.ctx, ptr=(cb_arg0))
8023 except BaseException as e:
8029 res = isl.isl_union_map_foreach_map(arg0.ptr, cb1, None)
8030 if exc_info[0] is not None:
8035 def convert_from(*args):
8036 if len(args) == 1 and args[0].__class__ is multi_union_pw_aff:
8038 res = isl.isl_union_map_from_multi_union_pw_aff(isl.isl_multi_union_pw_aff_copy(args[0].ptr))
8039 obj = union_map(ctx=ctx, ptr=res)
8041 if len(args) == 1 and args[0].__class__ is union_pw_multi_aff:
8043 res = isl.isl_union_map_from_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr))
8044 obj = union_map(ctx=ctx, ptr=res)
8048 def from_domain(arg0):
8050 if not arg0.__class__ is union_set:
8051 arg0 = union_set(arg0)
8055 res = isl.isl_union_map_from_domain(isl.isl_union_set_copy(arg0.ptr))
8056 obj = union_map(ctx=ctx, ptr=res)
8059 def from_domain_and_range(arg0, arg1):
8061 if not arg0.__class__ is union_set:
8062 arg0 = union_set(arg0)
8066 if not arg1.__class__ is union_set:
8067 arg1 = union_set(arg1)
8071 res = isl.isl_union_map_from_domain_and_range(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8072 obj = union_map(ctx=ctx, ptr=res)
8075 def from_range(arg0):
8077 if not arg0.__class__ is union_set:
8078 arg0 = union_set(arg0)
8082 res = isl.isl_union_map_from_range(isl.isl_union_set_copy(arg0.ptr))
8083 obj = union_map(ctx=ctx, ptr=res)
8085 def gist(arg0, arg1):
8087 if not arg0.__class__ is union_map:
8088 arg0 = union_map(arg0)
8092 if not arg1.__class__ is union_map:
8093 arg1 = union_map(arg1)
8097 res = isl.isl_union_map_gist(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8098 obj = union_map(ctx=ctx, ptr=res)
8100 def gist_domain(arg0, arg1):
8102 if not arg0.__class__ is union_map:
8103 arg0 = union_map(arg0)
8107 if not arg1.__class__ is union_set:
8108 arg1 = union_set(arg1)
8112 res = isl.isl_union_map_gist_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8113 obj = union_map(ctx=ctx, ptr=res)
8115 def gist_params(arg0, arg1):
8117 if not arg0.__class__ is union_map:
8118 arg0 = union_map(arg0)
8122 if not arg1.__class__ is set:
8127 res = isl.isl_union_map_gist_params(isl.isl_union_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
8128 obj = union_map(ctx=ctx, ptr=res)
8130 def gist_range(arg0, arg1):
8132 if not arg0.__class__ is union_map:
8133 arg0 = union_map(arg0)
8137 if not arg1.__class__ is union_set:
8138 arg1 = union_set(arg1)
8142 res = isl.isl_union_map_gist_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8143 obj = union_map(ctx=ctx, ptr=res)
8145 def intersect(arg0, arg1):
8147 if not arg0.__class__ is union_map:
8148 arg0 = union_map(arg0)
8152 if not arg1.__class__ is union_map:
8153 arg1 = union_map(arg1)
8157 res = isl.isl_union_map_intersect(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8158 obj = union_map(ctx=ctx, ptr=res)
8160 def intersect_domain(*args):
8161 if len(args) == 2 and args[1].__class__ is space:
8164 if not args[0].__class__ is union_map:
8165 args[0] = union_map(args[0])
8169 res = isl.isl_union_map_intersect_domain_space(isl.isl_union_map_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
8170 obj = union_map(ctx=ctx, ptr=res)
8172 if len(args) == 2 and args[1].__class__ is union_set:
8175 if not args[0].__class__ is union_map:
8176 args[0] = union_map(args[0])
8180 res = isl.isl_union_map_intersect_domain_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8181 obj = union_map(ctx=ctx, ptr=res)
8184 def intersect_domain_factor_domain(arg0, arg1):
8186 if not arg0.__class__ is union_map:
8187 arg0 = union_map(arg0)
8191 if not arg1.__class__ is union_map:
8192 arg1 = union_map(arg1)
8196 res = isl.isl_union_map_intersect_domain_factor_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8197 obj = union_map(ctx=ctx, ptr=res)
8199 def intersect_domain_factor_range(arg0, arg1):
8201 if not arg0.__class__ is union_map:
8202 arg0 = union_map(arg0)
8206 if not arg1.__class__ is union_map:
8207 arg1 = union_map(arg1)
8211 res = isl.isl_union_map_intersect_domain_factor_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8212 obj = union_map(ctx=ctx, ptr=res)
8214 def intersect_domain_wrapped_domain(*args):
8215 if len(args) == 2 and args[1].__class__ is union_set:
8218 if not args[0].__class__ is union_map:
8219 args[0] = union_map(args[0])
8223 res = isl.isl_union_map_intersect_domain_wrapped_domain_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8224 obj = union_map(ctx=ctx, ptr=res)
8227 def intersect_params(arg0, arg1):
8229 if not arg0.__class__ is union_map:
8230 arg0 = union_map(arg0)
8234 if not arg1.__class__ is set:
8239 res = isl.isl_union_map_intersect_params(isl.isl_union_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
8240 obj = union_map(ctx=ctx, ptr=res)
8242 def intersect_range(*args):
8243 if len(args) == 2 and args[1].__class__ is space:
8246 if not args[0].__class__ is union_map:
8247 args[0] = union_map(args[0])
8251 res = isl.isl_union_map_intersect_range_space(isl.isl_union_map_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
8252 obj = union_map(ctx=ctx, ptr=res)
8254 if len(args) == 2 and args[1].__class__ is union_set:
8257 if not args[0].__class__ is union_map:
8258 args[0] = union_map(args[0])
8262 res = isl.isl_union_map_intersect_range_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8263 obj = union_map(ctx=ctx, ptr=res)
8266 def intersect_range_factor_domain(arg0, arg1):
8268 if not arg0.__class__ is union_map:
8269 arg0 = union_map(arg0)
8273 if not arg1.__class__ is union_map:
8274 arg1 = union_map(arg1)
8278 res = isl.isl_union_map_intersect_range_factor_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8279 obj = union_map(ctx=ctx, ptr=res)
8281 def intersect_range_factor_range(arg0, arg1):
8283 if not arg0.__class__ is union_map:
8284 arg0 = union_map(arg0)
8288 if not arg1.__class__ is union_map:
8289 arg1 = union_map(arg1)
8293 res = isl.isl_union_map_intersect_range_factor_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8294 obj = union_map(ctx=ctx, ptr=res)
8296 def intersect_range_wrapped_domain(*args):
8297 if len(args) == 2 and args[1].__class__ is union_set:
8300 if not args[0].__class__ is union_map:
8301 args[0] = union_map(args[0])
8305 res = isl.isl_union_map_intersect_range_wrapped_domain_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8306 obj = union_map(ctx=ctx, ptr=res)
8309 def is_bijective(arg0):
8311 if not arg0.__class__ is union_map:
8312 arg0 = union_map(arg0)
8316 res = isl.isl_union_map_is_bijective(arg0.ptr)
8320 def is_disjoint(arg0, arg1):
8322 if not arg0.__class__ is union_map:
8323 arg0 = union_map(arg0)
8327 if not arg1.__class__ is union_map:
8328 arg1 = union_map(arg1)
8332 res = isl.isl_union_map_is_disjoint(arg0.ptr, arg1.ptr)
8338 if not arg0.__class__ is union_map:
8339 arg0 = union_map(arg0)
8343 res = isl.isl_union_map_is_empty(arg0.ptr)
8347 def is_equal(arg0, arg1):
8349 if not arg0.__class__ is union_map:
8350 arg0 = union_map(arg0)
8354 if not arg1.__class__ is union_map:
8355 arg1 = union_map(arg1)
8359 res = isl.isl_union_map_is_equal(arg0.ptr, arg1.ptr)
8363 def is_injective(arg0):
8365 if not arg0.__class__ is union_map:
8366 arg0 = union_map(arg0)
8370 res = isl.isl_union_map_is_injective(arg0.ptr)
8374 def is_single_valued(arg0):
8376 if not arg0.__class__ is union_map:
8377 arg0 = union_map(arg0)
8381 res = isl.isl_union_map_is_single_valued(arg0.ptr)
8385 def is_strict_subset(arg0, arg1):
8387 if not arg0.__class__ is union_map:
8388 arg0 = union_map(arg0)
8392 if not arg1.__class__ is union_map:
8393 arg1 = union_map(arg1)
8397 res = isl.isl_union_map_is_strict_subset(arg0.ptr, arg1.ptr)
8401 def is_subset(arg0, arg1):
8403 if not arg0.__class__ is union_map:
8404 arg0 = union_map(arg0)
8408 if not arg1.__class__ is union_map:
8409 arg1 = union_map(arg1)
8413 res = isl.isl_union_map_is_subset(arg0.ptr, arg1.ptr)
8419 if not arg0.__class__ is union_map:
8420 arg0 = union_map(arg0)
8424 res = isl.isl_union_map_isa_map(arg0.ptr)
8430 if not arg0.__class__ is union_map:
8431 arg0 = union_map(arg0)
8435 res = isl.isl_union_map_lexmax(isl.isl_union_map_copy(arg0.ptr))
8436 obj = union_map(ctx=ctx, ptr=res)
8440 if not arg0.__class__ is union_map:
8441 arg0 = union_map(arg0)
8445 res = isl.isl_union_map_lexmin(isl.isl_union_map_copy(arg0.ptr))
8446 obj = union_map(ctx=ctx, ptr=res)
8450 if not arg0.__class__ is union_map:
8451 arg0 = union_map(arg0)
8455 res = isl.isl_union_map_get_map_list(arg0.ptr)
8456 obj = map_list(ctx=ctx, ptr=res)
8458 def get_map_list(arg0):
8459 return arg0.map_list()
8462 if not arg0.__class__ is union_map:
8463 arg0 = union_map(arg0)
8467 res = isl.isl_union_map_params(isl.isl_union_map_copy(arg0.ptr))
8468 obj = set(ctx=ctx, ptr=res)
8470 def polyhedral_hull(arg0):
8472 if not arg0.__class__ is union_map:
8473 arg0 = union_map(arg0)
8477 res = isl.isl_union_map_polyhedral_hull(isl.isl_union_map_copy(arg0.ptr))
8478 obj = union_map(ctx=ctx, ptr=res)
8480 def preimage_domain(*args):
8481 if len(args) == 2 and args[1].__class__ is multi_aff:
8484 if not args[0].__class__ is union_map:
8485 args[0] = union_map(args[0])
8489 res = isl.isl_union_map_preimage_domain_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
8490 obj = union_map(ctx=ctx, ptr=res)
8492 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
8495 if not args[0].__class__ is union_map:
8496 args[0] = union_map(args[0])
8500 res = isl.isl_union_map_preimage_domain_multi_pw_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
8501 obj = union_map(ctx=ctx, ptr=res)
8503 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
8506 if not args[0].__class__ is union_map:
8507 args[0] = union_map(args[0])
8511 res = isl.isl_union_map_preimage_domain_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
8512 obj = union_map(ctx=ctx, ptr=res)
8514 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
8517 if not args[0].__class__ is union_map:
8518 args[0] = union_map(args[0])
8522 res = isl.isl_union_map_preimage_domain_union_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
8523 obj = union_map(ctx=ctx, ptr=res)
8526 def preimage_range(*args):
8527 if len(args) == 2 and args[1].__class__ is multi_aff:
8530 if not args[0].__class__ is union_map:
8531 args[0] = union_map(args[0])
8535 res = isl.isl_union_map_preimage_range_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
8536 obj = union_map(ctx=ctx, ptr=res)
8538 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
8541 if not args[0].__class__ is union_map:
8542 args[0] = union_map(args[0])
8546 res = isl.isl_union_map_preimage_range_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
8547 obj = union_map(ctx=ctx, ptr=res)
8549 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
8552 if not args[0].__class__ is union_map:
8553 args[0] = union_map(args[0])
8557 res = isl.isl_union_map_preimage_range_union_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
8558 obj = union_map(ctx=ctx, ptr=res)
8561 def product(arg0, arg1):
8563 if not arg0.__class__ is union_map:
8564 arg0 = union_map(arg0)
8568 if not arg1.__class__ is union_map:
8569 arg1 = union_map(arg1)
8573 res = isl.isl_union_map_product(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8574 obj = union_map(ctx=ctx, ptr=res)
8576 def project_out_all_params(arg0):
8578 if not arg0.__class__ is union_map:
8579 arg0 = union_map(arg0)
8583 res = isl.isl_union_map_project_out_all_params(isl.isl_union_map_copy(arg0.ptr))
8584 obj = union_map(ctx=ctx, ptr=res)
8586 def project_out_param(*args):
8587 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
8590 if not args[0].__class__ is union_map:
8591 args[0] = union_map(args[0])
8595 if not args[1].__class__ is id:
8596 args[1] = id(args[1])
8600 res = isl.isl_union_map_project_out_param_id(isl.isl_union_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
8601 obj = union_map(ctx=ctx, ptr=res)
8603 if len(args) == 2 and args[1].__class__ is id_list:
8606 if not args[0].__class__ is union_map:
8607 args[0] = union_map(args[0])
8611 res = isl.isl_union_map_project_out_param_id_list(isl.isl_union_map_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
8612 obj = union_map(ctx=ctx, ptr=res)
8617 if not arg0.__class__ is union_map:
8618 arg0 = union_map(arg0)
8622 res = isl.isl_union_map_range(isl.isl_union_map_copy(arg0.ptr))
8623 obj = union_set(ctx=ctx, ptr=res)
8625 def range_factor_domain(arg0):
8627 if not arg0.__class__ is union_map:
8628 arg0 = union_map(arg0)
8632 res = isl.isl_union_map_range_factor_domain(isl.isl_union_map_copy(arg0.ptr))
8633 obj = union_map(ctx=ctx, ptr=res)
8635 def range_factor_range(arg0):
8637 if not arg0.__class__ is union_map:
8638 arg0 = union_map(arg0)
8642 res = isl.isl_union_map_range_factor_range(isl.isl_union_map_copy(arg0.ptr))
8643 obj = union_map(ctx=ctx, ptr=res)
8645 def range_map(arg0):
8647 if not arg0.__class__ is union_map:
8648 arg0 = union_map(arg0)
8652 res = isl.isl_union_map_range_map(isl.isl_union_map_copy(arg0.ptr))
8653 obj = union_map(ctx=ctx, ptr=res)
8655 def range_product(arg0, arg1):
8657 if not arg0.__class__ is union_map:
8658 arg0 = union_map(arg0)
8662 if not arg1.__class__ is union_map:
8663 arg1 = union_map(arg1)
8667 res = isl.isl_union_map_range_product(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8668 obj = union_map(ctx=ctx, ptr=res)
8670 def range_reverse(arg0):
8672 if not arg0.__class__ is union_map:
8673 arg0 = union_map(arg0)
8677 res = isl.isl_union_map_range_reverse(isl.isl_union_map_copy(arg0.ptr))
8678 obj = union_map(ctx=ctx, ptr=res)
8682 if not arg0.__class__ is union_map:
8683 arg0 = union_map(arg0)
8687 res = isl.isl_union_map_reverse(isl.isl_union_map_copy(arg0.ptr))
8688 obj = union_map(ctx=ctx, ptr=res)
8692 if not arg0.__class__ is union_map:
8693 arg0 = union_map(arg0)
8697 res = isl.isl_union_map_get_space(arg0.ptr)
8698 obj = space(ctx=ctx, ptr=res)
8700 def get_space(arg0):
8702 def subtract(arg0, arg1):
8704 if not arg0.__class__ is union_map:
8705 arg0 = union_map(arg0)
8709 if not arg1.__class__ is union_map:
8710 arg1 = union_map(arg1)
8714 res = isl.isl_union_map_subtract(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8715 obj = union_map(ctx=ctx, ptr=res)
8717 def subtract_domain(arg0, arg1):
8719 if not arg0.__class__ is union_map:
8720 arg0 = union_map(arg0)
8724 if not arg1.__class__ is union_set:
8725 arg1 = union_set(arg1)
8729 res = isl.isl_union_map_subtract_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8730 obj = union_map(ctx=ctx, ptr=res)
8732 def subtract_range(arg0, arg1):
8734 if not arg0.__class__ is union_map:
8735 arg0 = union_map(arg0)
8739 if not arg1.__class__ is union_set:
8740 arg1 = union_set(arg1)
8744 res = isl.isl_union_map_subtract_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8745 obj = union_map(ctx=ctx, ptr=res)
8749 if not arg0.__class__ is union_map:
8750 arg0 = union_map(arg0)
8754 res = isl.isl_union_map_uncurry(isl.isl_union_map_copy(arg0.ptr))
8755 obj = union_map(ctx=ctx, ptr=res)
8757 def union(arg0, arg1):
8759 if not arg0.__class__ is union_map:
8760 arg0 = union_map(arg0)
8764 if not arg1.__class__ is union_map:
8765 arg1 = union_map(arg1)
8769 res = isl.isl_union_map_union(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8770 obj = union_map(ctx=ctx, ptr=res)
8774 if not arg0.__class__ is union_map:
8775 arg0 = union_map(arg0)
8779 res = isl.isl_union_map_universe(isl.isl_union_map_copy(arg0.ptr))
8780 obj = union_map(ctx=ctx, ptr=res)
8784 if not arg0.__class__ is union_map:
8785 arg0 = union_map(arg0)
8789 res = isl.isl_union_map_wrap(isl.isl_union_map_copy(arg0.ptr))
8790 obj = union_set(ctx=ctx, ptr=res)
8794 if not arg0.__class__ is union_map:
8795 arg0 = union_map(arg0)
8799 res = isl.isl_union_map_zip(isl.isl_union_map_copy(arg0.ptr))
8800 obj = union_map(ctx=ctx, ptr=res)
8803 isl.isl_union_map_from_basic_map.restype = c_void_p
8804 isl.isl_union_map_from_basic_map.argtypes = [c_void_p]
8805 isl.isl_union_map_from_map.restype = c_void_p
8806 isl.isl_union_map_from_map.argtypes = [c_void_p]
8807 isl.isl_union_map_read_from_str.restype = c_void_p
8808 isl.isl_union_map_read_from_str.argtypes = [Context, c_char_p]
8809 isl.isl_union_map_affine_hull.restype = c_void_p
8810 isl.isl_union_map_affine_hull.argtypes = [c_void_p]
8811 isl.isl_union_map_apply_domain.restype = c_void_p
8812 isl.isl_union_map_apply_domain.argtypes = [c_void_p, c_void_p]
8813 isl.isl_union_map_apply_range.restype = c_void_p
8814 isl.isl_union_map_apply_range.argtypes = [c_void_p, c_void_p]
8815 isl.isl_union_map_as_map.restype = c_void_p
8816 isl.isl_union_map_as_map.argtypes = [c_void_p]
8817 isl.isl_union_map_as_multi_union_pw_aff.restype = c_void_p
8818 isl.isl_union_map_as_multi_union_pw_aff.argtypes = [c_void_p]
8819 isl.isl_union_map_as_union_pw_multi_aff.restype = c_void_p
8820 isl.isl_union_map_as_union_pw_multi_aff.argtypes = [c_void_p]
8821 isl.isl_union_map_bind_range.restype = c_void_p
8822 isl.isl_union_map_bind_range.argtypes = [c_void_p, c_void_p]
8823 isl.isl_union_map_coalesce.restype = c_void_p
8824 isl.isl_union_map_coalesce.argtypes = [c_void_p]
8825 isl.isl_union_map_compute_divs.restype = c_void_p
8826 isl.isl_union_map_compute_divs.argtypes = [c_void_p]
8827 isl.isl_union_map_curry.restype = c_void_p
8828 isl.isl_union_map_curry.argtypes = [c_void_p]
8829 isl.isl_union_map_deltas.restype = c_void_p
8830 isl.isl_union_map_deltas.argtypes = [c_void_p]
8831 isl.isl_union_map_detect_equalities.restype = c_void_p
8832 isl.isl_union_map_detect_equalities.argtypes = [c_void_p]
8833 isl.isl_union_map_domain.restype = c_void_p
8834 isl.isl_union_map_domain.argtypes = [c_void_p]
8835 isl.isl_union_map_domain_factor_domain.restype = c_void_p
8836 isl.isl_union_map_domain_factor_domain.argtypes = [c_void_p]
8837 isl.isl_union_map_domain_factor_range.restype = c_void_p
8838 isl.isl_union_map_domain_factor_range.argtypes = [c_void_p]
8839 isl.isl_union_map_domain_map.restype = c_void_p
8840 isl.isl_union_map_domain_map.argtypes = [c_void_p]
8841 isl.isl_union_map_domain_map_union_pw_multi_aff.restype = c_void_p
8842 isl.isl_union_map_domain_map_union_pw_multi_aff.argtypes = [c_void_p]
8843 isl.isl_union_map_domain_product.restype = c_void_p
8844 isl.isl_union_map_domain_product.argtypes = [c_void_p, c_void_p]
8845 isl.isl_union_map_domain_reverse.restype = c_void_p
8846 isl.isl_union_map_domain_reverse.argtypes = [c_void_p]
8847 isl.isl_union_map_drop_unused_params.restype = c_void_p
8848 isl.isl_union_map_drop_unused_params.argtypes = [c_void_p]
8849 isl.isl_union_map_empty_ctx.restype = c_void_p
8850 isl.isl_union_map_empty_ctx.argtypes = [Context]
8851 isl.isl_union_map_eq_at_multi_union_pw_aff.restype = c_void_p
8852 isl.isl_union_map_eq_at_multi_union_pw_aff.argtypes = [c_void_p, c_void_p]
8853 isl.isl_union_map_every_map.argtypes = [c_void_p, c_void_p, c_void_p]
8854 isl.isl_union_map_extract_map.restype = c_void_p
8855 isl.isl_union_map_extract_map.argtypes = [c_void_p, c_void_p]
8856 isl.isl_union_map_factor_domain.restype = c_void_p
8857 isl.isl_union_map_factor_domain.argtypes = [c_void_p]
8858 isl.isl_union_map_factor_range.restype = c_void_p
8859 isl.isl_union_map_factor_range.argtypes = [c_void_p]
8860 isl.isl_union_map_fixed_power_val.restype = c_void_p
8861 isl.isl_union_map_fixed_power_val.argtypes = [c_void_p, c_void_p]
8862 isl.isl_union_map_foreach_map.argtypes = [c_void_p, c_void_p, c_void_p]
8863 isl.isl_union_map_from_multi_union_pw_aff.restype = c_void_p
8864 isl.isl_union_map_from_multi_union_pw_aff.argtypes = [c_void_p]
8865 isl.isl_union_map_from_union_pw_multi_aff.restype = c_void_p
8866 isl.isl_union_map_from_union_pw_multi_aff.argtypes = [c_void_p]
8867 isl.isl_union_map_from_domain.restype = c_void_p
8868 isl.isl_union_map_from_domain.argtypes = [c_void_p]
8869 isl.isl_union_map_from_domain_and_range.restype = c_void_p
8870 isl.isl_union_map_from_domain_and_range.argtypes = [c_void_p, c_void_p]
8871 isl.isl_union_map_from_range.restype = c_void_p
8872 isl.isl_union_map_from_range.argtypes = [c_void_p]
8873 isl.isl_union_map_gist.restype = c_void_p
8874 isl.isl_union_map_gist.argtypes = [c_void_p, c_void_p]
8875 isl.isl_union_map_gist_domain.restype = c_void_p
8876 isl.isl_union_map_gist_domain.argtypes = [c_void_p, c_void_p]
8877 isl.isl_union_map_gist_params.restype = c_void_p
8878 isl.isl_union_map_gist_params.argtypes = [c_void_p, c_void_p]
8879 isl.isl_union_map_gist_range.restype = c_void_p
8880 isl.isl_union_map_gist_range.argtypes = [c_void_p, c_void_p]
8881 isl.isl_union_map_intersect.restype = c_void_p
8882 isl.isl_union_map_intersect.argtypes = [c_void_p, c_void_p]
8883 isl.isl_union_map_intersect_domain_space.restype = c_void_p
8884 isl.isl_union_map_intersect_domain_space.argtypes = [c_void_p, c_void_p]
8885 isl.isl_union_map_intersect_domain_union_set.restype = c_void_p
8886 isl.isl_union_map_intersect_domain_union_set.argtypes = [c_void_p, c_void_p]
8887 isl.isl_union_map_intersect_domain_factor_domain.restype = c_void_p
8888 isl.isl_union_map_intersect_domain_factor_domain.argtypes = [c_void_p, c_void_p]
8889 isl.isl_union_map_intersect_domain_factor_range.restype = c_void_p
8890 isl.isl_union_map_intersect_domain_factor_range.argtypes = [c_void_p, c_void_p]
8891 isl.isl_union_map_intersect_domain_wrapped_domain_union_set.restype = c_void_p
8892 isl.isl_union_map_intersect_domain_wrapped_domain_union_set.argtypes = [c_void_p, c_void_p]
8893 isl.isl_union_map_intersect_params.restype = c_void_p
8894 isl.isl_union_map_intersect_params.argtypes = [c_void_p, c_void_p]
8895 isl.isl_union_map_intersect_range_space.restype = c_void_p
8896 isl.isl_union_map_intersect_range_space.argtypes = [c_void_p, c_void_p]
8897 isl.isl_union_map_intersect_range_union_set.restype = c_void_p
8898 isl.isl_union_map_intersect_range_union_set.argtypes = [c_void_p, c_void_p]
8899 isl.isl_union_map_intersect_range_factor_domain.restype = c_void_p
8900 isl.isl_union_map_intersect_range_factor_domain.argtypes = [c_void_p, c_void_p]
8901 isl.isl_union_map_intersect_range_factor_range.restype = c_void_p
8902 isl.isl_union_map_intersect_range_factor_range.argtypes = [c_void_p, c_void_p]
8903 isl.isl_union_map_intersect_range_wrapped_domain_union_set.restype = c_void_p
8904 isl.isl_union_map_intersect_range_wrapped_domain_union_set.argtypes = [c_void_p, c_void_p]
8905 isl.isl_union_map_is_bijective.argtypes = [c_void_p]
8906 isl.isl_union_map_is_disjoint.argtypes = [c_void_p, c_void_p]
8907 isl.isl_union_map_is_empty.argtypes = [c_void_p]
8908 isl.isl_union_map_is_equal.argtypes = [c_void_p, c_void_p]
8909 isl.isl_union_map_is_injective.argtypes = [c_void_p]
8910 isl.isl_union_map_is_single_valued.argtypes = [c_void_p]
8911 isl.isl_union_map_is_strict_subset.argtypes = [c_void_p, c_void_p]
8912 isl.isl_union_map_is_subset.argtypes = [c_void_p, c_void_p]
8913 isl.isl_union_map_isa_map.argtypes = [c_void_p]
8914 isl.isl_union_map_lexmax.restype = c_void_p
8915 isl.isl_union_map_lexmax.argtypes = [c_void_p]
8916 isl.isl_union_map_lexmin.restype = c_void_p
8917 isl.isl_union_map_lexmin.argtypes = [c_void_p]
8918 isl.isl_union_map_get_map_list.restype = c_void_p
8919 isl.isl_union_map_get_map_list.argtypes = [c_void_p]
8920 isl.isl_union_map_params.restype = c_void_p
8921 isl.isl_union_map_params.argtypes = [c_void_p]
8922 isl.isl_union_map_polyhedral_hull.restype = c_void_p
8923 isl.isl_union_map_polyhedral_hull.argtypes = [c_void_p]
8924 isl.isl_union_map_preimage_domain_multi_aff.restype = c_void_p
8925 isl.isl_union_map_preimage_domain_multi_aff.argtypes = [c_void_p, c_void_p]
8926 isl.isl_union_map_preimage_domain_multi_pw_aff.restype = c_void_p
8927 isl.isl_union_map_preimage_domain_multi_pw_aff.argtypes = [c_void_p, c_void_p]
8928 isl.isl_union_map_preimage_domain_pw_multi_aff.restype = c_void_p
8929 isl.isl_union_map_preimage_domain_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8930 isl.isl_union_map_preimage_domain_union_pw_multi_aff.restype = c_void_p
8931 isl.isl_union_map_preimage_domain_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8932 isl.isl_union_map_preimage_range_multi_aff.restype = c_void_p
8933 isl.isl_union_map_preimage_range_multi_aff.argtypes = [c_void_p, c_void_p]
8934 isl.isl_union_map_preimage_range_pw_multi_aff.restype = c_void_p
8935 isl.isl_union_map_preimage_range_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8936 isl.isl_union_map_preimage_range_union_pw_multi_aff.restype = c_void_p
8937 isl.isl_union_map_preimage_range_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8938 isl.isl_union_map_product.restype = c_void_p
8939 isl.isl_union_map_product.argtypes = [c_void_p, c_void_p]
8940 isl.isl_union_map_project_out_all_params.restype = c_void_p
8941 isl.isl_union_map_project_out_all_params.argtypes = [c_void_p]
8942 isl.isl_union_map_project_out_param_id.restype = c_void_p
8943 isl.isl_union_map_project_out_param_id.argtypes = [c_void_p, c_void_p]
8944 isl.isl_union_map_project_out_param_id_list.restype = c_void_p
8945 isl.isl_union_map_project_out_param_id_list.argtypes = [c_void_p, c_void_p]
8946 isl.isl_union_map_range.restype = c_void_p
8947 isl.isl_union_map_range.argtypes = [c_void_p]
8948 isl.isl_union_map_range_factor_domain.restype = c_void_p
8949 isl.isl_union_map_range_factor_domain.argtypes = [c_void_p]
8950 isl.isl_union_map_range_factor_range.restype = c_void_p
8951 isl.isl_union_map_range_factor_range.argtypes = [c_void_p]
8952 isl.isl_union_map_range_map.restype = c_void_p
8953 isl.isl_union_map_range_map.argtypes = [c_void_p]
8954 isl.isl_union_map_range_product.restype = c_void_p
8955 isl.isl_union_map_range_product.argtypes = [c_void_p, c_void_p]
8956 isl.isl_union_map_range_reverse.restype = c_void_p
8957 isl.isl_union_map_range_reverse.argtypes = [c_void_p]
8958 isl.isl_union_map_reverse.restype = c_void_p
8959 isl.isl_union_map_reverse.argtypes = [c_void_p]
8960 isl.isl_union_map_get_space.restype = c_void_p
8961 isl.isl_union_map_get_space.argtypes = [c_void_p]
8962 isl.isl_union_map_subtract.restype = c_void_p
8963 isl.isl_union_map_subtract.argtypes = [c_void_p, c_void_p]
8964 isl.isl_union_map_subtract_domain.restype = c_void_p
8965 isl.isl_union_map_subtract_domain.argtypes = [c_void_p, c_void_p]
8966 isl.isl_union_map_subtract_range.restype = c_void_p
8967 isl.isl_union_map_subtract_range.argtypes = [c_void_p, c_void_p]
8968 isl.isl_union_map_uncurry.restype = c_void_p
8969 isl.isl_union_map_uncurry.argtypes = [c_void_p]
8970 isl.isl_union_map_union.restype = c_void_p
8971 isl.isl_union_map_union.argtypes = [c_void_p, c_void_p]
8972 isl.isl_union_map_universe.restype = c_void_p
8973 isl.isl_union_map_universe.argtypes = [c_void_p]
8974 isl.isl_union_map_wrap.restype = c_void_p
8975 isl.isl_union_map_wrap.argtypes = [c_void_p]
8976 isl.isl_union_map_zip.restype = c_void_p
8977 isl.isl_union_map_zip.argtypes = [c_void_p]
8978 isl.isl_union_map_copy.restype = c_void_p
8979 isl.isl_union_map_copy.argtypes = [c_void_p]
8980 isl.isl_union_map_free.restype = c_void_p
8981 isl.isl_union_map_free.argtypes = [c_void_p]
8982 isl.isl_union_map_to_str.restype = POINTER(c_char)
8983 isl.isl_union_map_to_str.argtypes = [c_void_p]
8985 class map(union_map):
8986 def __init__(self, *args, **keywords):
8987 if "ptr" in keywords:
8988 self.ctx = keywords["ctx"]
8989 self.ptr = keywords["ptr"]
8991 if len(args) == 1 and args[0].__class__ is basic_map:
8992 self.ctx = Context.getDefaultInstance()
8993 self.ptr = isl.isl_map_from_basic_map(isl.isl_basic_map_copy(args[0].ptr))
8995 if len(args) == 1 and type(args[0]) == str:
8996 self.ctx = Context.getDefaultInstance()
8997 self.ptr = isl.isl_map_read_from_str(self.ctx, args[0].encode('ascii'))
9001 if hasattr(self, 'ptr'):
9002 isl.isl_map_free(self.ptr)
9005 if not arg0.__class__ is map:
9009 ptr = isl.isl_map_to_str(arg0.ptr)
9010 res = cast(ptr, c_char_p).value.decode('ascii')
9016 return 'isl.map("""%s""")' % s
9018 return 'isl.map("%s")' % s
9019 def affine_hull(arg0):
9021 if not arg0.__class__ is map:
9026 res = isl.isl_map_affine_hull(isl.isl_map_copy(arg0.ptr))
9027 obj = basic_map(ctx=ctx, ptr=res)
9029 def apply_domain(arg0, arg1):
9031 if not arg0.__class__ is map:
9036 if not arg1.__class__ is map:
9039 return union_map(arg0).apply_domain(arg1)
9041 res = isl.isl_map_apply_domain(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9042 obj = map(ctx=ctx, ptr=res)
9044 def apply_range(arg0, arg1):
9046 if not arg0.__class__ is map:
9051 if not arg1.__class__ is map:
9054 return union_map(arg0).apply_range(arg1)
9056 res = isl.isl_map_apply_range(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9057 obj = map(ctx=ctx, ptr=res)
9059 def as_pw_multi_aff(arg0):
9061 if not arg0.__class__ is map:
9066 res = isl.isl_map_as_pw_multi_aff(isl.isl_map_copy(arg0.ptr))
9067 obj = pw_multi_aff(ctx=ctx, ptr=res)
9069 def bind_domain(arg0, arg1):
9071 if not arg0.__class__ is map:
9076 if not arg1.__class__ is multi_id:
9077 arg1 = multi_id(arg1)
9079 return union_map(arg0).bind_domain(arg1)
9081 res = isl.isl_map_bind_domain(isl.isl_map_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
9082 obj = set(ctx=ctx, ptr=res)
9084 def bind_range(arg0, arg1):
9086 if not arg0.__class__ is map:
9091 if not arg1.__class__ is multi_id:
9092 arg1 = multi_id(arg1)
9094 return union_map(arg0).bind_range(arg1)
9096 res = isl.isl_map_bind_range(isl.isl_map_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
9097 obj = set(ctx=ctx, ptr=res)
9101 if not arg0.__class__ is map:
9106 res = isl.isl_map_coalesce(isl.isl_map_copy(arg0.ptr))
9107 obj = map(ctx=ctx, ptr=res)
9109 def complement(arg0):
9111 if not arg0.__class__ is map:
9116 res = isl.isl_map_complement(isl.isl_map_copy(arg0.ptr))
9117 obj = map(ctx=ctx, ptr=res)
9121 if not arg0.__class__ is map:
9126 res = isl.isl_map_curry(isl.isl_map_copy(arg0.ptr))
9127 obj = map(ctx=ctx, ptr=res)
9131 if not arg0.__class__ is map:
9136 res = isl.isl_map_deltas(isl.isl_map_copy(arg0.ptr))
9137 obj = set(ctx=ctx, ptr=res)
9139 def detect_equalities(arg0):
9141 if not arg0.__class__ is map:
9146 res = isl.isl_map_detect_equalities(isl.isl_map_copy(arg0.ptr))
9147 obj = map(ctx=ctx, ptr=res)
9151 if not arg0.__class__ is map:
9156 res = isl.isl_map_domain(isl.isl_map_copy(arg0.ptr))
9157 obj = set(ctx=ctx, ptr=res)
9159 def domain_factor_domain(arg0):
9161 if not arg0.__class__ is map:
9166 res = isl.isl_map_domain_factor_domain(isl.isl_map_copy(arg0.ptr))
9167 obj = map(ctx=ctx, ptr=res)
9169 def domain_factor_range(arg0):
9171 if not arg0.__class__ is map:
9176 res = isl.isl_map_domain_factor_range(isl.isl_map_copy(arg0.ptr))
9177 obj = map(ctx=ctx, ptr=res)
9179 def domain_product(arg0, arg1):
9181 if not arg0.__class__ is map:
9186 if not arg1.__class__ is map:
9189 return union_map(arg0).domain_product(arg1)
9191 res = isl.isl_map_domain_product(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9192 obj = map(ctx=ctx, ptr=res)
9194 def domain_reverse(arg0):
9196 if not arg0.__class__ is map:
9201 res = isl.isl_map_domain_reverse(isl.isl_map_copy(arg0.ptr))
9202 obj = map(ctx=ctx, ptr=res)
9204 def domain_tuple_dim(arg0):
9206 if not arg0.__class__ is map:
9211 res = isl.isl_map_domain_tuple_dim(arg0.ptr)
9215 def domain_tuple_id(arg0):
9217 if not arg0.__class__ is map:
9222 res = isl.isl_map_get_domain_tuple_id(arg0.ptr)
9223 obj = id(ctx=ctx, ptr=res)
9225 def get_domain_tuple_id(arg0):
9226 return arg0.domain_tuple_id()
9227 def drop_unused_params(arg0):
9229 if not arg0.__class__ is map:
9234 res = isl.isl_map_drop_unused_params(isl.isl_map_copy(arg0.ptr))
9235 obj = map(ctx=ctx, ptr=res)
9240 if not arg0.__class__ is space:
9245 res = isl.isl_map_empty(isl.isl_space_copy(arg0.ptr))
9246 obj = map(ctx=ctx, ptr=res)
9249 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9252 if not args[0].__class__ is map:
9253 args[0] = map(args[0])
9257 res = isl.isl_map_eq_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9258 obj = map(ctx=ctx, ptr=res)
9261 def factor_domain(arg0):
9263 if not arg0.__class__ is map:
9268 res = isl.isl_map_factor_domain(isl.isl_map_copy(arg0.ptr))
9269 obj = map(ctx=ctx, ptr=res)
9271 def factor_range(arg0):
9273 if not arg0.__class__ is map:
9278 res = isl.isl_map_factor_range(isl.isl_map_copy(arg0.ptr))
9279 obj = map(ctx=ctx, ptr=res)
9281 def fixed_power(*args):
9282 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
9285 if not args[0].__class__ is map:
9286 args[0] = map(args[0])
9290 if not args[1].__class__ is val:
9291 args[1] = val(args[1])
9295 res = isl.isl_map_fixed_power_val(isl.isl_map_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
9296 obj = map(ctx=ctx, ptr=res)
9301 if not arg0.__class__ is map:
9306 res = isl.isl_map_flatten(isl.isl_map_copy(arg0.ptr))
9307 obj = map(ctx=ctx, ptr=res)
9309 def flatten_domain(arg0):
9311 if not arg0.__class__ is map:
9316 res = isl.isl_map_flatten_domain(isl.isl_map_copy(arg0.ptr))
9317 obj = map(ctx=ctx, ptr=res)
9319 def flatten_range(arg0):
9321 if not arg0.__class__ is map:
9326 res = isl.isl_map_flatten_range(isl.isl_map_copy(arg0.ptr))
9327 obj = map(ctx=ctx, ptr=res)
9329 def foreach_basic_map(arg0, arg1):
9331 if not arg0.__class__ is map:
9336 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
9337 def cb_func(cb_arg0, cb_arg1):
9338 cb_arg0 = basic_map(ctx=arg0.ctx, ptr=(cb_arg0))
9341 except BaseException as e:
9347 res = isl.isl_map_foreach_basic_map(arg0.ptr, cb1, None)
9348 if exc_info[0] is not None:
9352 def gist(arg0, arg1):
9354 if not arg0.__class__ is map:
9359 if not arg1.__class__ is map:
9362 return union_map(arg0).gist(arg1)
9364 res = isl.isl_map_gist(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9365 obj = map(ctx=ctx, ptr=res)
9367 def gist_domain(arg0, arg1):
9369 if not arg0.__class__ is map:
9374 if not arg1.__class__ is set:
9377 return union_map(arg0).gist_domain(arg1)
9379 res = isl.isl_map_gist_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9380 obj = map(ctx=ctx, ptr=res)
9382 def gist_params(arg0, arg1):
9384 if not arg0.__class__ is map:
9389 if not arg1.__class__ is set:
9392 return union_map(arg0).gist_params(arg1)
9394 res = isl.isl_map_gist_params(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9395 obj = map(ctx=ctx, ptr=res)
9397 def has_domain_tuple_id(arg0):
9399 if not arg0.__class__ is map:
9404 res = isl.isl_map_has_domain_tuple_id(arg0.ptr)
9408 def has_range_tuple_id(arg0):
9410 if not arg0.__class__ is map:
9415 res = isl.isl_map_has_range_tuple_id(arg0.ptr)
9419 def intersect(arg0, arg1):
9421 if not arg0.__class__ is map:
9426 if not arg1.__class__ is map:
9429 return union_map(arg0).intersect(arg1)
9431 res = isl.isl_map_intersect(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9432 obj = map(ctx=ctx, ptr=res)
9434 def intersect_domain(arg0, arg1):
9436 if not arg0.__class__ is map:
9441 if not arg1.__class__ is set:
9444 return union_map(arg0).intersect_domain(arg1)
9446 res = isl.isl_map_intersect_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9447 obj = map(ctx=ctx, ptr=res)
9449 def intersect_domain_factor_domain(arg0, arg1):
9451 if not arg0.__class__ is map:
9456 if not arg1.__class__ is map:
9459 return union_map(arg0).intersect_domain_factor_domain(arg1)
9461 res = isl.isl_map_intersect_domain_factor_domain(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9462 obj = map(ctx=ctx, ptr=res)
9464 def intersect_domain_factor_range(arg0, arg1):
9466 if not arg0.__class__ is map:
9471 if not arg1.__class__ is map:
9474 return union_map(arg0).intersect_domain_factor_range(arg1)
9476 res = isl.isl_map_intersect_domain_factor_range(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9477 obj = map(ctx=ctx, ptr=res)
9479 def intersect_domain_wrapped_domain(arg0, arg1):
9481 if not arg0.__class__ is map:
9486 if not arg1.__class__ is set:
9489 return union_map(arg0).intersect_domain_wrapped_domain(arg1)
9491 res = isl.isl_map_intersect_domain_wrapped_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9492 obj = map(ctx=ctx, ptr=res)
9494 def intersect_params(arg0, arg1):
9496 if not arg0.__class__ is map:
9501 if not arg1.__class__ is set:
9504 return union_map(arg0).intersect_params(arg1)
9506 res = isl.isl_map_intersect_params(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9507 obj = map(ctx=ctx, ptr=res)
9509 def intersect_range(arg0, arg1):
9511 if not arg0.__class__ is map:
9516 if not arg1.__class__ is set:
9519 return union_map(arg0).intersect_range(arg1)
9521 res = isl.isl_map_intersect_range(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9522 obj = map(ctx=ctx, ptr=res)
9524 def intersect_range_factor_domain(arg0, arg1):
9526 if not arg0.__class__ is map:
9531 if not arg1.__class__ is map:
9534 return union_map(arg0).intersect_range_factor_domain(arg1)
9536 res = isl.isl_map_intersect_range_factor_domain(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9537 obj = map(ctx=ctx, ptr=res)
9539 def intersect_range_factor_range(arg0, arg1):
9541 if not arg0.__class__ is map:
9546 if not arg1.__class__ is map:
9549 return union_map(arg0).intersect_range_factor_range(arg1)
9551 res = isl.isl_map_intersect_range_factor_range(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9552 obj = map(ctx=ctx, ptr=res)
9554 def intersect_range_wrapped_domain(arg0, arg1):
9556 if not arg0.__class__ is map:
9561 if not arg1.__class__ is set:
9564 return union_map(arg0).intersect_range_wrapped_domain(arg1)
9566 res = isl.isl_map_intersect_range_wrapped_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9567 obj = map(ctx=ctx, ptr=res)
9569 def is_bijective(arg0):
9571 if not arg0.__class__ is map:
9576 res = isl.isl_map_is_bijective(arg0.ptr)
9580 def is_disjoint(arg0, arg1):
9582 if not arg0.__class__ is map:
9587 if not arg1.__class__ is map:
9590 return union_map(arg0).is_disjoint(arg1)
9592 res = isl.isl_map_is_disjoint(arg0.ptr, arg1.ptr)
9598 if not arg0.__class__ is map:
9603 res = isl.isl_map_is_empty(arg0.ptr)
9607 def is_equal(arg0, arg1):
9609 if not arg0.__class__ is map:
9614 if not arg1.__class__ is map:
9617 return union_map(arg0).is_equal(arg1)
9619 res = isl.isl_map_is_equal(arg0.ptr, arg1.ptr)
9623 def is_injective(arg0):
9625 if not arg0.__class__ is map:
9630 res = isl.isl_map_is_injective(arg0.ptr)
9634 def is_single_valued(arg0):
9636 if not arg0.__class__ is map:
9641 res = isl.isl_map_is_single_valued(arg0.ptr)
9645 def is_strict_subset(arg0, arg1):
9647 if not arg0.__class__ is map:
9652 if not arg1.__class__ is map:
9655 return union_map(arg0).is_strict_subset(arg1)
9657 res = isl.isl_map_is_strict_subset(arg0.ptr, arg1.ptr)
9661 def is_subset(arg0, arg1):
9663 if not arg0.__class__ is map:
9668 if not arg1.__class__ is map:
9671 return union_map(arg0).is_subset(arg1)
9673 res = isl.isl_map_is_subset(arg0.ptr, arg1.ptr)
9677 def lex_ge_at(*args):
9678 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9681 if not args[0].__class__ is map:
9682 args[0] = map(args[0])
9686 res = isl.isl_map_lex_ge_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9687 obj = map(ctx=ctx, ptr=res)
9690 def lex_gt_at(*args):
9691 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9694 if not args[0].__class__ is map:
9695 args[0] = map(args[0])
9699 res = isl.isl_map_lex_gt_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9700 obj = map(ctx=ctx, ptr=res)
9703 def lex_le_at(*args):
9704 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9707 if not args[0].__class__ is map:
9708 args[0] = map(args[0])
9712 res = isl.isl_map_lex_le_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9713 obj = map(ctx=ctx, ptr=res)
9716 def lex_lt_at(*args):
9717 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9720 if not args[0].__class__ is map:
9721 args[0] = map(args[0])
9725 res = isl.isl_map_lex_lt_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9726 obj = map(ctx=ctx, ptr=res)
9731 if not arg0.__class__ is map:
9736 res = isl.isl_map_lexmax(isl.isl_map_copy(arg0.ptr))
9737 obj = map(ctx=ctx, ptr=res)
9739 def lexmax_pw_multi_aff(arg0):
9741 if not arg0.__class__ is map:
9746 res = isl.isl_map_lexmax_pw_multi_aff(isl.isl_map_copy(arg0.ptr))
9747 obj = pw_multi_aff(ctx=ctx, ptr=res)
9751 if not arg0.__class__ is map:
9756 res = isl.isl_map_lexmin(isl.isl_map_copy(arg0.ptr))
9757 obj = map(ctx=ctx, ptr=res)
9759 def lexmin_pw_multi_aff(arg0):
9761 if not arg0.__class__ is map:
9766 res = isl.isl_map_lexmin_pw_multi_aff(isl.isl_map_copy(arg0.ptr))
9767 obj = pw_multi_aff(ctx=ctx, ptr=res)
9769 def lower_bound(*args):
9770 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9773 if not args[0].__class__ is map:
9774 args[0] = map(args[0])
9778 res = isl.isl_map_lower_bound_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9779 obj = map(ctx=ctx, ptr=res)
9782 def max_multi_pw_aff(arg0):
9784 if not arg0.__class__ is map:
9789 res = isl.isl_map_max_multi_pw_aff(isl.isl_map_copy(arg0.ptr))
9790 obj = multi_pw_aff(ctx=ctx, ptr=res)
9792 def min_multi_pw_aff(arg0):
9794 if not arg0.__class__ is map:
9799 res = isl.isl_map_min_multi_pw_aff(isl.isl_map_copy(arg0.ptr))
9800 obj = multi_pw_aff(ctx=ctx, ptr=res)
9802 def n_basic_map(arg0):
9804 if not arg0.__class__ is map:
9809 res = isl.isl_map_n_basic_map(arg0.ptr)
9815 if not arg0.__class__ is map:
9820 res = isl.isl_map_params(isl.isl_map_copy(arg0.ptr))
9821 obj = set(ctx=ctx, ptr=res)
9823 def polyhedral_hull(arg0):
9825 if not arg0.__class__ is map:
9830 res = isl.isl_map_polyhedral_hull(isl.isl_map_copy(arg0.ptr))
9831 obj = basic_map(ctx=ctx, ptr=res)
9833 def preimage_domain(*args):
9834 if len(args) == 2 and args[1].__class__ is multi_aff:
9837 if not args[0].__class__ is map:
9838 args[0] = map(args[0])
9842 res = isl.isl_map_preimage_domain_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
9843 obj = map(ctx=ctx, ptr=res)
9845 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9848 if not args[0].__class__ is map:
9849 args[0] = map(args[0])
9853 res = isl.isl_map_preimage_domain_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9854 obj = map(ctx=ctx, ptr=res)
9856 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
9859 if not args[0].__class__ is map:
9860 args[0] = map(args[0])
9864 res = isl.isl_map_preimage_domain_pw_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
9865 obj = map(ctx=ctx, ptr=res)
9868 def preimage_range(*args):
9869 if len(args) == 2 and args[1].__class__ is multi_aff:
9872 if not args[0].__class__ is map:
9873 args[0] = map(args[0])
9877 res = isl.isl_map_preimage_range_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
9878 obj = map(ctx=ctx, ptr=res)
9880 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
9883 if not args[0].__class__ is map:
9884 args[0] = map(args[0])
9888 res = isl.isl_map_preimage_range_pw_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
9889 obj = map(ctx=ctx, ptr=res)
9892 def product(arg0, arg1):
9894 if not arg0.__class__ is map:
9899 if not arg1.__class__ is map:
9902 return union_map(arg0).product(arg1)
9904 res = isl.isl_map_product(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9905 obj = map(ctx=ctx, ptr=res)
9907 def project_out_all_params(arg0):
9909 if not arg0.__class__ is map:
9914 res = isl.isl_map_project_out_all_params(isl.isl_map_copy(arg0.ptr))
9915 obj = map(ctx=ctx, ptr=res)
9917 def project_out_param(*args):
9918 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
9921 if not args[0].__class__ is map:
9922 args[0] = map(args[0])
9926 if not args[1].__class__ is id:
9927 args[1] = id(args[1])
9931 res = isl.isl_map_project_out_param_id(isl.isl_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
9932 obj = map(ctx=ctx, ptr=res)
9934 if len(args) == 2 and args[1].__class__ is id_list:
9937 if not args[0].__class__ is map:
9938 args[0] = map(args[0])
9942 res = isl.isl_map_project_out_param_id_list(isl.isl_map_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
9943 obj = map(ctx=ctx, ptr=res)
9948 if not arg0.__class__ is map:
9953 res = isl.isl_map_range(isl.isl_map_copy(arg0.ptr))
9954 obj = set(ctx=ctx, ptr=res)
9956 def range_factor_domain(arg0):
9958 if not arg0.__class__ is map:
9963 res = isl.isl_map_range_factor_domain(isl.isl_map_copy(arg0.ptr))
9964 obj = map(ctx=ctx, ptr=res)
9966 def range_factor_range(arg0):
9968 if not arg0.__class__ is map:
9973 res = isl.isl_map_range_factor_range(isl.isl_map_copy(arg0.ptr))
9974 obj = map(ctx=ctx, ptr=res)
9976 def range_lattice_tile(arg0):
9978 if not arg0.__class__ is map:
9983 res = isl.isl_map_get_range_lattice_tile(arg0.ptr)
9984 obj = fixed_box(ctx=ctx, ptr=res)
9986 def get_range_lattice_tile(arg0):
9987 return arg0.range_lattice_tile()
9988 def range_product(arg0, arg1):
9990 if not arg0.__class__ is map:
9995 if not arg1.__class__ is map:
9998 return union_map(arg0).range_product(arg1)
10000 res = isl.isl_map_range_product(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
10001 obj = map(ctx=ctx, ptr=res)
10003 def range_reverse(arg0):
10005 if not arg0.__class__ is map:
10010 res = isl.isl_map_range_reverse(isl.isl_map_copy(arg0.ptr))
10011 obj = map(ctx=ctx, ptr=res)
10013 def range_simple_fixed_box_hull(arg0):
10015 if not arg0.__class__ is map:
10020 res = isl.isl_map_get_range_simple_fixed_box_hull(arg0.ptr)
10021 obj = fixed_box(ctx=ctx, ptr=res)
10023 def get_range_simple_fixed_box_hull(arg0):
10024 return arg0.range_simple_fixed_box_hull()
10025 def range_tuple_dim(arg0):
10027 if not arg0.__class__ is map:
10032 res = isl.isl_map_range_tuple_dim(arg0.ptr)
10036 def range_tuple_id(arg0):
10038 if not arg0.__class__ is map:
10043 res = isl.isl_map_get_range_tuple_id(arg0.ptr)
10044 obj = id(ctx=ctx, ptr=res)
10046 def get_range_tuple_id(arg0):
10047 return arg0.range_tuple_id()
10050 if not arg0.__class__ is map:
10055 res = isl.isl_map_reverse(isl.isl_map_copy(arg0.ptr))
10056 obj = map(ctx=ctx, ptr=res)
10060 if not arg0.__class__ is map:
10065 res = isl.isl_map_sample(isl.isl_map_copy(arg0.ptr))
10066 obj = basic_map(ctx=ctx, ptr=res)
10068 def set_domain_tuple(*args):
10069 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
10072 if not args[0].__class__ is map:
10073 args[0] = map(args[0])
10077 if not args[1].__class__ is id:
10078 args[1] = id(args[1])
10082 res = isl.isl_map_set_domain_tuple_id(isl.isl_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
10083 obj = map(ctx=ctx, ptr=res)
10086 def set_range_tuple(*args):
10087 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
10090 if not args[0].__class__ is map:
10091 args[0] = map(args[0])
10095 if not args[1].__class__ is id:
10096 args[1] = id(args[1])
10100 res = isl.isl_map_set_range_tuple_id(isl.isl_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
10101 obj = map(ctx=ctx, ptr=res)
10106 if not arg0.__class__ is map:
10111 res = isl.isl_map_get_space(arg0.ptr)
10112 obj = space(ctx=ctx, ptr=res)
10114 def get_space(arg0):
10115 return arg0.space()
10116 def subtract(arg0, arg1):
10118 if not arg0.__class__ is map:
10123 if not arg1.__class__ is map:
10126 return union_map(arg0).subtract(arg1)
10128 res = isl.isl_map_subtract(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
10129 obj = map(ctx=ctx, ptr=res)
10133 if not arg0.__class__ is map:
10138 res = isl.isl_map_to_list(isl.isl_map_copy(arg0.ptr))
10139 obj = map_list(ctx=ctx, ptr=res)
10141 def to_union_map(arg0):
10143 if not arg0.__class__ is map:
10148 res = isl.isl_map_to_union_map(isl.isl_map_copy(arg0.ptr))
10149 obj = union_map(ctx=ctx, ptr=res)
10153 if not arg0.__class__ is map:
10158 res = isl.isl_map_uncurry(isl.isl_map_copy(arg0.ptr))
10159 obj = map(ctx=ctx, ptr=res)
10161 def union(arg0, arg1):
10163 if not arg0.__class__ is map:
10168 if not arg1.__class__ is map:
10171 return union_map(arg0).union(arg1)
10173 res = isl.isl_map_union(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
10174 obj = map(ctx=ctx, ptr=res)
10177 def universe(arg0):
10179 if not arg0.__class__ is space:
10184 res = isl.isl_map_universe(isl.isl_space_copy(arg0.ptr))
10185 obj = map(ctx=ctx, ptr=res)
10187 def unshifted_simple_hull(arg0):
10189 if not arg0.__class__ is map:
10194 res = isl.isl_map_unshifted_simple_hull(isl.isl_map_copy(arg0.ptr))
10195 obj = basic_map(ctx=ctx, ptr=res)
10197 def upper_bound(*args):
10198 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
10201 if not args[0].__class__ is map:
10202 args[0] = map(args[0])
10206 res = isl.isl_map_upper_bound_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
10207 obj = map(ctx=ctx, ptr=res)
10212 if not arg0.__class__ is map:
10217 res = isl.isl_map_wrap(isl.isl_map_copy(arg0.ptr))
10218 obj = set(ctx=ctx, ptr=res)
10222 if not arg0.__class__ is map:
10227 res = isl.isl_map_zip(isl.isl_map_copy(arg0.ptr))
10228 obj = map(ctx=ctx, ptr=res)
10231 isl.isl_map_from_basic_map.restype = c_void_p
10232 isl.isl_map_from_basic_map.argtypes = [c_void_p]
10233 isl.isl_map_read_from_str.restype = c_void_p
10234 isl.isl_map_read_from_str.argtypes = [Context, c_char_p]
10235 isl.isl_map_affine_hull.restype = c_void_p
10236 isl.isl_map_affine_hull.argtypes = [c_void_p]
10237 isl.isl_map_apply_domain.restype = c_void_p
10238 isl.isl_map_apply_domain.argtypes = [c_void_p, c_void_p]
10239 isl.isl_map_apply_range.restype = c_void_p
10240 isl.isl_map_apply_range.argtypes = [c_void_p, c_void_p]
10241 isl.isl_map_as_pw_multi_aff.restype = c_void_p
10242 isl.isl_map_as_pw_multi_aff.argtypes = [c_void_p]
10243 isl.isl_map_bind_domain.restype = c_void_p
10244 isl.isl_map_bind_domain.argtypes = [c_void_p, c_void_p]
10245 isl.isl_map_bind_range.restype = c_void_p
10246 isl.isl_map_bind_range.argtypes = [c_void_p, c_void_p]
10247 isl.isl_map_coalesce.restype = c_void_p
10248 isl.isl_map_coalesce.argtypes = [c_void_p]
10249 isl.isl_map_complement.restype = c_void_p
10250 isl.isl_map_complement.argtypes = [c_void_p]
10251 isl.isl_map_curry.restype = c_void_p
10252 isl.isl_map_curry.argtypes = [c_void_p]
10253 isl.isl_map_deltas.restype = c_void_p
10254 isl.isl_map_deltas.argtypes = [c_void_p]
10255 isl.isl_map_detect_equalities.restype = c_void_p
10256 isl.isl_map_detect_equalities.argtypes = [c_void_p]
10257 isl.isl_map_domain.restype = c_void_p
10258 isl.isl_map_domain.argtypes = [c_void_p]
10259 isl.isl_map_domain_factor_domain.restype = c_void_p
10260 isl.isl_map_domain_factor_domain.argtypes = [c_void_p]
10261 isl.isl_map_domain_factor_range.restype = c_void_p
10262 isl.isl_map_domain_factor_range.argtypes = [c_void_p]
10263 isl.isl_map_domain_product.restype = c_void_p
10264 isl.isl_map_domain_product.argtypes = [c_void_p, c_void_p]
10265 isl.isl_map_domain_reverse.restype = c_void_p
10266 isl.isl_map_domain_reverse.argtypes = [c_void_p]
10267 isl.isl_map_domain_tuple_dim.argtypes = [c_void_p]
10268 isl.isl_map_get_domain_tuple_id.restype = c_void_p
10269 isl.isl_map_get_domain_tuple_id.argtypes = [c_void_p]
10270 isl.isl_map_drop_unused_params.restype = c_void_p
10271 isl.isl_map_drop_unused_params.argtypes = [c_void_p]
10272 isl.isl_map_empty.restype = c_void_p
10273 isl.isl_map_empty.argtypes = [c_void_p]
10274 isl.isl_map_eq_at_multi_pw_aff.restype = c_void_p
10275 isl.isl_map_eq_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10276 isl.isl_map_factor_domain.restype = c_void_p
10277 isl.isl_map_factor_domain.argtypes = [c_void_p]
10278 isl.isl_map_factor_range.restype = c_void_p
10279 isl.isl_map_factor_range.argtypes = [c_void_p]
10280 isl.isl_map_fixed_power_val.restype = c_void_p
10281 isl.isl_map_fixed_power_val.argtypes = [c_void_p, c_void_p]
10282 isl.isl_map_flatten.restype = c_void_p
10283 isl.isl_map_flatten.argtypes = [c_void_p]
10284 isl.isl_map_flatten_domain.restype = c_void_p
10285 isl.isl_map_flatten_domain.argtypes = [c_void_p]
10286 isl.isl_map_flatten_range.restype = c_void_p
10287 isl.isl_map_flatten_range.argtypes = [c_void_p]
10288 isl.isl_map_foreach_basic_map.argtypes = [c_void_p, c_void_p, c_void_p]
10289 isl.isl_map_gist.restype = c_void_p
10290 isl.isl_map_gist.argtypes = [c_void_p, c_void_p]
10291 isl.isl_map_gist_domain.restype = c_void_p
10292 isl.isl_map_gist_domain.argtypes = [c_void_p, c_void_p]
10293 isl.isl_map_gist_params.restype = c_void_p
10294 isl.isl_map_gist_params.argtypes = [c_void_p, c_void_p]
10295 isl.isl_map_has_domain_tuple_id.argtypes = [c_void_p]
10296 isl.isl_map_has_range_tuple_id.argtypes = [c_void_p]
10297 isl.isl_map_intersect.restype = c_void_p
10298 isl.isl_map_intersect.argtypes = [c_void_p, c_void_p]
10299 isl.isl_map_intersect_domain.restype = c_void_p
10300 isl.isl_map_intersect_domain.argtypes = [c_void_p, c_void_p]
10301 isl.isl_map_intersect_domain_factor_domain.restype = c_void_p
10302 isl.isl_map_intersect_domain_factor_domain.argtypes = [c_void_p, c_void_p]
10303 isl.isl_map_intersect_domain_factor_range.restype = c_void_p
10304 isl.isl_map_intersect_domain_factor_range.argtypes = [c_void_p, c_void_p]
10305 isl.isl_map_intersect_domain_wrapped_domain.restype = c_void_p
10306 isl.isl_map_intersect_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
10307 isl.isl_map_intersect_params.restype = c_void_p
10308 isl.isl_map_intersect_params.argtypes = [c_void_p, c_void_p]
10309 isl.isl_map_intersect_range.restype = c_void_p
10310 isl.isl_map_intersect_range.argtypes = [c_void_p, c_void_p]
10311 isl.isl_map_intersect_range_factor_domain.restype = c_void_p
10312 isl.isl_map_intersect_range_factor_domain.argtypes = [c_void_p, c_void_p]
10313 isl.isl_map_intersect_range_factor_range.restype = c_void_p
10314 isl.isl_map_intersect_range_factor_range.argtypes = [c_void_p, c_void_p]
10315 isl.isl_map_intersect_range_wrapped_domain.restype = c_void_p
10316 isl.isl_map_intersect_range_wrapped_domain.argtypes = [c_void_p, c_void_p]
10317 isl.isl_map_is_bijective.argtypes = [c_void_p]
10318 isl.isl_map_is_disjoint.argtypes = [c_void_p, c_void_p]
10319 isl.isl_map_is_empty.argtypes = [c_void_p]
10320 isl.isl_map_is_equal.argtypes = [c_void_p, c_void_p]
10321 isl.isl_map_is_injective.argtypes = [c_void_p]
10322 isl.isl_map_is_single_valued.argtypes = [c_void_p]
10323 isl.isl_map_is_strict_subset.argtypes = [c_void_p, c_void_p]
10324 isl.isl_map_is_subset.argtypes = [c_void_p, c_void_p]
10325 isl.isl_map_lex_ge_at_multi_pw_aff.restype = c_void_p
10326 isl.isl_map_lex_ge_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10327 isl.isl_map_lex_gt_at_multi_pw_aff.restype = c_void_p
10328 isl.isl_map_lex_gt_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10329 isl.isl_map_lex_le_at_multi_pw_aff.restype = c_void_p
10330 isl.isl_map_lex_le_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10331 isl.isl_map_lex_lt_at_multi_pw_aff.restype = c_void_p
10332 isl.isl_map_lex_lt_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10333 isl.isl_map_lexmax.restype = c_void_p
10334 isl.isl_map_lexmax.argtypes = [c_void_p]
10335 isl.isl_map_lexmax_pw_multi_aff.restype = c_void_p
10336 isl.isl_map_lexmax_pw_multi_aff.argtypes = [c_void_p]
10337 isl.isl_map_lexmin.restype = c_void_p
10338 isl.isl_map_lexmin.argtypes = [c_void_p]
10339 isl.isl_map_lexmin_pw_multi_aff.restype = c_void_p
10340 isl.isl_map_lexmin_pw_multi_aff.argtypes = [c_void_p]
10341 isl.isl_map_lower_bound_multi_pw_aff.restype = c_void_p
10342 isl.isl_map_lower_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10343 isl.isl_map_max_multi_pw_aff.restype = c_void_p
10344 isl.isl_map_max_multi_pw_aff.argtypes = [c_void_p]
10345 isl.isl_map_min_multi_pw_aff.restype = c_void_p
10346 isl.isl_map_min_multi_pw_aff.argtypes = [c_void_p]
10347 isl.isl_map_n_basic_map.argtypes = [c_void_p]
10348 isl.isl_map_params.restype = c_void_p
10349 isl.isl_map_params.argtypes = [c_void_p]
10350 isl.isl_map_polyhedral_hull.restype = c_void_p
10351 isl.isl_map_polyhedral_hull.argtypes = [c_void_p]
10352 isl.isl_map_preimage_domain_multi_aff.restype = c_void_p
10353 isl.isl_map_preimage_domain_multi_aff.argtypes = [c_void_p, c_void_p]
10354 isl.isl_map_preimage_domain_multi_pw_aff.restype = c_void_p
10355 isl.isl_map_preimage_domain_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10356 isl.isl_map_preimage_domain_pw_multi_aff.restype = c_void_p
10357 isl.isl_map_preimage_domain_pw_multi_aff.argtypes = [c_void_p, c_void_p]
10358 isl.isl_map_preimage_range_multi_aff.restype = c_void_p
10359 isl.isl_map_preimage_range_multi_aff.argtypes = [c_void_p, c_void_p]
10360 isl.isl_map_preimage_range_pw_multi_aff.restype = c_void_p
10361 isl.isl_map_preimage_range_pw_multi_aff.argtypes = [c_void_p, c_void_p]
10362 isl.isl_map_product.restype = c_void_p
10363 isl.isl_map_product.argtypes = [c_void_p, c_void_p]
10364 isl.isl_map_project_out_all_params.restype = c_void_p
10365 isl.isl_map_project_out_all_params.argtypes = [c_void_p]
10366 isl.isl_map_project_out_param_id.restype = c_void_p
10367 isl.isl_map_project_out_param_id.argtypes = [c_void_p, c_void_p]
10368 isl.isl_map_project_out_param_id_list.restype = c_void_p
10369 isl.isl_map_project_out_param_id_list.argtypes = [c_void_p, c_void_p]
10370 isl.isl_map_range.restype = c_void_p
10371 isl.isl_map_range.argtypes = [c_void_p]
10372 isl.isl_map_range_factor_domain.restype = c_void_p
10373 isl.isl_map_range_factor_domain.argtypes = [c_void_p]
10374 isl.isl_map_range_factor_range.restype = c_void_p
10375 isl.isl_map_range_factor_range.argtypes = [c_void_p]
10376 isl.isl_map_get_range_lattice_tile.restype = c_void_p
10377 isl.isl_map_get_range_lattice_tile.argtypes = [c_void_p]
10378 isl.isl_map_range_product.restype = c_void_p
10379 isl.isl_map_range_product.argtypes = [c_void_p, c_void_p]
10380 isl.isl_map_range_reverse.restype = c_void_p
10381 isl.isl_map_range_reverse.argtypes = [c_void_p]
10382 isl.isl_map_get_range_simple_fixed_box_hull.restype = c_void_p
10383 isl.isl_map_get_range_simple_fixed_box_hull.argtypes = [c_void_p]
10384 isl.isl_map_range_tuple_dim.argtypes = [c_void_p]
10385 isl.isl_map_get_range_tuple_id.restype = c_void_p
10386 isl.isl_map_get_range_tuple_id.argtypes = [c_void_p]
10387 isl.isl_map_reverse.restype = c_void_p
10388 isl.isl_map_reverse.argtypes = [c_void_p]
10389 isl.isl_map_sample.restype = c_void_p
10390 isl.isl_map_sample.argtypes = [c_void_p]
10391 isl.isl_map_set_domain_tuple_id.restype = c_void_p
10392 isl.isl_map_set_domain_tuple_id.argtypes = [c_void_p, c_void_p]
10393 isl.isl_map_set_range_tuple_id.restype = c_void_p
10394 isl.isl_map_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
10395 isl.isl_map_get_space.restype = c_void_p
10396 isl.isl_map_get_space.argtypes = [c_void_p]
10397 isl.isl_map_subtract.restype = c_void_p
10398 isl.isl_map_subtract.argtypes = [c_void_p, c_void_p]
10399 isl.isl_map_to_list.restype = c_void_p
10400 isl.isl_map_to_list.argtypes = [c_void_p]
10401 isl.isl_map_to_union_map.restype = c_void_p
10402 isl.isl_map_to_union_map.argtypes = [c_void_p]
10403 isl.isl_map_uncurry.restype = c_void_p
10404 isl.isl_map_uncurry.argtypes = [c_void_p]
10405 isl.isl_map_union.restype = c_void_p
10406 isl.isl_map_union.argtypes = [c_void_p, c_void_p]
10407 isl.isl_map_universe.restype = c_void_p
10408 isl.isl_map_universe.argtypes = [c_void_p]
10409 isl.isl_map_unshifted_simple_hull.restype = c_void_p
10410 isl.isl_map_unshifted_simple_hull.argtypes = [c_void_p]
10411 isl.isl_map_upper_bound_multi_pw_aff.restype = c_void_p
10412 isl.isl_map_upper_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10413 isl.isl_map_wrap.restype = c_void_p
10414 isl.isl_map_wrap.argtypes = [c_void_p]
10415 isl.isl_map_zip.restype = c_void_p
10416 isl.isl_map_zip.argtypes = [c_void_p]
10417 isl.isl_map_copy.restype = c_void_p
10418 isl.isl_map_copy.argtypes = [c_void_p]
10419 isl.isl_map_free.restype = c_void_p
10420 isl.isl_map_free.argtypes = [c_void_p]
10421 isl.isl_map_to_str.restype = POINTER(c_char)
10422 isl.isl_map_to_str.argtypes = [c_void_p]
10424 class basic_map(map):
10425 def __init__(self, *args, **keywords):
10426 if "ptr" in keywords:
10427 self.ctx = keywords["ctx"]
10428 self.ptr = keywords["ptr"]
10430 if len(args) == 1 and type(args[0]) == str:
10431 self.ctx = Context.getDefaultInstance()
10432 self.ptr = isl.isl_basic_map_read_from_str(self.ctx, args[0].encode('ascii'))
10436 if hasattr(self, 'ptr'):
10437 isl.isl_basic_map_free(self.ptr)
10440 if not arg0.__class__ is basic_map:
10441 arg0 = basic_map(arg0)
10444 ptr = isl.isl_basic_map_to_str(arg0.ptr)
10445 res = cast(ptr, c_char_p).value.decode('ascii')
10448 def __repr__(self):
10451 return 'isl.basic_map("""%s""")' % s
10453 return 'isl.basic_map("%s")' % s
10454 def affine_hull(arg0):
10456 if not arg0.__class__ is basic_map:
10457 arg0 = basic_map(arg0)
10461 res = isl.isl_basic_map_affine_hull(isl.isl_basic_map_copy(arg0.ptr))
10462 obj = basic_map(ctx=ctx, ptr=res)
10464 def apply_domain(arg0, arg1):
10466 if not arg0.__class__ is basic_map:
10467 arg0 = basic_map(arg0)
10471 if not arg1.__class__ is basic_map:
10472 arg1 = basic_map(arg1)
10474 return map(arg0).apply_domain(arg1)
10476 res = isl.isl_basic_map_apply_domain(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10477 obj = basic_map(ctx=ctx, ptr=res)
10479 def apply_range(arg0, arg1):
10481 if not arg0.__class__ is basic_map:
10482 arg0 = basic_map(arg0)
10486 if not arg1.__class__ is basic_map:
10487 arg1 = basic_map(arg1)
10489 return map(arg0).apply_range(arg1)
10491 res = isl.isl_basic_map_apply_range(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10492 obj = basic_map(ctx=ctx, ptr=res)
10496 if not arg0.__class__ is basic_map:
10497 arg0 = basic_map(arg0)
10501 res = isl.isl_basic_map_deltas(isl.isl_basic_map_copy(arg0.ptr))
10502 obj = basic_set(ctx=ctx, ptr=res)
10504 def detect_equalities(arg0):
10506 if not arg0.__class__ is basic_map:
10507 arg0 = basic_map(arg0)
10511 res = isl.isl_basic_map_detect_equalities(isl.isl_basic_map_copy(arg0.ptr))
10512 obj = basic_map(ctx=ctx, ptr=res)
10516 if not arg0.__class__ is basic_map:
10517 arg0 = basic_map(arg0)
10521 res = isl.isl_basic_map_flatten(isl.isl_basic_map_copy(arg0.ptr))
10522 obj = basic_map(ctx=ctx, ptr=res)
10524 def flatten_domain(arg0):
10526 if not arg0.__class__ is basic_map:
10527 arg0 = basic_map(arg0)
10531 res = isl.isl_basic_map_flatten_domain(isl.isl_basic_map_copy(arg0.ptr))
10532 obj = basic_map(ctx=ctx, ptr=res)
10534 def flatten_range(arg0):
10536 if not arg0.__class__ is basic_map:
10537 arg0 = basic_map(arg0)
10541 res = isl.isl_basic_map_flatten_range(isl.isl_basic_map_copy(arg0.ptr))
10542 obj = basic_map(ctx=ctx, ptr=res)
10544 def gist(arg0, arg1):
10546 if not arg0.__class__ is basic_map:
10547 arg0 = basic_map(arg0)
10551 if not arg1.__class__ is basic_map:
10552 arg1 = basic_map(arg1)
10554 return map(arg0).gist(arg1)
10556 res = isl.isl_basic_map_gist(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10557 obj = basic_map(ctx=ctx, ptr=res)
10559 def intersect(arg0, arg1):
10561 if not arg0.__class__ is basic_map:
10562 arg0 = basic_map(arg0)
10566 if not arg1.__class__ is basic_map:
10567 arg1 = basic_map(arg1)
10569 return map(arg0).intersect(arg1)
10571 res = isl.isl_basic_map_intersect(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10572 obj = basic_map(ctx=ctx, ptr=res)
10574 def intersect_domain(arg0, arg1):
10576 if not arg0.__class__ is basic_map:
10577 arg0 = basic_map(arg0)
10581 if not arg1.__class__ is basic_set:
10582 arg1 = basic_set(arg1)
10584 return map(arg0).intersect_domain(arg1)
10586 res = isl.isl_basic_map_intersect_domain(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
10587 obj = basic_map(ctx=ctx, ptr=res)
10589 def intersect_params(arg0, arg1):
10591 if not arg0.__class__ is basic_map:
10592 arg0 = basic_map(arg0)
10596 if not arg1.__class__ is basic_set:
10597 arg1 = basic_set(arg1)
10599 return map(arg0).intersect_params(arg1)
10601 res = isl.isl_basic_map_intersect_params(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
10602 obj = basic_map(ctx=ctx, ptr=res)
10604 def intersect_range(arg0, arg1):
10606 if not arg0.__class__ is basic_map:
10607 arg0 = basic_map(arg0)
10611 if not arg1.__class__ is basic_set:
10612 arg1 = basic_set(arg1)
10614 return map(arg0).intersect_range(arg1)
10616 res = isl.isl_basic_map_intersect_range(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
10617 obj = basic_map(ctx=ctx, ptr=res)
10619 def is_empty(arg0):
10621 if not arg0.__class__ is basic_map:
10622 arg0 = basic_map(arg0)
10626 res = isl.isl_basic_map_is_empty(arg0.ptr)
10630 def is_equal(arg0, arg1):
10632 if not arg0.__class__ is basic_map:
10633 arg0 = basic_map(arg0)
10637 if not arg1.__class__ is basic_map:
10638 arg1 = basic_map(arg1)
10640 return map(arg0).is_equal(arg1)
10642 res = isl.isl_basic_map_is_equal(arg0.ptr, arg1.ptr)
10646 def is_subset(arg0, arg1):
10648 if not arg0.__class__ is basic_map:
10649 arg0 = basic_map(arg0)
10653 if not arg1.__class__ is basic_map:
10654 arg1 = basic_map(arg1)
10656 return map(arg0).is_subset(arg1)
10658 res = isl.isl_basic_map_is_subset(arg0.ptr, arg1.ptr)
10664 if not arg0.__class__ is basic_map:
10665 arg0 = basic_map(arg0)
10669 res = isl.isl_basic_map_lexmax(isl.isl_basic_map_copy(arg0.ptr))
10670 obj = map(ctx=ctx, ptr=res)
10674 if not arg0.__class__ is basic_map:
10675 arg0 = basic_map(arg0)
10679 res = isl.isl_basic_map_lexmin(isl.isl_basic_map_copy(arg0.ptr))
10680 obj = map(ctx=ctx, ptr=res)
10684 if not arg0.__class__ is basic_map:
10685 arg0 = basic_map(arg0)
10689 res = isl.isl_basic_map_reverse(isl.isl_basic_map_copy(arg0.ptr))
10690 obj = basic_map(ctx=ctx, ptr=res)
10694 if not arg0.__class__ is basic_map:
10695 arg0 = basic_map(arg0)
10699 res = isl.isl_basic_map_sample(isl.isl_basic_map_copy(arg0.ptr))
10700 obj = basic_map(ctx=ctx, ptr=res)
10702 def union(arg0, arg1):
10704 if not arg0.__class__ is basic_map:
10705 arg0 = basic_map(arg0)
10709 if not arg1.__class__ is basic_map:
10710 arg1 = basic_map(arg1)
10712 return map(arg0).union(arg1)
10714 res = isl.isl_basic_map_union(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10715 obj = map(ctx=ctx, ptr=res)
10718 isl.isl_basic_map_read_from_str.restype = c_void_p
10719 isl.isl_basic_map_read_from_str.argtypes = [Context, c_char_p]
10720 isl.isl_basic_map_affine_hull.restype = c_void_p
10721 isl.isl_basic_map_affine_hull.argtypes = [c_void_p]
10722 isl.isl_basic_map_apply_domain.restype = c_void_p
10723 isl.isl_basic_map_apply_domain.argtypes = [c_void_p, c_void_p]
10724 isl.isl_basic_map_apply_range.restype = c_void_p
10725 isl.isl_basic_map_apply_range.argtypes = [c_void_p, c_void_p]
10726 isl.isl_basic_map_deltas.restype = c_void_p
10727 isl.isl_basic_map_deltas.argtypes = [c_void_p]
10728 isl.isl_basic_map_detect_equalities.restype = c_void_p
10729 isl.isl_basic_map_detect_equalities.argtypes = [c_void_p]
10730 isl.isl_basic_map_flatten.restype = c_void_p
10731 isl.isl_basic_map_flatten.argtypes = [c_void_p]
10732 isl.isl_basic_map_flatten_domain.restype = c_void_p
10733 isl.isl_basic_map_flatten_domain.argtypes = [c_void_p]
10734 isl.isl_basic_map_flatten_range.restype = c_void_p
10735 isl.isl_basic_map_flatten_range.argtypes = [c_void_p]
10736 isl.isl_basic_map_gist.restype = c_void_p
10737 isl.isl_basic_map_gist.argtypes = [c_void_p, c_void_p]
10738 isl.isl_basic_map_intersect.restype = c_void_p
10739 isl.isl_basic_map_intersect.argtypes = [c_void_p, c_void_p]
10740 isl.isl_basic_map_intersect_domain.restype = c_void_p
10741 isl.isl_basic_map_intersect_domain.argtypes = [c_void_p, c_void_p]
10742 isl.isl_basic_map_intersect_params.restype = c_void_p
10743 isl.isl_basic_map_intersect_params.argtypes = [c_void_p, c_void_p]
10744 isl.isl_basic_map_intersect_range.restype = c_void_p
10745 isl.isl_basic_map_intersect_range.argtypes = [c_void_p, c_void_p]
10746 isl.isl_basic_map_is_empty.argtypes = [c_void_p]
10747 isl.isl_basic_map_is_equal.argtypes = [c_void_p, c_void_p]
10748 isl.isl_basic_map_is_subset.argtypes = [c_void_p, c_void_p]
10749 isl.isl_basic_map_lexmax.restype = c_void_p
10750 isl.isl_basic_map_lexmax.argtypes = [c_void_p]
10751 isl.isl_basic_map_lexmin.restype = c_void_p
10752 isl.isl_basic_map_lexmin.argtypes = [c_void_p]
10753 isl.isl_basic_map_reverse.restype = c_void_p
10754 isl.isl_basic_map_reverse.argtypes = [c_void_p]
10755 isl.isl_basic_map_sample.restype = c_void_p
10756 isl.isl_basic_map_sample.argtypes = [c_void_p]
10757 isl.isl_basic_map_union.restype = c_void_p
10758 isl.isl_basic_map_union.argtypes = [c_void_p, c_void_p]
10759 isl.isl_basic_map_copy.restype = c_void_p
10760 isl.isl_basic_map_copy.argtypes = [c_void_p]
10761 isl.isl_basic_map_free.restype = c_void_p
10762 isl.isl_basic_map_free.argtypes = [c_void_p]
10763 isl.isl_basic_map_to_str.restype = POINTER(c_char)
10764 isl.isl_basic_map_to_str.argtypes = [c_void_p]
10766 class union_set(object):
10767 def __init__(self, *args, **keywords):
10768 if "ptr" in keywords:
10769 self.ctx = keywords["ctx"]
10770 self.ptr = keywords["ptr"]
10772 if len(args) == 1 and args[0].__class__ is basic_set:
10773 self.ctx = Context.getDefaultInstance()
10774 self.ptr = isl.isl_union_set_from_basic_set(isl.isl_basic_set_copy(args[0].ptr))
10776 if len(args) == 1 and args[0].__class__ is point:
10777 self.ctx = Context.getDefaultInstance()
10778 self.ptr = isl.isl_union_set_from_point(isl.isl_point_copy(args[0].ptr))
10780 if len(args) == 1 and args[0].__class__ is set:
10781 self.ctx = Context.getDefaultInstance()
10782 self.ptr = isl.isl_union_set_from_set(isl.isl_set_copy(args[0].ptr))
10784 if len(args) == 1 and type(args[0]) == str:
10785 self.ctx = Context.getDefaultInstance()
10786 self.ptr = isl.isl_union_set_read_from_str(self.ctx, args[0].encode('ascii'))
10790 if hasattr(self, 'ptr'):
10791 isl.isl_union_set_free(self.ptr)
10794 if not arg0.__class__ is union_set:
10795 arg0 = union_set(arg0)
10798 ptr = isl.isl_union_set_to_str(arg0.ptr)
10799 res = cast(ptr, c_char_p).value.decode('ascii')
10802 def __repr__(self):
10805 return 'isl.union_set("""%s""")' % s
10807 return 'isl.union_set("%s")' % s
10808 def affine_hull(arg0):
10810 if not arg0.__class__ is union_set:
10811 arg0 = union_set(arg0)
10815 res = isl.isl_union_set_affine_hull(isl.isl_union_set_copy(arg0.ptr))
10816 obj = union_set(ctx=ctx, ptr=res)
10818 def apply(arg0, arg1):
10820 if not arg0.__class__ is union_set:
10821 arg0 = union_set(arg0)
10825 if not arg1.__class__ is union_map:
10826 arg1 = union_map(arg1)
10830 res = isl.isl_union_set_apply(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
10831 obj = union_set(ctx=ctx, ptr=res)
10835 if not arg0.__class__ is union_set:
10836 arg0 = union_set(arg0)
10840 res = isl.isl_union_set_as_set(isl.isl_union_set_copy(arg0.ptr))
10841 obj = set(ctx=ctx, ptr=res)
10843 def coalesce(arg0):
10845 if not arg0.__class__ is union_set:
10846 arg0 = union_set(arg0)
10850 res = isl.isl_union_set_coalesce(isl.isl_union_set_copy(arg0.ptr))
10851 obj = union_set(ctx=ctx, ptr=res)
10853 def compute_divs(arg0):
10855 if not arg0.__class__ is union_set:
10856 arg0 = union_set(arg0)
10860 res = isl.isl_union_set_compute_divs(isl.isl_union_set_copy(arg0.ptr))
10861 obj = union_set(ctx=ctx, ptr=res)
10863 def detect_equalities(arg0):
10865 if not arg0.__class__ is union_set:
10866 arg0 = union_set(arg0)
10870 res = isl.isl_union_set_detect_equalities(isl.isl_union_set_copy(arg0.ptr))
10871 obj = union_set(ctx=ctx, ptr=res)
10873 def drop_unused_params(arg0):
10875 if not arg0.__class__ is union_set:
10876 arg0 = union_set(arg0)
10880 res = isl.isl_union_set_drop_unused_params(isl.isl_union_set_copy(arg0.ptr))
10881 obj = union_set(ctx=ctx, ptr=res)
10886 ctx = Context.getDefaultInstance()
10887 res = isl.isl_union_set_empty_ctx(ctx)
10888 obj = union_set(ctx=ctx, ptr=res)
10891 def every_set(arg0, arg1):
10893 if not arg0.__class__ is union_set:
10894 arg0 = union_set(arg0)
10898 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
10899 def cb_func(cb_arg0, cb_arg1):
10900 cb_arg0 = set(ctx=arg0.ctx, ptr=isl.isl_set_copy(cb_arg0))
10902 res = arg1(cb_arg0)
10903 except BaseException as e:
10906 return 1 if res else 0
10909 res = isl.isl_union_set_every_set(arg0.ptr, cb1, None)
10910 if exc_info[0] is not None:
10915 def extract_set(arg0, arg1):
10917 if not arg0.__class__ is union_set:
10918 arg0 = union_set(arg0)
10922 if not arg1.__class__ is space:
10927 res = isl.isl_union_set_extract_set(arg0.ptr, isl.isl_space_copy(arg1.ptr))
10928 obj = set(ctx=ctx, ptr=res)
10930 def foreach_point(arg0, arg1):
10932 if not arg0.__class__ is union_set:
10933 arg0 = union_set(arg0)
10937 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
10938 def cb_func(cb_arg0, cb_arg1):
10939 cb_arg0 = point(ctx=arg0.ctx, ptr=(cb_arg0))
10942 except BaseException as e:
10948 res = isl.isl_union_set_foreach_point(arg0.ptr, cb1, None)
10949 if exc_info[0] is not None:
10953 def foreach_set(arg0, arg1):
10955 if not arg0.__class__ is union_set:
10956 arg0 = union_set(arg0)
10960 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
10961 def cb_func(cb_arg0, cb_arg1):
10962 cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
10965 except BaseException as e:
10971 res = isl.isl_union_set_foreach_set(arg0.ptr, cb1, None)
10972 if exc_info[0] is not None:
10976 def gist(arg0, arg1):
10978 if not arg0.__class__ is union_set:
10979 arg0 = union_set(arg0)
10983 if not arg1.__class__ is union_set:
10984 arg1 = union_set(arg1)
10988 res = isl.isl_union_set_gist(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
10989 obj = union_set(ctx=ctx, ptr=res)
10991 def gist_params(arg0, arg1):
10993 if not arg0.__class__ is union_set:
10994 arg0 = union_set(arg0)
10998 if not arg1.__class__ is set:
11003 res = isl.isl_union_set_gist_params(isl.isl_union_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11004 obj = union_set(ctx=ctx, ptr=res)
11006 def identity(arg0):
11008 if not arg0.__class__ is union_set:
11009 arg0 = union_set(arg0)
11013 res = isl.isl_union_set_identity(isl.isl_union_set_copy(arg0.ptr))
11014 obj = union_map(ctx=ctx, ptr=res)
11016 def intersect(arg0, arg1):
11018 if not arg0.__class__ is union_set:
11019 arg0 = union_set(arg0)
11023 if not arg1.__class__ is union_set:
11024 arg1 = union_set(arg1)
11028 res = isl.isl_union_set_intersect(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
11029 obj = union_set(ctx=ctx, ptr=res)
11031 def intersect_params(arg0, arg1):
11033 if not arg0.__class__ is union_set:
11034 arg0 = union_set(arg0)
11038 if not arg1.__class__ is set:
11043 res = isl.isl_union_set_intersect_params(isl.isl_union_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11044 obj = union_set(ctx=ctx, ptr=res)
11046 def is_disjoint(arg0, arg1):
11048 if not arg0.__class__ is union_set:
11049 arg0 = union_set(arg0)
11053 if not arg1.__class__ is union_set:
11054 arg1 = union_set(arg1)
11058 res = isl.isl_union_set_is_disjoint(arg0.ptr, arg1.ptr)
11062 def is_empty(arg0):
11064 if not arg0.__class__ is union_set:
11065 arg0 = union_set(arg0)
11069 res = isl.isl_union_set_is_empty(arg0.ptr)
11073 def is_equal(arg0, arg1):
11075 if not arg0.__class__ is union_set:
11076 arg0 = union_set(arg0)
11080 if not arg1.__class__ is union_set:
11081 arg1 = union_set(arg1)
11085 res = isl.isl_union_set_is_equal(arg0.ptr, arg1.ptr)
11089 def is_strict_subset(arg0, arg1):
11091 if not arg0.__class__ is union_set:
11092 arg0 = union_set(arg0)
11096 if not arg1.__class__ is union_set:
11097 arg1 = union_set(arg1)
11101 res = isl.isl_union_set_is_strict_subset(arg0.ptr, arg1.ptr)
11105 def is_subset(arg0, arg1):
11107 if not arg0.__class__ is union_set:
11108 arg0 = union_set(arg0)
11112 if not arg1.__class__ is union_set:
11113 arg1 = union_set(arg1)
11117 res = isl.isl_union_set_is_subset(arg0.ptr, arg1.ptr)
11123 if not arg0.__class__ is union_set:
11124 arg0 = union_set(arg0)
11128 res = isl.isl_union_set_isa_set(arg0.ptr)
11134 if not arg0.__class__ is union_set:
11135 arg0 = union_set(arg0)
11139 res = isl.isl_union_set_lexmax(isl.isl_union_set_copy(arg0.ptr))
11140 obj = union_set(ctx=ctx, ptr=res)
11144 if not arg0.__class__ is union_set:
11145 arg0 = union_set(arg0)
11149 res = isl.isl_union_set_lexmin(isl.isl_union_set_copy(arg0.ptr))
11150 obj = union_set(ctx=ctx, ptr=res)
11154 if not arg0.__class__ is union_set:
11155 arg0 = union_set(arg0)
11159 res = isl.isl_union_set_params(isl.isl_union_set_copy(arg0.ptr))
11160 obj = set(ctx=ctx, ptr=res)
11162 def polyhedral_hull(arg0):
11164 if not arg0.__class__ is union_set:
11165 arg0 = union_set(arg0)
11169 res = isl.isl_union_set_polyhedral_hull(isl.isl_union_set_copy(arg0.ptr))
11170 obj = union_set(ctx=ctx, ptr=res)
11172 def preimage(*args):
11173 if len(args) == 2 and args[1].__class__ is multi_aff:
11176 if not args[0].__class__ is union_set:
11177 args[0] = union_set(args[0])
11181 res = isl.isl_union_set_preimage_multi_aff(isl.isl_union_set_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
11182 obj = union_set(ctx=ctx, ptr=res)
11184 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
11187 if not args[0].__class__ is union_set:
11188 args[0] = union_set(args[0])
11192 res = isl.isl_union_set_preimage_pw_multi_aff(isl.isl_union_set_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
11193 obj = union_set(ctx=ctx, ptr=res)
11195 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
11198 if not args[0].__class__ is union_set:
11199 args[0] = union_set(args[0])
11203 res = isl.isl_union_set_preimage_union_pw_multi_aff(isl.isl_union_set_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
11204 obj = union_set(ctx=ctx, ptr=res)
11207 def project_out_all_params(arg0):
11209 if not arg0.__class__ is union_set:
11210 arg0 = union_set(arg0)
11214 res = isl.isl_union_set_project_out_all_params(isl.isl_union_set_copy(arg0.ptr))
11215 obj = union_set(ctx=ctx, ptr=res)
11217 def sample_point(arg0):
11219 if not arg0.__class__ is union_set:
11220 arg0 = union_set(arg0)
11224 res = isl.isl_union_set_sample_point(isl.isl_union_set_copy(arg0.ptr))
11225 obj = point(ctx=ctx, ptr=res)
11227 def set_list(arg0):
11229 if not arg0.__class__ is union_set:
11230 arg0 = union_set(arg0)
11234 res = isl.isl_union_set_get_set_list(arg0.ptr)
11235 obj = set_list(ctx=ctx, ptr=res)
11237 def get_set_list(arg0):
11238 return arg0.set_list()
11241 if not arg0.__class__ is union_set:
11242 arg0 = union_set(arg0)
11246 res = isl.isl_union_set_get_space(arg0.ptr)
11247 obj = space(ctx=ctx, ptr=res)
11249 def get_space(arg0):
11250 return arg0.space()
11251 def subtract(arg0, arg1):
11253 if not arg0.__class__ is union_set:
11254 arg0 = union_set(arg0)
11258 if not arg1.__class__ is union_set:
11259 arg1 = union_set(arg1)
11263 res = isl.isl_union_set_subtract(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
11264 obj = union_set(ctx=ctx, ptr=res)
11268 if not arg0.__class__ is union_set:
11269 arg0 = union_set(arg0)
11273 res = isl.isl_union_set_to_list(isl.isl_union_set_copy(arg0.ptr))
11274 obj = union_set_list(ctx=ctx, ptr=res)
11276 def union(arg0, arg1):
11278 if not arg0.__class__ is union_set:
11279 arg0 = union_set(arg0)
11283 if not arg1.__class__ is union_set:
11284 arg1 = union_set(arg1)
11288 res = isl.isl_union_set_union(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
11289 obj = union_set(ctx=ctx, ptr=res)
11291 def universe(arg0):
11293 if not arg0.__class__ is union_set:
11294 arg0 = union_set(arg0)
11298 res = isl.isl_union_set_universe(isl.isl_union_set_copy(arg0.ptr))
11299 obj = union_set(ctx=ctx, ptr=res)
11303 if not arg0.__class__ is union_set:
11304 arg0 = union_set(arg0)
11308 res = isl.isl_union_set_unwrap(isl.isl_union_set_copy(arg0.ptr))
11309 obj = union_map(ctx=ctx, ptr=res)
11312 isl.isl_union_set_from_basic_set.restype = c_void_p
11313 isl.isl_union_set_from_basic_set.argtypes = [c_void_p]
11314 isl.isl_union_set_from_point.restype = c_void_p
11315 isl.isl_union_set_from_point.argtypes = [c_void_p]
11316 isl.isl_union_set_from_set.restype = c_void_p
11317 isl.isl_union_set_from_set.argtypes = [c_void_p]
11318 isl.isl_union_set_read_from_str.restype = c_void_p
11319 isl.isl_union_set_read_from_str.argtypes = [Context, c_char_p]
11320 isl.isl_union_set_affine_hull.restype = c_void_p
11321 isl.isl_union_set_affine_hull.argtypes = [c_void_p]
11322 isl.isl_union_set_apply.restype = c_void_p
11323 isl.isl_union_set_apply.argtypes = [c_void_p, c_void_p]
11324 isl.isl_union_set_as_set.restype = c_void_p
11325 isl.isl_union_set_as_set.argtypes = [c_void_p]
11326 isl.isl_union_set_coalesce.restype = c_void_p
11327 isl.isl_union_set_coalesce.argtypes = [c_void_p]
11328 isl.isl_union_set_compute_divs.restype = c_void_p
11329 isl.isl_union_set_compute_divs.argtypes = [c_void_p]
11330 isl.isl_union_set_detect_equalities.restype = c_void_p
11331 isl.isl_union_set_detect_equalities.argtypes = [c_void_p]
11332 isl.isl_union_set_drop_unused_params.restype = c_void_p
11333 isl.isl_union_set_drop_unused_params.argtypes = [c_void_p]
11334 isl.isl_union_set_empty_ctx.restype = c_void_p
11335 isl.isl_union_set_empty_ctx.argtypes = [Context]
11336 isl.isl_union_set_every_set.argtypes = [c_void_p, c_void_p, c_void_p]
11337 isl.isl_union_set_extract_set.restype = c_void_p
11338 isl.isl_union_set_extract_set.argtypes = [c_void_p, c_void_p]
11339 isl.isl_union_set_foreach_point.argtypes = [c_void_p, c_void_p, c_void_p]
11340 isl.isl_union_set_foreach_set.argtypes = [c_void_p, c_void_p, c_void_p]
11341 isl.isl_union_set_gist.restype = c_void_p
11342 isl.isl_union_set_gist.argtypes = [c_void_p, c_void_p]
11343 isl.isl_union_set_gist_params.restype = c_void_p
11344 isl.isl_union_set_gist_params.argtypes = [c_void_p, c_void_p]
11345 isl.isl_union_set_identity.restype = c_void_p
11346 isl.isl_union_set_identity.argtypes = [c_void_p]
11347 isl.isl_union_set_intersect.restype = c_void_p
11348 isl.isl_union_set_intersect.argtypes = [c_void_p, c_void_p]
11349 isl.isl_union_set_intersect_params.restype = c_void_p
11350 isl.isl_union_set_intersect_params.argtypes = [c_void_p, c_void_p]
11351 isl.isl_union_set_is_disjoint.argtypes = [c_void_p, c_void_p]
11352 isl.isl_union_set_is_empty.argtypes = [c_void_p]
11353 isl.isl_union_set_is_equal.argtypes = [c_void_p, c_void_p]
11354 isl.isl_union_set_is_strict_subset.argtypes = [c_void_p, c_void_p]
11355 isl.isl_union_set_is_subset.argtypes = [c_void_p, c_void_p]
11356 isl.isl_union_set_isa_set.argtypes = [c_void_p]
11357 isl.isl_union_set_lexmax.restype = c_void_p
11358 isl.isl_union_set_lexmax.argtypes = [c_void_p]
11359 isl.isl_union_set_lexmin.restype = c_void_p
11360 isl.isl_union_set_lexmin.argtypes = [c_void_p]
11361 isl.isl_union_set_params.restype = c_void_p
11362 isl.isl_union_set_params.argtypes = [c_void_p]
11363 isl.isl_union_set_polyhedral_hull.restype = c_void_p
11364 isl.isl_union_set_polyhedral_hull.argtypes = [c_void_p]
11365 isl.isl_union_set_preimage_multi_aff.restype = c_void_p
11366 isl.isl_union_set_preimage_multi_aff.argtypes = [c_void_p, c_void_p]
11367 isl.isl_union_set_preimage_pw_multi_aff.restype = c_void_p
11368 isl.isl_union_set_preimage_pw_multi_aff.argtypes = [c_void_p, c_void_p]
11369 isl.isl_union_set_preimage_union_pw_multi_aff.restype = c_void_p
11370 isl.isl_union_set_preimage_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
11371 isl.isl_union_set_project_out_all_params.restype = c_void_p
11372 isl.isl_union_set_project_out_all_params.argtypes = [c_void_p]
11373 isl.isl_union_set_sample_point.restype = c_void_p
11374 isl.isl_union_set_sample_point.argtypes = [c_void_p]
11375 isl.isl_union_set_get_set_list.restype = c_void_p
11376 isl.isl_union_set_get_set_list.argtypes = [c_void_p]
11377 isl.isl_union_set_get_space.restype = c_void_p
11378 isl.isl_union_set_get_space.argtypes = [c_void_p]
11379 isl.isl_union_set_subtract.restype = c_void_p
11380 isl.isl_union_set_subtract.argtypes = [c_void_p, c_void_p]
11381 isl.isl_union_set_to_list.restype = c_void_p
11382 isl.isl_union_set_to_list.argtypes = [c_void_p]
11383 isl.isl_union_set_union.restype = c_void_p
11384 isl.isl_union_set_union.argtypes = [c_void_p, c_void_p]
11385 isl.isl_union_set_universe.restype = c_void_p
11386 isl.isl_union_set_universe.argtypes = [c_void_p]
11387 isl.isl_union_set_unwrap.restype = c_void_p
11388 isl.isl_union_set_unwrap.argtypes = [c_void_p]
11389 isl.isl_union_set_copy.restype = c_void_p
11390 isl.isl_union_set_copy.argtypes = [c_void_p]
11391 isl.isl_union_set_free.restype = c_void_p
11392 isl.isl_union_set_free.argtypes = [c_void_p]
11393 isl.isl_union_set_to_str.restype = POINTER(c_char)
11394 isl.isl_union_set_to_str.argtypes = [c_void_p]
11396 class set(union_set):
11397 def __init__(self, *args, **keywords):
11398 if "ptr" in keywords:
11399 self.ctx = keywords["ctx"]
11400 self.ptr = keywords["ptr"]
11402 if len(args) == 1 and args[0].__class__ is basic_set:
11403 self.ctx = Context.getDefaultInstance()
11404 self.ptr = isl.isl_set_from_basic_set(isl.isl_basic_set_copy(args[0].ptr))
11406 if len(args) == 1 and args[0].__class__ is point:
11407 self.ctx = Context.getDefaultInstance()
11408 self.ptr = isl.isl_set_from_point(isl.isl_point_copy(args[0].ptr))
11410 if len(args) == 1 and type(args[0]) == str:
11411 self.ctx = Context.getDefaultInstance()
11412 self.ptr = isl.isl_set_read_from_str(self.ctx, args[0].encode('ascii'))
11416 if hasattr(self, 'ptr'):
11417 isl.isl_set_free(self.ptr)
11420 if not arg0.__class__ is set:
11424 ptr = isl.isl_set_to_str(arg0.ptr)
11425 res = cast(ptr, c_char_p).value.decode('ascii')
11428 def __repr__(self):
11431 return 'isl.set("""%s""")' % s
11433 return 'isl.set("%s")' % s
11434 def affine_hull(arg0):
11436 if not arg0.__class__ is set:
11441 res = isl.isl_set_affine_hull(isl.isl_set_copy(arg0.ptr))
11442 obj = basic_set(ctx=ctx, ptr=res)
11444 def apply(arg0, arg1):
11446 if not arg0.__class__ is set:
11451 if not arg1.__class__ is map:
11454 return union_set(arg0).apply(arg1)
11456 res = isl.isl_set_apply(isl.isl_set_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
11457 obj = set(ctx=ctx, ptr=res)
11459 def as_pw_multi_aff(arg0):
11461 if not arg0.__class__ is set:
11466 res = isl.isl_set_as_pw_multi_aff(isl.isl_set_copy(arg0.ptr))
11467 obj = pw_multi_aff(ctx=ctx, ptr=res)
11469 def bind(arg0, arg1):
11471 if not arg0.__class__ is set:
11476 if not arg1.__class__ is multi_id:
11477 arg1 = multi_id(arg1)
11479 return union_set(arg0).bind(arg1)
11481 res = isl.isl_set_bind(isl.isl_set_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
11482 obj = set(ctx=ctx, ptr=res)
11484 def coalesce(arg0):
11486 if not arg0.__class__ is set:
11491 res = isl.isl_set_coalesce(isl.isl_set_copy(arg0.ptr))
11492 obj = set(ctx=ctx, ptr=res)
11494 def complement(arg0):
11496 if not arg0.__class__ is set:
11501 res = isl.isl_set_complement(isl.isl_set_copy(arg0.ptr))
11502 obj = set(ctx=ctx, ptr=res)
11504 def detect_equalities(arg0):
11506 if not arg0.__class__ is set:
11511 res = isl.isl_set_detect_equalities(isl.isl_set_copy(arg0.ptr))
11512 obj = set(ctx=ctx, ptr=res)
11514 def dim_max_val(arg0, arg1):
11516 if not arg0.__class__ is set:
11521 res = isl.isl_set_dim_max_val(isl.isl_set_copy(arg0.ptr), arg1)
11522 obj = val(ctx=ctx, ptr=res)
11524 def dim_min_val(arg0, arg1):
11526 if not arg0.__class__ is set:
11531 res = isl.isl_set_dim_min_val(isl.isl_set_copy(arg0.ptr), arg1)
11532 obj = val(ctx=ctx, ptr=res)
11534 def drop_unused_params(arg0):
11536 if not arg0.__class__ is set:
11541 res = isl.isl_set_drop_unused_params(isl.isl_set_copy(arg0.ptr))
11542 obj = set(ctx=ctx, ptr=res)
11547 if not arg0.__class__ is space:
11552 res = isl.isl_set_empty(isl.isl_space_copy(arg0.ptr))
11553 obj = set(ctx=ctx, ptr=res)
11557 if not arg0.__class__ is set:
11562 res = isl.isl_set_flatten(isl.isl_set_copy(arg0.ptr))
11563 obj = set(ctx=ctx, ptr=res)
11565 def foreach_basic_set(arg0, arg1):
11567 if not arg0.__class__ is set:
11572 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
11573 def cb_func(cb_arg0, cb_arg1):
11574 cb_arg0 = basic_set(ctx=arg0.ctx, ptr=(cb_arg0))
11577 except BaseException as e:
11583 res = isl.isl_set_foreach_basic_set(arg0.ptr, cb1, None)
11584 if exc_info[0] is not None:
11588 def foreach_point(arg0, arg1):
11590 if not arg0.__class__ is set:
11595 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
11596 def cb_func(cb_arg0, cb_arg1):
11597 cb_arg0 = point(ctx=arg0.ctx, ptr=(cb_arg0))
11600 except BaseException as e:
11606 res = isl.isl_set_foreach_point(arg0.ptr, cb1, None)
11607 if exc_info[0] is not None:
11611 def gist(arg0, arg1):
11613 if not arg0.__class__ is set:
11618 if not arg1.__class__ is set:
11621 return union_set(arg0).gist(arg1)
11623 res = isl.isl_set_gist(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11624 obj = set(ctx=ctx, ptr=res)
11626 def gist_params(arg0, arg1):
11628 if not arg0.__class__ is set:
11633 if not arg1.__class__ is set:
11636 return union_set(arg0).gist_params(arg1)
11638 res = isl.isl_set_gist_params(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11639 obj = set(ctx=ctx, ptr=res)
11641 def identity(arg0):
11643 if not arg0.__class__ is set:
11648 res = isl.isl_set_identity(isl.isl_set_copy(arg0.ptr))
11649 obj = map(ctx=ctx, ptr=res)
11651 def indicator_function(arg0):
11653 if not arg0.__class__ is set:
11658 res = isl.isl_set_indicator_function(isl.isl_set_copy(arg0.ptr))
11659 obj = pw_aff(ctx=ctx, ptr=res)
11661 def insert_domain(arg0, arg1):
11663 if not arg0.__class__ is set:
11668 if not arg1.__class__ is space:
11671 return union_set(arg0).insert_domain(arg1)
11673 res = isl.isl_set_insert_domain(isl.isl_set_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
11674 obj = map(ctx=ctx, ptr=res)
11676 def intersect(arg0, arg1):
11678 if not arg0.__class__ is set:
11683 if not arg1.__class__ is set:
11686 return union_set(arg0).intersect(arg1)
11688 res = isl.isl_set_intersect(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11689 obj = set(ctx=ctx, ptr=res)
11691 def intersect_params(arg0, arg1):
11693 if not arg0.__class__ is set:
11698 if not arg1.__class__ is set:
11701 return union_set(arg0).intersect_params(arg1)
11703 res = isl.isl_set_intersect_params(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11704 obj = set(ctx=ctx, ptr=res)
11706 def involves_locals(arg0):
11708 if not arg0.__class__ is set:
11713 res = isl.isl_set_involves_locals(arg0.ptr)
11717 def is_disjoint(arg0, arg1):
11719 if not arg0.__class__ is set:
11724 if not arg1.__class__ is set:
11727 return union_set(arg0).is_disjoint(arg1)
11729 res = isl.isl_set_is_disjoint(arg0.ptr, arg1.ptr)
11733 def is_empty(arg0):
11735 if not arg0.__class__ is set:
11740 res = isl.isl_set_is_empty(arg0.ptr)
11744 def is_equal(arg0, arg1):
11746 if not arg0.__class__ is set:
11751 if not arg1.__class__ is set:
11754 return union_set(arg0).is_equal(arg1)
11756 res = isl.isl_set_is_equal(arg0.ptr, arg1.ptr)
11760 def is_singleton(arg0):
11762 if not arg0.__class__ is set:
11767 res = isl.isl_set_is_singleton(arg0.ptr)
11771 def is_strict_subset(arg0, arg1):
11773 if not arg0.__class__ is set:
11778 if not arg1.__class__ is set:
11781 return union_set(arg0).is_strict_subset(arg1)
11783 res = isl.isl_set_is_strict_subset(arg0.ptr, arg1.ptr)
11787 def is_subset(arg0, arg1):
11789 if not arg0.__class__ is set:
11794 if not arg1.__class__ is set:
11797 return union_set(arg0).is_subset(arg1)
11799 res = isl.isl_set_is_subset(arg0.ptr, arg1.ptr)
11803 def is_wrapping(arg0):
11805 if not arg0.__class__ is set:
11810 res = isl.isl_set_is_wrapping(arg0.ptr)
11814 def lattice_tile(arg0):
11816 if not arg0.__class__ is set:
11821 res = isl.isl_set_get_lattice_tile(arg0.ptr)
11822 obj = fixed_box(ctx=ctx, ptr=res)
11824 def get_lattice_tile(arg0):
11825 return arg0.lattice_tile()
11828 if not arg0.__class__ is set:
11833 res = isl.isl_set_lexmax(isl.isl_set_copy(arg0.ptr))
11834 obj = set(ctx=ctx, ptr=res)
11836 def lexmax_pw_multi_aff(arg0):
11838 if not arg0.__class__ is set:
11843 res = isl.isl_set_lexmax_pw_multi_aff(isl.isl_set_copy(arg0.ptr))
11844 obj = pw_multi_aff(ctx=ctx, ptr=res)
11848 if not arg0.__class__ is set:
11853 res = isl.isl_set_lexmin(isl.isl_set_copy(arg0.ptr))
11854 obj = set(ctx=ctx, ptr=res)
11856 def lexmin_pw_multi_aff(arg0):
11858 if not arg0.__class__ is set:
11863 res = isl.isl_set_lexmin_pw_multi_aff(isl.isl_set_copy(arg0.ptr))
11864 obj = pw_multi_aff(ctx=ctx, ptr=res)
11866 def lower_bound(*args):
11867 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
11870 if not args[0].__class__ is set:
11871 args[0] = set(args[0])
11875 res = isl.isl_set_lower_bound_multi_pw_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
11876 obj = set(ctx=ctx, ptr=res)
11878 if len(args) == 2 and args[1].__class__ is multi_val:
11881 if not args[0].__class__ is set:
11882 args[0] = set(args[0])
11886 res = isl.isl_set_lower_bound_multi_val(isl.isl_set_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
11887 obj = set(ctx=ctx, ptr=res)
11890 def max_multi_pw_aff(arg0):
11892 if not arg0.__class__ is set:
11897 res = isl.isl_set_max_multi_pw_aff(isl.isl_set_copy(arg0.ptr))
11898 obj = multi_pw_aff(ctx=ctx, ptr=res)
11900 def max_val(arg0, arg1):
11902 if not arg0.__class__ is set:
11907 if not arg1.__class__ is aff:
11910 return union_set(arg0).max_val(arg1)
11912 res = isl.isl_set_max_val(arg0.ptr, arg1.ptr)
11913 obj = val(ctx=ctx, ptr=res)
11915 def min_multi_pw_aff(arg0):
11917 if not arg0.__class__ is set:
11922 res = isl.isl_set_min_multi_pw_aff(isl.isl_set_copy(arg0.ptr))
11923 obj = multi_pw_aff(ctx=ctx, ptr=res)
11925 def min_val(arg0, arg1):
11927 if not arg0.__class__ is set:
11932 if not arg1.__class__ is aff:
11935 return union_set(arg0).min_val(arg1)
11937 res = isl.isl_set_min_val(arg0.ptr, arg1.ptr)
11938 obj = val(ctx=ctx, ptr=res)
11940 def n_basic_set(arg0):
11942 if not arg0.__class__ is set:
11947 res = isl.isl_set_n_basic_set(arg0.ptr)
11951 def param_pw_aff_on_domain(*args):
11952 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
11955 if not args[0].__class__ is set:
11956 args[0] = set(args[0])
11960 if not args[1].__class__ is id:
11961 args[1] = id(args[1])
11965 res = isl.isl_set_param_pw_aff_on_domain_id(isl.isl_set_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
11966 obj = pw_aff(ctx=ctx, ptr=res)
11971 if not arg0.__class__ is set:
11976 res = isl.isl_set_params(isl.isl_set_copy(arg0.ptr))
11977 obj = set(ctx=ctx, ptr=res)
11979 def plain_multi_val_if_fixed(arg0):
11981 if not arg0.__class__ is set:
11986 res = isl.isl_set_get_plain_multi_val_if_fixed(arg0.ptr)
11987 obj = multi_val(ctx=ctx, ptr=res)
11989 def get_plain_multi_val_if_fixed(arg0):
11990 return arg0.plain_multi_val_if_fixed()
11991 def polyhedral_hull(arg0):
11993 if not arg0.__class__ is set:
11998 res = isl.isl_set_polyhedral_hull(isl.isl_set_copy(arg0.ptr))
11999 obj = basic_set(ctx=ctx, ptr=res)
12001 def preimage(*args):
12002 if len(args) == 2 and args[1].__class__ is multi_aff:
12005 if not args[0].__class__ is set:
12006 args[0] = set(args[0])
12010 res = isl.isl_set_preimage_multi_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
12011 obj = set(ctx=ctx, ptr=res)
12013 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
12016 if not args[0].__class__ is set:
12017 args[0] = set(args[0])
12021 res = isl.isl_set_preimage_multi_pw_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
12022 obj = set(ctx=ctx, ptr=res)
12024 if len(args) == 2 and args[1].__class__ is pw_multi_aff:
12027 if not args[0].__class__ is set:
12028 args[0] = set(args[0])
12032 res = isl.isl_set_preimage_pw_multi_aff(isl.isl_set_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
12033 obj = set(ctx=ctx, ptr=res)
12036 def product(arg0, arg1):
12038 if not arg0.__class__ is set:
12043 if not arg1.__class__ is set:
12046 return union_set(arg0).product(arg1)
12048 res = isl.isl_set_product(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
12049 obj = set(ctx=ctx, ptr=res)
12051 def project_out_all_params(arg0):
12053 if not arg0.__class__ is set:
12058 res = isl.isl_set_project_out_all_params(isl.isl_set_copy(arg0.ptr))
12059 obj = set(ctx=ctx, ptr=res)
12061 def project_out_param(*args):
12062 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
12065 if not args[0].__class__ is set:
12066 args[0] = set(args[0])
12070 if not args[1].__class__ is id:
12071 args[1] = id(args[1])
12075 res = isl.isl_set_project_out_param_id(isl.isl_set_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
12076 obj = set(ctx=ctx, ptr=res)
12078 if len(args) == 2 and args[1].__class__ is id_list:
12081 if not args[0].__class__ is set:
12082 args[0] = set(args[0])
12086 res = isl.isl_set_project_out_param_id_list(isl.isl_set_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
12087 obj = set(ctx=ctx, ptr=res)
12090 def pw_aff_on_domain(*args):
12091 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
12094 if not args[0].__class__ is set:
12095 args[0] = set(args[0])
12099 if not args[1].__class__ is val:
12100 args[1] = val(args[1])
12104 res = isl.isl_set_pw_aff_on_domain_val(isl.isl_set_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
12105 obj = pw_aff(ctx=ctx, ptr=res)
12108 def pw_multi_aff_on_domain(*args):
12109 if len(args) == 2 and args[1].__class__ is multi_val:
12112 if not args[0].__class__ is set:
12113 args[0] = set(args[0])
12117 res = isl.isl_set_pw_multi_aff_on_domain_multi_val(isl.isl_set_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
12118 obj = pw_multi_aff(ctx=ctx, ptr=res)
12123 if not arg0.__class__ is set:
12128 res = isl.isl_set_sample(isl.isl_set_copy(arg0.ptr))
12129 obj = basic_set(ctx=ctx, ptr=res)
12131 def sample_point(arg0):
12133 if not arg0.__class__ is set:
12138 res = isl.isl_set_sample_point(isl.isl_set_copy(arg0.ptr))
12139 obj = point(ctx=ctx, ptr=res)
12141 def simple_fixed_box_hull(arg0):
12143 if not arg0.__class__ is set:
12148 res = isl.isl_set_get_simple_fixed_box_hull(arg0.ptr)
12149 obj = fixed_box(ctx=ctx, ptr=res)
12151 def get_simple_fixed_box_hull(arg0):
12152 return arg0.simple_fixed_box_hull()
12155 if not arg0.__class__ is set:
12160 res = isl.isl_set_get_space(arg0.ptr)
12161 obj = space(ctx=ctx, ptr=res)
12163 def get_space(arg0):
12164 return arg0.space()
12165 def stride(arg0, arg1):
12167 if not arg0.__class__ is set:
12172 res = isl.isl_set_get_stride(arg0.ptr, arg1)
12173 obj = val(ctx=ctx, ptr=res)
12175 def get_stride(arg0, arg1):
12176 return arg0.stride(arg1)
12177 def subtract(arg0, arg1):
12179 if not arg0.__class__ is set:
12184 if not arg1.__class__ is set:
12187 return union_set(arg0).subtract(arg1)
12189 res = isl.isl_set_subtract(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
12190 obj = set(ctx=ctx, ptr=res)
12194 if not arg0.__class__ is set:
12199 res = isl.isl_set_to_list(isl.isl_set_copy(arg0.ptr))
12200 obj = set_list(ctx=ctx, ptr=res)
12202 def to_union_set(arg0):
12204 if not arg0.__class__ is set:
12209 res = isl.isl_set_to_union_set(isl.isl_set_copy(arg0.ptr))
12210 obj = union_set(ctx=ctx, ptr=res)
12212 def translation(arg0):
12214 if not arg0.__class__ is set:
12219 res = isl.isl_set_translation(isl.isl_set_copy(arg0.ptr))
12220 obj = map(ctx=ctx, ptr=res)
12222 def tuple_dim(arg0):
12224 if not arg0.__class__ is set:
12229 res = isl.isl_set_tuple_dim(arg0.ptr)
12233 def unbind_params(arg0, arg1):
12235 if not arg0.__class__ is set:
12240 if not arg1.__class__ is multi_id:
12241 arg1 = multi_id(arg1)
12243 return union_set(arg0).unbind_params(arg1)
12245 res = isl.isl_set_unbind_params(isl.isl_set_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
12246 obj = set(ctx=ctx, ptr=res)
12248 def unbind_params_insert_domain(arg0, arg1):
12250 if not arg0.__class__ is set:
12255 if not arg1.__class__ is multi_id:
12256 arg1 = multi_id(arg1)
12258 return union_set(arg0).unbind_params_insert_domain(arg1)
12260 res = isl.isl_set_unbind_params_insert_domain(isl.isl_set_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
12261 obj = map(ctx=ctx, ptr=res)
12263 def union(arg0, arg1):
12265 if not arg0.__class__ is set:
12270 if not arg1.__class__ is set:
12273 return union_set(arg0).union(arg1)
12275 res = isl.isl_set_union(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
12276 obj = set(ctx=ctx, ptr=res)
12279 def universe(arg0):
12281 if not arg0.__class__ is space:
12286 res = isl.isl_set_universe(isl.isl_space_copy(arg0.ptr))
12287 obj = set(ctx=ctx, ptr=res)
12289 def unshifted_simple_hull(arg0):
12291 if not arg0.__class__ is set:
12296 res = isl.isl_set_unshifted_simple_hull(isl.isl_set_copy(arg0.ptr))
12297 obj = basic_set(ctx=ctx, ptr=res)
12301 if not arg0.__class__ is set:
12306 res = isl.isl_set_unwrap(isl.isl_set_copy(arg0.ptr))
12307 obj = map(ctx=ctx, ptr=res)
12309 def upper_bound(*args):
12310 if len(args) == 2 and args[1].__class__ is multi_pw_aff:
12313 if not args[0].__class__ is set:
12314 args[0] = set(args[0])
12318 res = isl.isl_set_upper_bound_multi_pw_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
12319 obj = set(ctx=ctx, ptr=res)
12321 if len(args) == 2 and args[1].__class__ is multi_val:
12324 if not args[0].__class__ is set:
12325 args[0] = set(args[0])
12329 res = isl.isl_set_upper_bound_multi_val(isl.isl_set_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
12330 obj = set(ctx=ctx, ptr=res)
12333 def wrapped_reverse(arg0):
12335 if not arg0.__class__ is set:
12340 res = isl.isl_set_wrapped_reverse(isl.isl_set_copy(arg0.ptr))
12341 obj = set(ctx=ctx, ptr=res)
12344 isl.isl_set_from_basic_set.restype = c_void_p
12345 isl.isl_set_from_basic_set.argtypes = [c_void_p]
12346 isl.isl_set_from_point.restype = c_void_p
12347 isl.isl_set_from_point.argtypes = [c_void_p]
12348 isl.isl_set_read_from_str.restype = c_void_p
12349 isl.isl_set_read_from_str.argtypes = [Context, c_char_p]
12350 isl.isl_set_affine_hull.restype = c_void_p
12351 isl.isl_set_affine_hull.argtypes = [c_void_p]
12352 isl.isl_set_apply.restype = c_void_p
12353 isl.isl_set_apply.argtypes = [c_void_p, c_void_p]
12354 isl.isl_set_as_pw_multi_aff.restype = c_void_p
12355 isl.isl_set_as_pw_multi_aff.argtypes = [c_void_p]
12356 isl.isl_set_bind.restype = c_void_p
12357 isl.isl_set_bind.argtypes = [c_void_p, c_void_p]
12358 isl.isl_set_coalesce.restype = c_void_p
12359 isl.isl_set_coalesce.argtypes = [c_void_p]
12360 isl.isl_set_complement.restype = c_void_p
12361 isl.isl_set_complement.argtypes = [c_void_p]
12362 isl.isl_set_detect_equalities.restype = c_void_p
12363 isl.isl_set_detect_equalities.argtypes = [c_void_p]
12364 isl.isl_set_dim_max_val.restype = c_void_p
12365 isl.isl_set_dim_max_val.argtypes = [c_void_p, c_int]
12366 isl.isl_set_dim_min_val.restype = c_void_p
12367 isl.isl_set_dim_min_val.argtypes = [c_void_p, c_int]
12368 isl.isl_set_drop_unused_params.restype = c_void_p
12369 isl.isl_set_drop_unused_params.argtypes = [c_void_p]
12370 isl.isl_set_empty.restype = c_void_p
12371 isl.isl_set_empty.argtypes = [c_void_p]
12372 isl.isl_set_flatten.restype = c_void_p
12373 isl.isl_set_flatten.argtypes = [c_void_p]
12374 isl.isl_set_foreach_basic_set.argtypes = [c_void_p, c_void_p, c_void_p]
12375 isl.isl_set_foreach_point.argtypes = [c_void_p, c_void_p, c_void_p]
12376 isl.isl_set_gist.restype = c_void_p
12377 isl.isl_set_gist.argtypes = [c_void_p, c_void_p]
12378 isl.isl_set_gist_params.restype = c_void_p
12379 isl.isl_set_gist_params.argtypes = [c_void_p, c_void_p]
12380 isl.isl_set_identity.restype = c_void_p
12381 isl.isl_set_identity.argtypes = [c_void_p]
12382 isl.isl_set_indicator_function.restype = c_void_p
12383 isl.isl_set_indicator_function.argtypes = [c_void_p]
12384 isl.isl_set_insert_domain.restype = c_void_p
12385 isl.isl_set_insert_domain.argtypes = [c_void_p, c_void_p]
12386 isl.isl_set_intersect.restype = c_void_p
12387 isl.isl_set_intersect.argtypes = [c_void_p, c_void_p]
12388 isl.isl_set_intersect_params.restype = c_void_p
12389 isl.isl_set_intersect_params.argtypes = [c_void_p, c_void_p]
12390 isl.isl_set_involves_locals.argtypes = [c_void_p]
12391 isl.isl_set_is_disjoint.argtypes = [c_void_p, c_void_p]
12392 isl.isl_set_is_empty.argtypes = [c_void_p]
12393 isl.isl_set_is_equal.argtypes = [c_void_p, c_void_p]
12394 isl.isl_set_is_singleton.argtypes = [c_void_p]
12395 isl.isl_set_is_strict_subset.argtypes = [c_void_p, c_void_p]
12396 isl.isl_set_is_subset.argtypes = [c_void_p, c_void_p]
12397 isl.isl_set_is_wrapping.argtypes = [c_void_p]
12398 isl.isl_set_get_lattice_tile.restype = c_void_p
12399 isl.isl_set_get_lattice_tile.argtypes = [c_void_p]
12400 isl.isl_set_lexmax.restype = c_void_p
12401 isl.isl_set_lexmax.argtypes = [c_void_p]
12402 isl.isl_set_lexmax_pw_multi_aff.restype = c_void_p
12403 isl.isl_set_lexmax_pw_multi_aff.argtypes = [c_void_p]
12404 isl.isl_set_lexmin.restype = c_void_p
12405 isl.isl_set_lexmin.argtypes = [c_void_p]
12406 isl.isl_set_lexmin_pw_multi_aff.restype = c_void_p
12407 isl.isl_set_lexmin_pw_multi_aff.argtypes = [c_void_p]
12408 isl.isl_set_lower_bound_multi_pw_aff.restype = c_void_p
12409 isl.isl_set_lower_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
12410 isl.isl_set_lower_bound_multi_val.restype = c_void_p
12411 isl.isl_set_lower_bound_multi_val.argtypes = [c_void_p, c_void_p]
12412 isl.isl_set_max_multi_pw_aff.restype = c_void_p
12413 isl.isl_set_max_multi_pw_aff.argtypes = [c_void_p]
12414 isl.isl_set_max_val.restype = c_void_p
12415 isl.isl_set_max_val.argtypes = [c_void_p, c_void_p]
12416 isl.isl_set_min_multi_pw_aff.restype = c_void_p
12417 isl.isl_set_min_multi_pw_aff.argtypes = [c_void_p]
12418 isl.isl_set_min_val.restype = c_void_p
12419 isl.isl_set_min_val.argtypes = [c_void_p, c_void_p]
12420 isl.isl_set_n_basic_set.argtypes = [c_void_p]
12421 isl.isl_set_param_pw_aff_on_domain_id.restype = c_void_p
12422 isl.isl_set_param_pw_aff_on_domain_id.argtypes = [c_void_p, c_void_p]
12423 isl.isl_set_params.restype = c_void_p
12424 isl.isl_set_params.argtypes = [c_void_p]
12425 isl.isl_set_get_plain_multi_val_if_fixed.restype = c_void_p
12426 isl.isl_set_get_plain_multi_val_if_fixed.argtypes = [c_void_p]
12427 isl.isl_set_polyhedral_hull.restype = c_void_p
12428 isl.isl_set_polyhedral_hull.argtypes = [c_void_p]
12429 isl.isl_set_preimage_multi_aff.restype = c_void_p
12430 isl.isl_set_preimage_multi_aff.argtypes = [c_void_p, c_void_p]
12431 isl.isl_set_preimage_multi_pw_aff.restype = c_void_p
12432 isl.isl_set_preimage_multi_pw_aff.argtypes = [c_void_p, c_void_p]
12433 isl.isl_set_preimage_pw_multi_aff.restype = c_void_p
12434 isl.isl_set_preimage_pw_multi_aff.argtypes = [c_void_p, c_void_p]
12435 isl.isl_set_product.restype = c_void_p
12436 isl.isl_set_product.argtypes = [c_void_p, c_void_p]
12437 isl.isl_set_project_out_all_params.restype = c_void_p
12438 isl.isl_set_project_out_all_params.argtypes = [c_void_p]
12439 isl.isl_set_project_out_param_id.restype = c_void_p
12440 isl.isl_set_project_out_param_id.argtypes = [c_void_p, c_void_p]
12441 isl.isl_set_project_out_param_id_list.restype = c_void_p
12442 isl.isl_set_project_out_param_id_list.argtypes = [c_void_p, c_void_p]
12443 isl.isl_set_pw_aff_on_domain_val.restype = c_void_p
12444 isl.isl_set_pw_aff_on_domain_val.argtypes = [c_void_p, c_void_p]
12445 isl.isl_set_pw_multi_aff_on_domain_multi_val.restype = c_void_p
12446 isl.isl_set_pw_multi_aff_on_domain_multi_val.argtypes = [c_void_p, c_void_p]
12447 isl.isl_set_sample.restype = c_void_p
12448 isl.isl_set_sample.argtypes = [c_void_p]
12449 isl.isl_set_sample_point.restype = c_void_p
12450 isl.isl_set_sample_point.argtypes = [c_void_p]
12451 isl.isl_set_get_simple_fixed_box_hull.restype = c_void_p
12452 isl.isl_set_get_simple_fixed_box_hull.argtypes = [c_void_p]
12453 isl.isl_set_get_space.restype = c_void_p
12454 isl.isl_set_get_space.argtypes = [c_void_p]
12455 isl.isl_set_get_stride.restype = c_void_p
12456 isl.isl_set_get_stride.argtypes = [c_void_p, c_int]
12457 isl.isl_set_subtract.restype = c_void_p
12458 isl.isl_set_subtract.argtypes = [c_void_p, c_void_p]
12459 isl.isl_set_to_list.restype = c_void_p
12460 isl.isl_set_to_list.argtypes = [c_void_p]
12461 isl.isl_set_to_union_set.restype = c_void_p
12462 isl.isl_set_to_union_set.argtypes = [c_void_p]
12463 isl.isl_set_translation.restype = c_void_p
12464 isl.isl_set_translation.argtypes = [c_void_p]
12465 isl.isl_set_tuple_dim.argtypes = [c_void_p]
12466 isl.isl_set_unbind_params.restype = c_void_p
12467 isl.isl_set_unbind_params.argtypes = [c_void_p, c_void_p]
12468 isl.isl_set_unbind_params_insert_domain.restype = c_void_p
12469 isl.isl_set_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
12470 isl.isl_set_union.restype = c_void_p
12471 isl.isl_set_union.argtypes = [c_void_p, c_void_p]
12472 isl.isl_set_universe.restype = c_void_p
12473 isl.isl_set_universe.argtypes = [c_void_p]
12474 isl.isl_set_unshifted_simple_hull.restype = c_void_p
12475 isl.isl_set_unshifted_simple_hull.argtypes = [c_void_p]
12476 isl.isl_set_unwrap.restype = c_void_p
12477 isl.isl_set_unwrap.argtypes = [c_void_p]
12478 isl.isl_set_upper_bound_multi_pw_aff.restype = c_void_p
12479 isl.isl_set_upper_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
12480 isl.isl_set_upper_bound_multi_val.restype = c_void_p
12481 isl.isl_set_upper_bound_multi_val.argtypes = [c_void_p, c_void_p]
12482 isl.isl_set_wrapped_reverse.restype = c_void_p
12483 isl.isl_set_wrapped_reverse.argtypes = [c_void_p]
12484 isl.isl_set_copy.restype = c_void_p
12485 isl.isl_set_copy.argtypes = [c_void_p]
12486 isl.isl_set_free.restype = c_void_p
12487 isl.isl_set_free.argtypes = [c_void_p]
12488 isl.isl_set_to_str.restype = POINTER(c_char)
12489 isl.isl_set_to_str.argtypes = [c_void_p]
12491 class basic_set(set):
12492 def __init__(self, *args, **keywords):
12493 if "ptr" in keywords:
12494 self.ctx = keywords["ctx"]
12495 self.ptr = keywords["ptr"]
12497 if len(args) == 1 and args[0].__class__ is point:
12498 self.ctx = Context.getDefaultInstance()
12499 self.ptr = isl.isl_basic_set_from_point(isl.isl_point_copy(args[0].ptr))
12501 if len(args) == 1 and type(args[0]) == str:
12502 self.ctx = Context.getDefaultInstance()
12503 self.ptr = isl.isl_basic_set_read_from_str(self.ctx, args[0].encode('ascii'))
12507 if hasattr(self, 'ptr'):
12508 isl.isl_basic_set_free(self.ptr)
12511 if not arg0.__class__ is basic_set:
12512 arg0 = basic_set(arg0)
12515 ptr = isl.isl_basic_set_to_str(arg0.ptr)
12516 res = cast(ptr, c_char_p).value.decode('ascii')
12519 def __repr__(self):
12522 return 'isl.basic_set("""%s""")' % s
12524 return 'isl.basic_set("%s")' % s
12525 def affine_hull(arg0):
12527 if not arg0.__class__ is basic_set:
12528 arg0 = basic_set(arg0)
12532 res = isl.isl_basic_set_affine_hull(isl.isl_basic_set_copy(arg0.ptr))
12533 obj = basic_set(ctx=ctx, ptr=res)
12535 def apply(arg0, arg1):
12537 if not arg0.__class__ is basic_set:
12538 arg0 = basic_set(arg0)
12542 if not arg1.__class__ is basic_map:
12543 arg1 = basic_map(arg1)
12545 return set(arg0).apply(arg1)
12547 res = isl.isl_basic_set_apply(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
12548 obj = basic_set(ctx=ctx, ptr=res)
12550 def detect_equalities(arg0):
12552 if not arg0.__class__ is basic_set:
12553 arg0 = basic_set(arg0)
12557 res = isl.isl_basic_set_detect_equalities(isl.isl_basic_set_copy(arg0.ptr))
12558 obj = basic_set(ctx=ctx, ptr=res)
12560 def dim_max_val(arg0, arg1):
12562 if not arg0.__class__ is basic_set:
12563 arg0 = basic_set(arg0)
12567 res = isl.isl_basic_set_dim_max_val(isl.isl_basic_set_copy(arg0.ptr), arg1)
12568 obj = val(ctx=ctx, ptr=res)
12572 if not arg0.__class__ is basic_set:
12573 arg0 = basic_set(arg0)
12577 res = isl.isl_basic_set_flatten(isl.isl_basic_set_copy(arg0.ptr))
12578 obj = basic_set(ctx=ctx, ptr=res)
12580 def gist(arg0, arg1):
12582 if not arg0.__class__ is basic_set:
12583 arg0 = basic_set(arg0)
12587 if not arg1.__class__ is basic_set:
12588 arg1 = basic_set(arg1)
12590 return set(arg0).gist(arg1)
12592 res = isl.isl_basic_set_gist(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12593 obj = basic_set(ctx=ctx, ptr=res)
12595 def intersect(arg0, arg1):
12597 if not arg0.__class__ is basic_set:
12598 arg0 = basic_set(arg0)
12602 if not arg1.__class__ is basic_set:
12603 arg1 = basic_set(arg1)
12605 return set(arg0).intersect(arg1)
12607 res = isl.isl_basic_set_intersect(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12608 obj = basic_set(ctx=ctx, ptr=res)
12610 def intersect_params(arg0, arg1):
12612 if not arg0.__class__ is basic_set:
12613 arg0 = basic_set(arg0)
12617 if not arg1.__class__ is basic_set:
12618 arg1 = basic_set(arg1)
12620 return set(arg0).intersect_params(arg1)
12622 res = isl.isl_basic_set_intersect_params(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12623 obj = basic_set(ctx=ctx, ptr=res)
12625 def is_empty(arg0):
12627 if not arg0.__class__ is basic_set:
12628 arg0 = basic_set(arg0)
12632 res = isl.isl_basic_set_is_empty(arg0.ptr)
12636 def is_equal(arg0, arg1):
12638 if not arg0.__class__ is basic_set:
12639 arg0 = basic_set(arg0)
12643 if not arg1.__class__ is basic_set:
12644 arg1 = basic_set(arg1)
12646 return set(arg0).is_equal(arg1)
12648 res = isl.isl_basic_set_is_equal(arg0.ptr, arg1.ptr)
12652 def is_subset(arg0, arg1):
12654 if not arg0.__class__ is basic_set:
12655 arg0 = basic_set(arg0)
12659 if not arg1.__class__ is basic_set:
12660 arg1 = basic_set(arg1)
12662 return set(arg0).is_subset(arg1)
12664 res = isl.isl_basic_set_is_subset(arg0.ptr, arg1.ptr)
12668 def is_wrapping(arg0):
12670 if not arg0.__class__ is basic_set:
12671 arg0 = basic_set(arg0)
12675 res = isl.isl_basic_set_is_wrapping(arg0.ptr)
12681 if not arg0.__class__ is basic_set:
12682 arg0 = basic_set(arg0)
12686 res = isl.isl_basic_set_lexmax(isl.isl_basic_set_copy(arg0.ptr))
12687 obj = set(ctx=ctx, ptr=res)
12691 if not arg0.__class__ is basic_set:
12692 arg0 = basic_set(arg0)
12696 res = isl.isl_basic_set_lexmin(isl.isl_basic_set_copy(arg0.ptr))
12697 obj = set(ctx=ctx, ptr=res)
12701 if not arg0.__class__ is basic_set:
12702 arg0 = basic_set(arg0)
12706 res = isl.isl_basic_set_params(isl.isl_basic_set_copy(arg0.ptr))
12707 obj = basic_set(ctx=ctx, ptr=res)
12711 if not arg0.__class__ is basic_set:
12712 arg0 = basic_set(arg0)
12716 res = isl.isl_basic_set_sample(isl.isl_basic_set_copy(arg0.ptr))
12717 obj = basic_set(ctx=ctx, ptr=res)
12719 def sample_point(arg0):
12721 if not arg0.__class__ is basic_set:
12722 arg0 = basic_set(arg0)
12726 res = isl.isl_basic_set_sample_point(isl.isl_basic_set_copy(arg0.ptr))
12727 obj = point(ctx=ctx, ptr=res)
12731 if not arg0.__class__ is basic_set:
12732 arg0 = basic_set(arg0)
12736 res = isl.isl_basic_set_to_set(isl.isl_basic_set_copy(arg0.ptr))
12737 obj = set(ctx=ctx, ptr=res)
12739 def union(arg0, arg1):
12741 if not arg0.__class__ is basic_set:
12742 arg0 = basic_set(arg0)
12746 if not arg1.__class__ is basic_set:
12747 arg1 = basic_set(arg1)
12749 return set(arg0).union(arg1)
12751 res = isl.isl_basic_set_union(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12752 obj = set(ctx=ctx, ptr=res)
12755 isl.isl_basic_set_from_point.restype = c_void_p
12756 isl.isl_basic_set_from_point.argtypes = [c_void_p]
12757 isl.isl_basic_set_read_from_str.restype = c_void_p
12758 isl.isl_basic_set_read_from_str.argtypes = [Context, c_char_p]
12759 isl.isl_basic_set_affine_hull.restype = c_void_p
12760 isl.isl_basic_set_affine_hull.argtypes = [c_void_p]
12761 isl.isl_basic_set_apply.restype = c_void_p
12762 isl.isl_basic_set_apply.argtypes = [c_void_p, c_void_p]
12763 isl.isl_basic_set_detect_equalities.restype = c_void_p
12764 isl.isl_basic_set_detect_equalities.argtypes = [c_void_p]
12765 isl.isl_basic_set_dim_max_val.restype = c_void_p
12766 isl.isl_basic_set_dim_max_val.argtypes = [c_void_p, c_int]
12767 isl.isl_basic_set_flatten.restype = c_void_p
12768 isl.isl_basic_set_flatten.argtypes = [c_void_p]
12769 isl.isl_basic_set_gist.restype = c_void_p
12770 isl.isl_basic_set_gist.argtypes = [c_void_p, c_void_p]
12771 isl.isl_basic_set_intersect.restype = c_void_p
12772 isl.isl_basic_set_intersect.argtypes = [c_void_p, c_void_p]
12773 isl.isl_basic_set_intersect_params.restype = c_void_p
12774 isl.isl_basic_set_intersect_params.argtypes = [c_void_p, c_void_p]
12775 isl.isl_basic_set_is_empty.argtypes = [c_void_p]
12776 isl.isl_basic_set_is_equal.argtypes = [c_void_p, c_void_p]
12777 isl.isl_basic_set_is_subset.argtypes = [c_void_p, c_void_p]
12778 isl.isl_basic_set_is_wrapping.argtypes = [c_void_p]
12779 isl.isl_basic_set_lexmax.restype = c_void_p
12780 isl.isl_basic_set_lexmax.argtypes = [c_void_p]
12781 isl.isl_basic_set_lexmin.restype = c_void_p
12782 isl.isl_basic_set_lexmin.argtypes = [c_void_p]
12783 isl.isl_basic_set_params.restype = c_void_p
12784 isl.isl_basic_set_params.argtypes = [c_void_p]
12785 isl.isl_basic_set_sample.restype = c_void_p
12786 isl.isl_basic_set_sample.argtypes = [c_void_p]
12787 isl.isl_basic_set_sample_point.restype = c_void_p
12788 isl.isl_basic_set_sample_point.argtypes = [c_void_p]
12789 isl.isl_basic_set_to_set.restype = c_void_p
12790 isl.isl_basic_set_to_set.argtypes = [c_void_p]
12791 isl.isl_basic_set_union.restype = c_void_p
12792 isl.isl_basic_set_union.argtypes = [c_void_p, c_void_p]
12793 isl.isl_basic_set_copy.restype = c_void_p
12794 isl.isl_basic_set_copy.argtypes = [c_void_p]
12795 isl.isl_basic_set_free.restype = c_void_p
12796 isl.isl_basic_set_free.argtypes = [c_void_p]
12797 isl.isl_basic_set_to_str.restype = POINTER(c_char)
12798 isl.isl_basic_set_to_str.argtypes = [c_void_p]
12800 class fixed_box(object):
12801 def __init__(self, *args, **keywords):
12802 if "ptr" in keywords:
12803 self.ctx = keywords["ctx"]
12804 self.ptr = keywords["ptr"]
12806 if len(args) == 1 and type(args[0]) == str:
12807 self.ctx = Context.getDefaultInstance()
12808 self.ptr = isl.isl_fixed_box_read_from_str(self.ctx, args[0].encode('ascii'))
12812 if hasattr(self, 'ptr'):
12813 isl.isl_fixed_box_free(self.ptr)
12816 if not arg0.__class__ is fixed_box:
12817 arg0 = fixed_box(arg0)
12820 ptr = isl.isl_fixed_box_to_str(arg0.ptr)
12821 res = cast(ptr, c_char_p).value.decode('ascii')
12824 def __repr__(self):
12827 return 'isl.fixed_box("""%s""")' % s
12829 return 'isl.fixed_box("%s")' % s
12830 def is_valid(arg0):
12832 if not arg0.__class__ is fixed_box:
12833 arg0 = fixed_box(arg0)
12837 res = isl.isl_fixed_box_is_valid(arg0.ptr)
12843 if not arg0.__class__ is fixed_box:
12844 arg0 = fixed_box(arg0)
12848 res = isl.isl_fixed_box_get_offset(arg0.ptr)
12849 obj = multi_aff(ctx=ctx, ptr=res)
12851 def get_offset(arg0):
12852 return arg0.offset()
12855 if not arg0.__class__ is fixed_box:
12856 arg0 = fixed_box(arg0)
12860 res = isl.isl_fixed_box_get_size(arg0.ptr)
12861 obj = multi_val(ctx=ctx, ptr=res)
12863 def get_size(arg0):
12867 if not arg0.__class__ is fixed_box:
12868 arg0 = fixed_box(arg0)
12872 res = isl.isl_fixed_box_get_space(arg0.ptr)
12873 obj = space(ctx=ctx, ptr=res)
12875 def get_space(arg0):
12876 return arg0.space()
12878 isl.isl_fixed_box_read_from_str.restype = c_void_p
12879 isl.isl_fixed_box_read_from_str.argtypes = [Context, c_char_p]
12880 isl.isl_fixed_box_is_valid.argtypes = [c_void_p]
12881 isl.isl_fixed_box_get_offset.restype = c_void_p
12882 isl.isl_fixed_box_get_offset.argtypes = [c_void_p]
12883 isl.isl_fixed_box_get_size.restype = c_void_p
12884 isl.isl_fixed_box_get_size.argtypes = [c_void_p]
12885 isl.isl_fixed_box_get_space.restype = c_void_p
12886 isl.isl_fixed_box_get_space.argtypes = [c_void_p]
12887 isl.isl_fixed_box_copy.restype = c_void_p
12888 isl.isl_fixed_box_copy.argtypes = [c_void_p]
12889 isl.isl_fixed_box_free.restype = c_void_p
12890 isl.isl_fixed_box_free.argtypes = [c_void_p]
12891 isl.isl_fixed_box_to_str.restype = POINTER(c_char)
12892 isl.isl_fixed_box_to_str.argtypes = [c_void_p]
12895 def __init__(self, *args, **keywords):
12896 if "ptr" in keywords:
12897 self.ctx = keywords["ctx"]
12898 self.ptr = keywords["ptr"]
12900 if len(args) == 1 and type(args[0]) == str:
12901 self.ctx = Context.getDefaultInstance()
12902 self.ptr = isl.isl_id_read_from_str(self.ctx, args[0].encode('ascii'))
12904 if len(args) == 2 and type(args[0]) == str:
12905 self.ctx = Context.getDefaultInstance()
12906 name = args[0].encode('ascii')
12907 self.ptr = isl.isl_id_alloc(self.ctx, name, args[1])
12908 self.ptr = isl.isl_id_set_free_user(self.ptr, Context.free_user)
12909 if self.ptr is not None:
12910 pythonapi.Py_IncRef(py_object(args[1]))
12914 if hasattr(self, 'ptr'):
12915 isl.isl_id_free(self.ptr)
12918 if not arg0.__class__ is id:
12922 ptr = isl.isl_id_to_str(arg0.ptr)
12923 res = cast(ptr, c_char_p).value.decode('ascii')
12926 def __repr__(self):
12929 return 'isl.id("""%s""")' % s
12931 return 'isl.id("%s")' % s
12933 free_user = cast(Context.free_user, c_void_p)
12934 id_free_user = cast(isl.isl_id_get_free_user(self.ptr), c_void_p)
12935 if id_free_user.value != free_user.value:
12937 return isl.isl_id_get_user(self.ptr)
12940 if not arg0.__class__ is id:
12945 res = isl.isl_id_get_name(arg0.ptr)
12948 string = cast(res, c_char_p).value.decode('ascii')
12950 def get_name(arg0):
12954 if not arg0.__class__ is id:
12959 res = isl.isl_id_to_list(isl.isl_id_copy(arg0.ptr))
12960 obj = id_list(ctx=ctx, ptr=res)
12963 isl.isl_id_read_from_str.restype = c_void_p
12964 isl.isl_id_read_from_str.argtypes = [Context, c_char_p]
12965 isl.isl_id_get_name.restype = POINTER(c_char)
12966 isl.isl_id_get_name.argtypes = [c_void_p]
12967 isl.isl_id_to_list.restype = c_void_p
12968 isl.isl_id_to_list.argtypes = [c_void_p]
12969 isl.isl_id_copy.restype = c_void_p
12970 isl.isl_id_copy.argtypes = [c_void_p]
12971 isl.isl_id_free.restype = c_void_p
12972 isl.isl_id_free.argtypes = [c_void_p]
12973 isl.isl_id_to_str.restype = POINTER(c_char)
12974 isl.isl_id_to_str.argtypes = [c_void_p]
12976 class id_list(object):
12977 def __init__(self, *args, **keywords):
12978 if "ptr" in keywords:
12979 self.ctx = keywords["ctx"]
12980 self.ptr = keywords["ptr"]
12982 if len(args) == 1 and type(args[0]) == int:
12983 self.ctx = Context.getDefaultInstance()
12984 self.ptr = isl.isl_id_list_alloc(self.ctx, args[0])
12986 if len(args) == 1 and (args[0].__class__ is id or type(args[0]) == str):
12989 if not args[0].__class__ is id:
12990 args[0] = id(args[0])
12993 self.ctx = Context.getDefaultInstance()
12994 self.ptr = isl.isl_id_list_from_id(isl.isl_id_copy(args[0].ptr))
12996 if len(args) == 1 and type(args[0]) == str:
12997 self.ctx = Context.getDefaultInstance()
12998 self.ptr = isl.isl_id_list_read_from_str(self.ctx, args[0].encode('ascii'))
13002 if hasattr(self, 'ptr'):
13003 isl.isl_id_list_free(self.ptr)
13006 if not arg0.__class__ is id_list:
13007 arg0 = id_list(arg0)
13010 ptr = isl.isl_id_list_to_str(arg0.ptr)
13011 res = cast(ptr, c_char_p).value.decode('ascii')
13014 def __repr__(self):
13017 return 'isl.id_list("""%s""")' % s
13019 return 'isl.id_list("%s")' % s
13020 def add(arg0, arg1):
13022 if not arg0.__class__ is id_list:
13023 arg0 = id_list(arg0)
13027 if not arg1.__class__ is id:
13032 res = isl.isl_id_list_add(isl.isl_id_list_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr))
13033 obj = id_list(ctx=ctx, ptr=res)
13035 def at(arg0, arg1):
13037 if not arg0.__class__ is id_list:
13038 arg0 = id_list(arg0)
13042 res = isl.isl_id_list_get_at(arg0.ptr, arg1)
13043 obj = id(ctx=ctx, ptr=res)
13045 def get_at(arg0, arg1):
13046 return arg0.at(arg1)
13049 if not arg0.__class__ is id_list:
13050 arg0 = id_list(arg0)
13054 res = isl.isl_id_list_clear(isl.isl_id_list_copy(arg0.ptr))
13055 obj = id_list(ctx=ctx, ptr=res)
13057 def concat(arg0, arg1):
13059 if not arg0.__class__ is id_list:
13060 arg0 = id_list(arg0)
13064 if not arg1.__class__ is id_list:
13065 arg1 = id_list(arg1)
13069 res = isl.isl_id_list_concat(isl.isl_id_list_copy(arg0.ptr), isl.isl_id_list_copy(arg1.ptr))
13070 obj = id_list(ctx=ctx, ptr=res)
13072 def drop(arg0, arg1, arg2):
13074 if not arg0.__class__ is id_list:
13075 arg0 = id_list(arg0)
13079 res = isl.isl_id_list_drop(isl.isl_id_list_copy(arg0.ptr), arg1, arg2)
13080 obj = id_list(ctx=ctx, ptr=res)
13082 def foreach(arg0, arg1):
13084 if not arg0.__class__ is id_list:
13085 arg0 = id_list(arg0)
13089 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13090 def cb_func(cb_arg0, cb_arg1):
13091 cb_arg0 = id(ctx=arg0.ctx, ptr=(cb_arg0))
13094 except BaseException as e:
13100 res = isl.isl_id_list_foreach(arg0.ptr, cb1, None)
13101 if exc_info[0] is not None:
13105 def foreach_scc(arg0, arg1, arg2):
13107 if not arg0.__class__ is id_list:
13108 arg0 = id_list(arg0)
13112 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
13113 def cb_func(cb_arg0, cb_arg1, cb_arg2):
13114 cb_arg0 = id(ctx=arg0.ctx, ptr=isl.isl_id_copy(cb_arg0))
13115 cb_arg1 = id(ctx=arg0.ctx, ptr=isl.isl_id_copy(cb_arg1))
13117 res = arg1(cb_arg0, cb_arg1)
13118 except BaseException as e:
13121 return 1 if res else 0
13124 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13125 def cb_func(cb_arg0, cb_arg1):
13126 cb_arg0 = id_list(ctx=arg0.ctx, ptr=(cb_arg0))
13129 except BaseException as e:
13135 res = isl.isl_id_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
13136 if exc_info[0] is not None:
13140 def insert(arg0, arg1, arg2):
13142 if not arg0.__class__ is id_list:
13143 arg0 = id_list(arg0)
13147 if not arg2.__class__ is id:
13152 res = isl.isl_id_list_insert(isl.isl_id_list_copy(arg0.ptr), arg1, isl.isl_id_copy(arg2.ptr))
13153 obj = id_list(ctx=ctx, ptr=res)
13155 def set_at(arg0, arg1, arg2):
13157 if not arg0.__class__ is id_list:
13158 arg0 = id_list(arg0)
13162 if not arg2.__class__ is id:
13167 res = isl.isl_id_list_set_at(isl.isl_id_list_copy(arg0.ptr), arg1, isl.isl_id_copy(arg2.ptr))
13168 obj = id_list(ctx=ctx, ptr=res)
13172 if not arg0.__class__ is id_list:
13173 arg0 = id_list(arg0)
13177 res = isl.isl_id_list_size(arg0.ptr)
13182 isl.isl_id_list_alloc.restype = c_void_p
13183 isl.isl_id_list_alloc.argtypes = [Context, c_int]
13184 isl.isl_id_list_from_id.restype = c_void_p
13185 isl.isl_id_list_from_id.argtypes = [c_void_p]
13186 isl.isl_id_list_read_from_str.restype = c_void_p
13187 isl.isl_id_list_read_from_str.argtypes = [Context, c_char_p]
13188 isl.isl_id_list_add.restype = c_void_p
13189 isl.isl_id_list_add.argtypes = [c_void_p, c_void_p]
13190 isl.isl_id_list_get_at.restype = c_void_p
13191 isl.isl_id_list_get_at.argtypes = [c_void_p, c_int]
13192 isl.isl_id_list_clear.restype = c_void_p
13193 isl.isl_id_list_clear.argtypes = [c_void_p]
13194 isl.isl_id_list_concat.restype = c_void_p
13195 isl.isl_id_list_concat.argtypes = [c_void_p, c_void_p]
13196 isl.isl_id_list_drop.restype = c_void_p
13197 isl.isl_id_list_drop.argtypes = [c_void_p, c_int, c_int]
13198 isl.isl_id_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
13199 isl.isl_id_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
13200 isl.isl_id_list_insert.restype = c_void_p
13201 isl.isl_id_list_insert.argtypes = [c_void_p, c_int, c_void_p]
13202 isl.isl_id_list_set_at.restype = c_void_p
13203 isl.isl_id_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
13204 isl.isl_id_list_size.argtypes = [c_void_p]
13205 isl.isl_id_list_copy.restype = c_void_p
13206 isl.isl_id_list_copy.argtypes = [c_void_p]
13207 isl.isl_id_list_free.restype = c_void_p
13208 isl.isl_id_list_free.argtypes = [c_void_p]
13209 isl.isl_id_list_to_str.restype = POINTER(c_char)
13210 isl.isl_id_list_to_str.argtypes = [c_void_p]
13212 class id_to_ast_expr(object):
13213 def __init__(self, *args, **keywords):
13214 if "ptr" in keywords:
13215 self.ctx = keywords["ctx"]
13216 self.ptr = keywords["ptr"]
13218 if len(args) == 1 and type(args[0]) == int:
13219 self.ctx = Context.getDefaultInstance()
13220 self.ptr = isl.isl_id_to_ast_expr_alloc(self.ctx, args[0])
13222 if len(args) == 1 and type(args[0]) == str:
13223 self.ctx = Context.getDefaultInstance()
13224 self.ptr = isl.isl_id_to_ast_expr_read_from_str(self.ctx, args[0].encode('ascii'))
13228 if hasattr(self, 'ptr'):
13229 isl.isl_id_to_ast_expr_free(self.ptr)
13232 if not arg0.__class__ is id_to_ast_expr:
13233 arg0 = id_to_ast_expr(arg0)
13236 ptr = isl.isl_id_to_ast_expr_to_str(arg0.ptr)
13237 res = cast(ptr, c_char_p).value.decode('ascii')
13240 def __repr__(self):
13243 return 'isl.id_to_ast_expr("""%s""")' % s
13245 return 'isl.id_to_ast_expr("%s")' % s
13246 def is_equal(arg0, arg1):
13248 if not arg0.__class__ is id_to_ast_expr:
13249 arg0 = id_to_ast_expr(arg0)
13253 if not arg1.__class__ is id_to_ast_expr:
13254 arg1 = id_to_ast_expr(arg1)
13258 res = isl.isl_id_to_ast_expr_is_equal(arg0.ptr, arg1.ptr)
13262 def set(arg0, arg1, arg2):
13264 if not arg0.__class__ is id_to_ast_expr:
13265 arg0 = id_to_ast_expr(arg0)
13269 if not arg1.__class__ is id:
13274 if not arg2.__class__ is ast_expr:
13275 arg2 = ast_expr(arg2)
13279 res = isl.isl_id_to_ast_expr_set(isl.isl_id_to_ast_expr_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr), isl.isl_ast_expr_copy(arg2.ptr))
13280 obj = id_to_ast_expr(ctx=ctx, ptr=res)
13283 isl.isl_id_to_ast_expr_alloc.restype = c_void_p
13284 isl.isl_id_to_ast_expr_alloc.argtypes = [Context, c_int]
13285 isl.isl_id_to_ast_expr_read_from_str.restype = c_void_p
13286 isl.isl_id_to_ast_expr_read_from_str.argtypes = [Context, c_char_p]
13287 isl.isl_id_to_ast_expr_is_equal.argtypes = [c_void_p, c_void_p]
13288 isl.isl_id_to_ast_expr_set.restype = c_void_p
13289 isl.isl_id_to_ast_expr_set.argtypes = [c_void_p, c_void_p, c_void_p]
13290 isl.isl_id_to_ast_expr_copy.restype = c_void_p
13291 isl.isl_id_to_ast_expr_copy.argtypes = [c_void_p]
13292 isl.isl_id_to_ast_expr_free.restype = c_void_p
13293 isl.isl_id_to_ast_expr_free.argtypes = [c_void_p]
13294 isl.isl_id_to_ast_expr_to_str.restype = POINTER(c_char)
13295 isl.isl_id_to_ast_expr_to_str.argtypes = [c_void_p]
13297 class id_to_id(object):
13298 def __init__(self, *args, **keywords):
13299 if "ptr" in keywords:
13300 self.ctx = keywords["ctx"]
13301 self.ptr = keywords["ptr"]
13303 if len(args) == 1 and type(args[0]) == int:
13304 self.ctx = Context.getDefaultInstance()
13305 self.ptr = isl.isl_id_to_id_alloc(self.ctx, args[0])
13307 if len(args) == 1 and type(args[0]) == str:
13308 self.ctx = Context.getDefaultInstance()
13309 self.ptr = isl.isl_id_to_id_read_from_str(self.ctx, args[0].encode('ascii'))
13313 if hasattr(self, 'ptr'):
13314 isl.isl_id_to_id_free(self.ptr)
13317 if not arg0.__class__ is id_to_id:
13318 arg0 = id_to_id(arg0)
13321 ptr = isl.isl_id_to_id_to_str(arg0.ptr)
13322 res = cast(ptr, c_char_p).value.decode('ascii')
13325 def __repr__(self):
13328 return 'isl.id_to_id("""%s""")' % s
13330 return 'isl.id_to_id("%s")' % s
13331 def is_equal(arg0, arg1):
13333 if not arg0.__class__ is id_to_id:
13334 arg0 = id_to_id(arg0)
13338 if not arg1.__class__ is id_to_id:
13339 arg1 = id_to_id(arg1)
13343 res = isl.isl_id_to_id_is_equal(arg0.ptr, arg1.ptr)
13347 def set(arg0, arg1, arg2):
13349 if not arg0.__class__ is id_to_id:
13350 arg0 = id_to_id(arg0)
13354 if not arg1.__class__ is id:
13359 if not arg2.__class__ is id:
13364 res = isl.isl_id_to_id_set(isl.isl_id_to_id_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr), isl.isl_id_copy(arg2.ptr))
13365 obj = id_to_id(ctx=ctx, ptr=res)
13368 isl.isl_id_to_id_alloc.restype = c_void_p
13369 isl.isl_id_to_id_alloc.argtypes = [Context, c_int]
13370 isl.isl_id_to_id_read_from_str.restype = c_void_p
13371 isl.isl_id_to_id_read_from_str.argtypes = [Context, c_char_p]
13372 isl.isl_id_to_id_is_equal.argtypes = [c_void_p, c_void_p]
13373 isl.isl_id_to_id_set.restype = c_void_p
13374 isl.isl_id_to_id_set.argtypes = [c_void_p, c_void_p, c_void_p]
13375 isl.isl_id_to_id_copy.restype = c_void_p
13376 isl.isl_id_to_id_copy.argtypes = [c_void_p]
13377 isl.isl_id_to_id_free.restype = c_void_p
13378 isl.isl_id_to_id_free.argtypes = [c_void_p]
13379 isl.isl_id_to_id_to_str.restype = POINTER(c_char)
13380 isl.isl_id_to_id_to_str.argtypes = [c_void_p]
13382 class map_list(object):
13383 def __init__(self, *args, **keywords):
13384 if "ptr" in keywords:
13385 self.ctx = keywords["ctx"]
13386 self.ptr = keywords["ptr"]
13388 if len(args) == 1 and type(args[0]) == int:
13389 self.ctx = Context.getDefaultInstance()
13390 self.ptr = isl.isl_map_list_alloc(self.ctx, args[0])
13392 if len(args) == 1 and args[0].__class__ is map:
13393 self.ctx = Context.getDefaultInstance()
13394 self.ptr = isl.isl_map_list_from_map(isl.isl_map_copy(args[0].ptr))
13396 if len(args) == 1 and type(args[0]) == str:
13397 self.ctx = Context.getDefaultInstance()
13398 self.ptr = isl.isl_map_list_read_from_str(self.ctx, args[0].encode('ascii'))
13402 if hasattr(self, 'ptr'):
13403 isl.isl_map_list_free(self.ptr)
13406 if not arg0.__class__ is map_list:
13407 arg0 = map_list(arg0)
13410 ptr = isl.isl_map_list_to_str(arg0.ptr)
13411 res = cast(ptr, c_char_p).value.decode('ascii')
13414 def __repr__(self):
13417 return 'isl.map_list("""%s""")' % s
13419 return 'isl.map_list("%s")' % s
13420 def add(arg0, arg1):
13422 if not arg0.__class__ is map_list:
13423 arg0 = map_list(arg0)
13427 if not arg1.__class__ is map:
13432 res = isl.isl_map_list_add(isl.isl_map_list_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
13433 obj = map_list(ctx=ctx, ptr=res)
13435 def at(arg0, arg1):
13437 if not arg0.__class__ is map_list:
13438 arg0 = map_list(arg0)
13442 res = isl.isl_map_list_get_at(arg0.ptr, arg1)
13443 obj = map(ctx=ctx, ptr=res)
13445 def get_at(arg0, arg1):
13446 return arg0.at(arg1)
13449 if not arg0.__class__ is map_list:
13450 arg0 = map_list(arg0)
13454 res = isl.isl_map_list_clear(isl.isl_map_list_copy(arg0.ptr))
13455 obj = map_list(ctx=ctx, ptr=res)
13457 def concat(arg0, arg1):
13459 if not arg0.__class__ is map_list:
13460 arg0 = map_list(arg0)
13464 if not arg1.__class__ is map_list:
13465 arg1 = map_list(arg1)
13469 res = isl.isl_map_list_concat(isl.isl_map_list_copy(arg0.ptr), isl.isl_map_list_copy(arg1.ptr))
13470 obj = map_list(ctx=ctx, ptr=res)
13472 def drop(arg0, arg1, arg2):
13474 if not arg0.__class__ is map_list:
13475 arg0 = map_list(arg0)
13479 res = isl.isl_map_list_drop(isl.isl_map_list_copy(arg0.ptr), arg1, arg2)
13480 obj = map_list(ctx=ctx, ptr=res)
13482 def foreach(arg0, arg1):
13484 if not arg0.__class__ is map_list:
13485 arg0 = map_list(arg0)
13489 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13490 def cb_func(cb_arg0, cb_arg1):
13491 cb_arg0 = map(ctx=arg0.ctx, ptr=(cb_arg0))
13494 except BaseException as e:
13500 res = isl.isl_map_list_foreach(arg0.ptr, cb1, None)
13501 if exc_info[0] is not None:
13505 def foreach_scc(arg0, arg1, arg2):
13507 if not arg0.__class__ is map_list:
13508 arg0 = map_list(arg0)
13512 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
13513 def cb_func(cb_arg0, cb_arg1, cb_arg2):
13514 cb_arg0 = map(ctx=arg0.ctx, ptr=isl.isl_map_copy(cb_arg0))
13515 cb_arg1 = map(ctx=arg0.ctx, ptr=isl.isl_map_copy(cb_arg1))
13517 res = arg1(cb_arg0, cb_arg1)
13518 except BaseException as e:
13521 return 1 if res else 0
13524 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13525 def cb_func(cb_arg0, cb_arg1):
13526 cb_arg0 = map_list(ctx=arg0.ctx, ptr=(cb_arg0))
13529 except BaseException as e:
13535 res = isl.isl_map_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
13536 if exc_info[0] is not None:
13540 def insert(arg0, arg1, arg2):
13542 if not arg0.__class__ is map_list:
13543 arg0 = map_list(arg0)
13547 if not arg2.__class__ is map:
13552 res = isl.isl_map_list_insert(isl.isl_map_list_copy(arg0.ptr), arg1, isl.isl_map_copy(arg2.ptr))
13553 obj = map_list(ctx=ctx, ptr=res)
13555 def set_at(arg0, arg1, arg2):
13557 if not arg0.__class__ is map_list:
13558 arg0 = map_list(arg0)
13562 if not arg2.__class__ is map:
13567 res = isl.isl_map_list_set_at(isl.isl_map_list_copy(arg0.ptr), arg1, isl.isl_map_copy(arg2.ptr))
13568 obj = map_list(ctx=ctx, ptr=res)
13572 if not arg0.__class__ is map_list:
13573 arg0 = map_list(arg0)
13577 res = isl.isl_map_list_size(arg0.ptr)
13582 isl.isl_map_list_alloc.restype = c_void_p
13583 isl.isl_map_list_alloc.argtypes = [Context, c_int]
13584 isl.isl_map_list_from_map.restype = c_void_p
13585 isl.isl_map_list_from_map.argtypes = [c_void_p]
13586 isl.isl_map_list_read_from_str.restype = c_void_p
13587 isl.isl_map_list_read_from_str.argtypes = [Context, c_char_p]
13588 isl.isl_map_list_add.restype = c_void_p
13589 isl.isl_map_list_add.argtypes = [c_void_p, c_void_p]
13590 isl.isl_map_list_get_at.restype = c_void_p
13591 isl.isl_map_list_get_at.argtypes = [c_void_p, c_int]
13592 isl.isl_map_list_clear.restype = c_void_p
13593 isl.isl_map_list_clear.argtypes = [c_void_p]
13594 isl.isl_map_list_concat.restype = c_void_p
13595 isl.isl_map_list_concat.argtypes = [c_void_p, c_void_p]
13596 isl.isl_map_list_drop.restype = c_void_p
13597 isl.isl_map_list_drop.argtypes = [c_void_p, c_int, c_int]
13598 isl.isl_map_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
13599 isl.isl_map_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
13600 isl.isl_map_list_insert.restype = c_void_p
13601 isl.isl_map_list_insert.argtypes = [c_void_p, c_int, c_void_p]
13602 isl.isl_map_list_set_at.restype = c_void_p
13603 isl.isl_map_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
13604 isl.isl_map_list_size.argtypes = [c_void_p]
13605 isl.isl_map_list_copy.restype = c_void_p
13606 isl.isl_map_list_copy.argtypes = [c_void_p]
13607 isl.isl_map_list_free.restype = c_void_p
13608 isl.isl_map_list_free.argtypes = [c_void_p]
13609 isl.isl_map_list_to_str.restype = POINTER(c_char)
13610 isl.isl_map_list_to_str.argtypes = [c_void_p]
13612 class multi_id(object):
13613 def __init__(self, *args, **keywords):
13614 if "ptr" in keywords:
13615 self.ctx = keywords["ctx"]
13616 self.ptr = keywords["ptr"]
13618 if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is id_list:
13619 self.ctx = Context.getDefaultInstance()
13620 self.ptr = isl.isl_multi_id_from_id_list(isl.isl_space_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
13622 if len(args) == 1 and type(args[0]) == str:
13623 self.ctx = Context.getDefaultInstance()
13624 self.ptr = isl.isl_multi_id_read_from_str(self.ctx, args[0].encode('ascii'))
13628 if hasattr(self, 'ptr'):
13629 isl.isl_multi_id_free(self.ptr)
13632 if not arg0.__class__ is multi_id:
13633 arg0 = multi_id(arg0)
13636 ptr = isl.isl_multi_id_to_str(arg0.ptr)
13637 res = cast(ptr, c_char_p).value.decode('ascii')
13640 def __repr__(self):
13643 return 'isl.multi_id("""%s""")' % s
13645 return 'isl.multi_id("%s")' % s
13646 def at(arg0, arg1):
13648 if not arg0.__class__ is multi_id:
13649 arg0 = multi_id(arg0)
13653 res = isl.isl_multi_id_get_at(arg0.ptr, arg1)
13654 obj = id(ctx=ctx, ptr=res)
13656 def get_at(arg0, arg1):
13657 return arg0.at(arg1)
13658 def flat_range_product(arg0, arg1):
13660 if not arg0.__class__ is multi_id:
13661 arg0 = multi_id(arg0)
13665 if not arg1.__class__ is multi_id:
13666 arg1 = multi_id(arg1)
13670 res = isl.isl_multi_id_flat_range_product(isl.isl_multi_id_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
13671 obj = multi_id(ctx=ctx, ptr=res)
13675 if not arg0.__class__ is multi_id:
13676 arg0 = multi_id(arg0)
13680 res = isl.isl_multi_id_get_list(arg0.ptr)
13681 obj = id_list(ctx=ctx, ptr=res)
13683 def get_list(arg0):
13685 def plain_is_equal(arg0, arg1):
13687 if not arg0.__class__ is multi_id:
13688 arg0 = multi_id(arg0)
13692 if not arg1.__class__ is multi_id:
13693 arg1 = multi_id(arg1)
13697 res = isl.isl_multi_id_plain_is_equal(arg0.ptr, arg1.ptr)
13701 def range_product(arg0, arg1):
13703 if not arg0.__class__ is multi_id:
13704 arg0 = multi_id(arg0)
13708 if not arg1.__class__ is multi_id:
13709 arg1 = multi_id(arg1)
13713 res = isl.isl_multi_id_range_product(isl.isl_multi_id_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
13714 obj = multi_id(ctx=ctx, ptr=res)
13716 def set_at(arg0, arg1, arg2):
13718 if not arg0.__class__ is multi_id:
13719 arg0 = multi_id(arg0)
13723 if not arg2.__class__ is id:
13728 res = isl.isl_multi_id_set_at(isl.isl_multi_id_copy(arg0.ptr), arg1, isl.isl_id_copy(arg2.ptr))
13729 obj = multi_id(ctx=ctx, ptr=res)
13733 if not arg0.__class__ is multi_id:
13734 arg0 = multi_id(arg0)
13738 res = isl.isl_multi_id_size(arg0.ptr)
13744 if not arg0.__class__ is multi_id:
13745 arg0 = multi_id(arg0)
13749 res = isl.isl_multi_id_get_space(arg0.ptr)
13750 obj = space(ctx=ctx, ptr=res)
13752 def get_space(arg0):
13753 return arg0.space()
13755 isl.isl_multi_id_from_id_list.restype = c_void_p
13756 isl.isl_multi_id_from_id_list.argtypes = [c_void_p, c_void_p]
13757 isl.isl_multi_id_read_from_str.restype = c_void_p
13758 isl.isl_multi_id_read_from_str.argtypes = [Context, c_char_p]
13759 isl.isl_multi_id_get_at.restype = c_void_p
13760 isl.isl_multi_id_get_at.argtypes = [c_void_p, c_int]
13761 isl.isl_multi_id_flat_range_product.restype = c_void_p
13762 isl.isl_multi_id_flat_range_product.argtypes = [c_void_p, c_void_p]
13763 isl.isl_multi_id_get_list.restype = c_void_p
13764 isl.isl_multi_id_get_list.argtypes = [c_void_p]
13765 isl.isl_multi_id_plain_is_equal.argtypes = [c_void_p, c_void_p]
13766 isl.isl_multi_id_range_product.restype = c_void_p
13767 isl.isl_multi_id_range_product.argtypes = [c_void_p, c_void_p]
13768 isl.isl_multi_id_set_at.restype = c_void_p
13769 isl.isl_multi_id_set_at.argtypes = [c_void_p, c_int, c_void_p]
13770 isl.isl_multi_id_size.argtypes = [c_void_p]
13771 isl.isl_multi_id_get_space.restype = c_void_p
13772 isl.isl_multi_id_get_space.argtypes = [c_void_p]
13773 isl.isl_multi_id_copy.restype = c_void_p
13774 isl.isl_multi_id_copy.argtypes = [c_void_p]
13775 isl.isl_multi_id_free.restype = c_void_p
13776 isl.isl_multi_id_free.argtypes = [c_void_p]
13777 isl.isl_multi_id_to_str.restype = POINTER(c_char)
13778 isl.isl_multi_id_to_str.argtypes = [c_void_p]
13780 class multi_val(object):
13781 def __init__(self, *args, **keywords):
13782 if "ptr" in keywords:
13783 self.ctx = keywords["ctx"]
13784 self.ptr = keywords["ptr"]
13786 if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is val_list:
13787 self.ctx = Context.getDefaultInstance()
13788 self.ptr = isl.isl_multi_val_from_val_list(isl.isl_space_copy(args[0].ptr), isl.isl_val_list_copy(args[1].ptr))
13790 if len(args) == 1 and type(args[0]) == str:
13791 self.ctx = Context.getDefaultInstance()
13792 self.ptr = isl.isl_multi_val_read_from_str(self.ctx, args[0].encode('ascii'))
13796 if hasattr(self, 'ptr'):
13797 isl.isl_multi_val_free(self.ptr)
13800 if not arg0.__class__ is multi_val:
13801 arg0 = multi_val(arg0)
13804 ptr = isl.isl_multi_val_to_str(arg0.ptr)
13805 res = cast(ptr, c_char_p).value.decode('ascii')
13808 def __repr__(self):
13811 return 'isl.multi_val("""%s""")' % s
13813 return 'isl.multi_val("%s")' % s
13815 if len(args) == 2 and args[1].__class__ is multi_val:
13818 if not args[0].__class__ is multi_val:
13819 args[0] = multi_val(args[0])
13823 res = isl.isl_multi_val_add(isl.isl_multi_val_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
13824 obj = multi_val(ctx=ctx, ptr=res)
13826 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
13829 if not args[0].__class__ is multi_val:
13830 args[0] = multi_val(args[0])
13834 if not args[1].__class__ is val:
13835 args[1] = val(args[1])
13839 res = isl.isl_multi_val_add_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
13840 obj = multi_val(ctx=ctx, ptr=res)
13843 def at(arg0, arg1):
13845 if not arg0.__class__ is multi_val:
13846 arg0 = multi_val(arg0)
13850 res = isl.isl_multi_val_get_at(arg0.ptr, arg1)
13851 obj = val(ctx=ctx, ptr=res)
13853 def get_at(arg0, arg1):
13854 return arg0.at(arg1)
13855 def flat_range_product(arg0, arg1):
13857 if not arg0.__class__ is multi_val:
13858 arg0 = multi_val(arg0)
13862 if not arg1.__class__ is multi_val:
13863 arg1 = multi_val(arg1)
13867 res = isl.isl_multi_val_flat_range_product(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13868 obj = multi_val(ctx=ctx, ptr=res)
13870 def has_range_tuple_id(arg0):
13872 if not arg0.__class__ is multi_val:
13873 arg0 = multi_val(arg0)
13877 res = isl.isl_multi_val_has_range_tuple_id(arg0.ptr)
13881 def involves_nan(arg0):
13883 if not arg0.__class__ is multi_val:
13884 arg0 = multi_val(arg0)
13888 res = isl.isl_multi_val_involves_nan(arg0.ptr)
13894 if not arg0.__class__ is multi_val:
13895 arg0 = multi_val(arg0)
13899 res = isl.isl_multi_val_get_list(arg0.ptr)
13900 obj = val_list(ctx=ctx, ptr=res)
13902 def get_list(arg0):
13904 def max(arg0, arg1):
13906 if not arg0.__class__ is multi_val:
13907 arg0 = multi_val(arg0)
13911 if not arg1.__class__ is multi_val:
13912 arg1 = multi_val(arg1)
13916 res = isl.isl_multi_val_max(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13917 obj = multi_val(ctx=ctx, ptr=res)
13919 def min(arg0, arg1):
13921 if not arg0.__class__ is multi_val:
13922 arg0 = multi_val(arg0)
13926 if not arg1.__class__ is multi_val:
13927 arg1 = multi_val(arg1)
13931 res = isl.isl_multi_val_min(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13932 obj = multi_val(ctx=ctx, ptr=res)
13936 if not arg0.__class__ is multi_val:
13937 arg0 = multi_val(arg0)
13941 res = isl.isl_multi_val_neg(isl.isl_multi_val_copy(arg0.ptr))
13942 obj = multi_val(ctx=ctx, ptr=res)
13944 def plain_is_equal(arg0, arg1):
13946 if not arg0.__class__ is multi_val:
13947 arg0 = multi_val(arg0)
13951 if not arg1.__class__ is multi_val:
13952 arg1 = multi_val(arg1)
13956 res = isl.isl_multi_val_plain_is_equal(arg0.ptr, arg1.ptr)
13960 def product(arg0, arg1):
13962 if not arg0.__class__ is multi_val:
13963 arg0 = multi_val(arg0)
13967 if not arg1.__class__ is multi_val:
13968 arg1 = multi_val(arg1)
13972 res = isl.isl_multi_val_product(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13973 obj = multi_val(ctx=ctx, ptr=res)
13975 def range_product(arg0, arg1):
13977 if not arg0.__class__ is multi_val:
13978 arg0 = multi_val(arg0)
13982 if not arg1.__class__ is multi_val:
13983 arg1 = multi_val(arg1)
13987 res = isl.isl_multi_val_range_product(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13988 obj = multi_val(ctx=ctx, ptr=res)
13990 def range_tuple_id(arg0):
13992 if not arg0.__class__ is multi_val:
13993 arg0 = multi_val(arg0)
13997 res = isl.isl_multi_val_get_range_tuple_id(arg0.ptr)
13998 obj = id(ctx=ctx, ptr=res)
14000 def get_range_tuple_id(arg0):
14001 return arg0.range_tuple_id()
14002 def reset_range_tuple_id(arg0):
14004 if not arg0.__class__ is multi_val:
14005 arg0 = multi_val(arg0)
14009 res = isl.isl_multi_val_reset_range_tuple_id(isl.isl_multi_val_copy(arg0.ptr))
14010 obj = multi_val(ctx=ctx, ptr=res)
14013 if len(args) == 2 and args[1].__class__ is multi_val:
14016 if not args[0].__class__ is multi_val:
14017 args[0] = multi_val(args[0])
14021 res = isl.isl_multi_val_scale_multi_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
14022 obj = multi_val(ctx=ctx, ptr=res)
14024 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
14027 if not args[0].__class__ is multi_val:
14028 args[0] = multi_val(args[0])
14032 if not args[1].__class__ is val:
14033 args[1] = val(args[1])
14037 res = isl.isl_multi_val_scale_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
14038 obj = multi_val(ctx=ctx, ptr=res)
14041 def scale_down(*args):
14042 if len(args) == 2 and args[1].__class__ is multi_val:
14045 if not args[0].__class__ is multi_val:
14046 args[0] = multi_val(args[0])
14050 res = isl.isl_multi_val_scale_down_multi_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
14051 obj = multi_val(ctx=ctx, ptr=res)
14053 if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
14056 if not args[0].__class__ is multi_val:
14057 args[0] = multi_val(args[0])
14061 if not args[1].__class__ is val:
14062 args[1] = val(args[1])
14066 res = isl.isl_multi_val_scale_down_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
14067 obj = multi_val(ctx=ctx, ptr=res)
14070 def set_at(arg0, arg1, arg2):
14072 if not arg0.__class__ is multi_val:
14073 arg0 = multi_val(arg0)
14077 if not arg2.__class__ is val:
14082 res = isl.isl_multi_val_set_at(isl.isl_multi_val_copy(arg0.ptr), arg1, isl.isl_val_copy(arg2.ptr))
14083 obj = multi_val(ctx=ctx, ptr=res)
14085 def set_range_tuple(*args):
14086 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
14089 if not args[0].__class__ is multi_val:
14090 args[0] = multi_val(args[0])
14094 if not args[1].__class__ is id:
14095 args[1] = id(args[1])
14099 res = isl.isl_multi_val_set_range_tuple_id(isl.isl_multi_val_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
14100 obj = multi_val(ctx=ctx, ptr=res)
14105 if not arg0.__class__ is multi_val:
14106 arg0 = multi_val(arg0)
14110 res = isl.isl_multi_val_size(arg0.ptr)
14116 if not arg0.__class__ is multi_val:
14117 arg0 = multi_val(arg0)
14121 res = isl.isl_multi_val_get_space(arg0.ptr)
14122 obj = space(ctx=ctx, ptr=res)
14124 def get_space(arg0):
14125 return arg0.space()
14126 def sub(arg0, arg1):
14128 if not arg0.__class__ is multi_val:
14129 arg0 = multi_val(arg0)
14133 if not arg1.__class__ is multi_val:
14134 arg1 = multi_val(arg1)
14138 res = isl.isl_multi_val_sub(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
14139 obj = multi_val(ctx=ctx, ptr=res)
14144 if not arg0.__class__ is space:
14149 res = isl.isl_multi_val_zero(isl.isl_space_copy(arg0.ptr))
14150 obj = multi_val(ctx=ctx, ptr=res)
14153 isl.isl_multi_val_from_val_list.restype = c_void_p
14154 isl.isl_multi_val_from_val_list.argtypes = [c_void_p, c_void_p]
14155 isl.isl_multi_val_read_from_str.restype = c_void_p
14156 isl.isl_multi_val_read_from_str.argtypes = [Context, c_char_p]
14157 isl.isl_multi_val_add.restype = c_void_p
14158 isl.isl_multi_val_add.argtypes = [c_void_p, c_void_p]
14159 isl.isl_multi_val_add_val.restype = c_void_p
14160 isl.isl_multi_val_add_val.argtypes = [c_void_p, c_void_p]
14161 isl.isl_multi_val_get_at.restype = c_void_p
14162 isl.isl_multi_val_get_at.argtypes = [c_void_p, c_int]
14163 isl.isl_multi_val_flat_range_product.restype = c_void_p
14164 isl.isl_multi_val_flat_range_product.argtypes = [c_void_p, c_void_p]
14165 isl.isl_multi_val_has_range_tuple_id.argtypes = [c_void_p]
14166 isl.isl_multi_val_involves_nan.argtypes = [c_void_p]
14167 isl.isl_multi_val_get_list.restype = c_void_p
14168 isl.isl_multi_val_get_list.argtypes = [c_void_p]
14169 isl.isl_multi_val_max.restype = c_void_p
14170 isl.isl_multi_val_max.argtypes = [c_void_p, c_void_p]
14171 isl.isl_multi_val_min.restype = c_void_p
14172 isl.isl_multi_val_min.argtypes = [c_void_p, c_void_p]
14173 isl.isl_multi_val_neg.restype = c_void_p
14174 isl.isl_multi_val_neg.argtypes = [c_void_p]
14175 isl.isl_multi_val_plain_is_equal.argtypes = [c_void_p, c_void_p]
14176 isl.isl_multi_val_product.restype = c_void_p
14177 isl.isl_multi_val_product.argtypes = [c_void_p, c_void_p]
14178 isl.isl_multi_val_range_product.restype = c_void_p
14179 isl.isl_multi_val_range_product.argtypes = [c_void_p, c_void_p]
14180 isl.isl_multi_val_get_range_tuple_id.restype = c_void_p
14181 isl.isl_multi_val_get_range_tuple_id.argtypes = [c_void_p]
14182 isl.isl_multi_val_reset_range_tuple_id.restype = c_void_p
14183 isl.isl_multi_val_reset_range_tuple_id.argtypes = [c_void_p]
14184 isl.isl_multi_val_scale_multi_val.restype = c_void_p
14185 isl.isl_multi_val_scale_multi_val.argtypes = [c_void_p, c_void_p]
14186 isl.isl_multi_val_scale_val.restype = c_void_p
14187 isl.isl_multi_val_scale_val.argtypes = [c_void_p, c_void_p]
14188 isl.isl_multi_val_scale_down_multi_val.restype = c_void_p
14189 isl.isl_multi_val_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
14190 isl.isl_multi_val_scale_down_val.restype = c_void_p
14191 isl.isl_multi_val_scale_down_val.argtypes = [c_void_p, c_void_p]
14192 isl.isl_multi_val_set_at.restype = c_void_p
14193 isl.isl_multi_val_set_at.argtypes = [c_void_p, c_int, c_void_p]
14194 isl.isl_multi_val_set_range_tuple_id.restype = c_void_p
14195 isl.isl_multi_val_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
14196 isl.isl_multi_val_size.argtypes = [c_void_p]
14197 isl.isl_multi_val_get_space.restype = c_void_p
14198 isl.isl_multi_val_get_space.argtypes = [c_void_p]
14199 isl.isl_multi_val_sub.restype = c_void_p
14200 isl.isl_multi_val_sub.argtypes = [c_void_p, c_void_p]
14201 isl.isl_multi_val_zero.restype = c_void_p
14202 isl.isl_multi_val_zero.argtypes = [c_void_p]
14203 isl.isl_multi_val_copy.restype = c_void_p
14204 isl.isl_multi_val_copy.argtypes = [c_void_p]
14205 isl.isl_multi_val_free.restype = c_void_p
14206 isl.isl_multi_val_free.argtypes = [c_void_p]
14207 isl.isl_multi_val_to_str.restype = POINTER(c_char)
14208 isl.isl_multi_val_to_str.argtypes = [c_void_p]
14210 class point(basic_set):
14211 def __init__(self, *args, **keywords):
14212 if "ptr" in keywords:
14213 self.ctx = keywords["ctx"]
14214 self.ptr = keywords["ptr"]
14218 if hasattr(self, 'ptr'):
14219 isl.isl_point_free(self.ptr)
14222 if not arg0.__class__ is point:
14226 ptr = isl.isl_point_to_str(arg0.ptr)
14227 res = cast(ptr, c_char_p).value.decode('ascii')
14230 def __repr__(self):
14233 return 'isl.point("""%s""")' % s
14235 return 'isl.point("%s")' % s
14236 def multi_val(arg0):
14238 if not arg0.__class__ is point:
14243 res = isl.isl_point_get_multi_val(arg0.ptr)
14244 obj = multi_val(ctx=ctx, ptr=res)
14246 def get_multi_val(arg0):
14247 return arg0.multi_val()
14250 if not arg0.__class__ is point:
14255 res = isl.isl_point_to_set(isl.isl_point_copy(arg0.ptr))
14256 obj = set(ctx=ctx, ptr=res)
14259 isl.isl_point_get_multi_val.restype = c_void_p
14260 isl.isl_point_get_multi_val.argtypes = [c_void_p]
14261 isl.isl_point_to_set.restype = c_void_p
14262 isl.isl_point_to_set.argtypes = [c_void_p]
14263 isl.isl_point_copy.restype = c_void_p
14264 isl.isl_point_copy.argtypes = [c_void_p]
14265 isl.isl_point_free.restype = c_void_p
14266 isl.isl_point_free.argtypes = [c_void_p]
14267 isl.isl_point_to_str.restype = POINTER(c_char)
14268 isl.isl_point_to_str.argtypes = [c_void_p]
14270 class pw_aff_list(object):
14271 def __init__(self, *args, **keywords):
14272 if "ptr" in keywords:
14273 self.ctx = keywords["ctx"]
14274 self.ptr = keywords["ptr"]
14276 if len(args) == 1 and type(args[0]) == int:
14277 self.ctx = Context.getDefaultInstance()
14278 self.ptr = isl.isl_pw_aff_list_alloc(self.ctx, args[0])
14280 if len(args) == 1 and args[0].__class__ is pw_aff:
14281 self.ctx = Context.getDefaultInstance()
14282 self.ptr = isl.isl_pw_aff_list_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
14284 if len(args) == 1 and type(args[0]) == str:
14285 self.ctx = Context.getDefaultInstance()
14286 self.ptr = isl.isl_pw_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
14290 if hasattr(self, 'ptr'):
14291 isl.isl_pw_aff_list_free(self.ptr)
14294 if not arg0.__class__ is pw_aff_list:
14295 arg0 = pw_aff_list(arg0)
14298 ptr = isl.isl_pw_aff_list_to_str(arg0.ptr)
14299 res = cast(ptr, c_char_p).value.decode('ascii')
14302 def __repr__(self):
14305 return 'isl.pw_aff_list("""%s""")' % s
14307 return 'isl.pw_aff_list("%s")' % s
14308 def add(arg0, arg1):
14310 if not arg0.__class__ is pw_aff_list:
14311 arg0 = pw_aff_list(arg0)
14315 if not arg1.__class__ is pw_aff:
14316 arg1 = pw_aff(arg1)
14320 res = isl.isl_pw_aff_list_add(isl.isl_pw_aff_list_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
14321 obj = pw_aff_list(ctx=ctx, ptr=res)
14323 def at(arg0, arg1):
14325 if not arg0.__class__ is pw_aff_list:
14326 arg0 = pw_aff_list(arg0)
14330 res = isl.isl_pw_aff_list_get_at(arg0.ptr, arg1)
14331 obj = pw_aff(ctx=ctx, ptr=res)
14333 def get_at(arg0, arg1):
14334 return arg0.at(arg1)
14337 if not arg0.__class__ is pw_aff_list:
14338 arg0 = pw_aff_list(arg0)
14342 res = isl.isl_pw_aff_list_clear(isl.isl_pw_aff_list_copy(arg0.ptr))
14343 obj = pw_aff_list(ctx=ctx, ptr=res)
14345 def concat(arg0, arg1):
14347 if not arg0.__class__ is pw_aff_list:
14348 arg0 = pw_aff_list(arg0)
14352 if not arg1.__class__ is pw_aff_list:
14353 arg1 = pw_aff_list(arg1)
14357 res = isl.isl_pw_aff_list_concat(isl.isl_pw_aff_list_copy(arg0.ptr), isl.isl_pw_aff_list_copy(arg1.ptr))
14358 obj = pw_aff_list(ctx=ctx, ptr=res)
14360 def drop(arg0, arg1, arg2):
14362 if not arg0.__class__ is pw_aff_list:
14363 arg0 = pw_aff_list(arg0)
14367 res = isl.isl_pw_aff_list_drop(isl.isl_pw_aff_list_copy(arg0.ptr), arg1, arg2)
14368 obj = pw_aff_list(ctx=ctx, ptr=res)
14370 def foreach(arg0, arg1):
14372 if not arg0.__class__ is pw_aff_list:
14373 arg0 = pw_aff_list(arg0)
14377 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14378 def cb_func(cb_arg0, cb_arg1):
14379 cb_arg0 = pw_aff(ctx=arg0.ctx, ptr=(cb_arg0))
14382 except BaseException as e:
14388 res = isl.isl_pw_aff_list_foreach(arg0.ptr, cb1, None)
14389 if exc_info[0] is not None:
14393 def foreach_scc(arg0, arg1, arg2):
14395 if not arg0.__class__ is pw_aff_list:
14396 arg0 = pw_aff_list(arg0)
14400 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
14401 def cb_func(cb_arg0, cb_arg1, cb_arg2):
14402 cb_arg0 = pw_aff(ctx=arg0.ctx, ptr=isl.isl_pw_aff_copy(cb_arg0))
14403 cb_arg1 = pw_aff(ctx=arg0.ctx, ptr=isl.isl_pw_aff_copy(cb_arg1))
14405 res = arg1(cb_arg0, cb_arg1)
14406 except BaseException as e:
14409 return 1 if res else 0
14412 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14413 def cb_func(cb_arg0, cb_arg1):
14414 cb_arg0 = pw_aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
14417 except BaseException as e:
14423 res = isl.isl_pw_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
14424 if exc_info[0] is not None:
14428 def insert(arg0, arg1, arg2):
14430 if not arg0.__class__ is pw_aff_list:
14431 arg0 = pw_aff_list(arg0)
14435 if not arg2.__class__ is pw_aff:
14436 arg2 = pw_aff(arg2)
14440 res = isl.isl_pw_aff_list_insert(isl.isl_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_aff_copy(arg2.ptr))
14441 obj = pw_aff_list(ctx=ctx, ptr=res)
14443 def set_at(arg0, arg1, arg2):
14445 if not arg0.__class__ is pw_aff_list:
14446 arg0 = pw_aff_list(arg0)
14450 if not arg2.__class__ is pw_aff:
14451 arg2 = pw_aff(arg2)
14455 res = isl.isl_pw_aff_list_set_at(isl.isl_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_aff_copy(arg2.ptr))
14456 obj = pw_aff_list(ctx=ctx, ptr=res)
14460 if not arg0.__class__ is pw_aff_list:
14461 arg0 = pw_aff_list(arg0)
14465 res = isl.isl_pw_aff_list_size(arg0.ptr)
14470 isl.isl_pw_aff_list_alloc.restype = c_void_p
14471 isl.isl_pw_aff_list_alloc.argtypes = [Context, c_int]
14472 isl.isl_pw_aff_list_from_pw_aff.restype = c_void_p
14473 isl.isl_pw_aff_list_from_pw_aff.argtypes = [c_void_p]
14474 isl.isl_pw_aff_list_read_from_str.restype = c_void_p
14475 isl.isl_pw_aff_list_read_from_str.argtypes = [Context, c_char_p]
14476 isl.isl_pw_aff_list_add.restype = c_void_p
14477 isl.isl_pw_aff_list_add.argtypes = [c_void_p, c_void_p]
14478 isl.isl_pw_aff_list_get_at.restype = c_void_p
14479 isl.isl_pw_aff_list_get_at.argtypes = [c_void_p, c_int]
14480 isl.isl_pw_aff_list_clear.restype = c_void_p
14481 isl.isl_pw_aff_list_clear.argtypes = [c_void_p]
14482 isl.isl_pw_aff_list_concat.restype = c_void_p
14483 isl.isl_pw_aff_list_concat.argtypes = [c_void_p, c_void_p]
14484 isl.isl_pw_aff_list_drop.restype = c_void_p
14485 isl.isl_pw_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
14486 isl.isl_pw_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
14487 isl.isl_pw_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
14488 isl.isl_pw_aff_list_insert.restype = c_void_p
14489 isl.isl_pw_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
14490 isl.isl_pw_aff_list_set_at.restype = c_void_p
14491 isl.isl_pw_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
14492 isl.isl_pw_aff_list_size.argtypes = [c_void_p]
14493 isl.isl_pw_aff_list_copy.restype = c_void_p
14494 isl.isl_pw_aff_list_copy.argtypes = [c_void_p]
14495 isl.isl_pw_aff_list_free.restype = c_void_p
14496 isl.isl_pw_aff_list_free.argtypes = [c_void_p]
14497 isl.isl_pw_aff_list_to_str.restype = POINTER(c_char)
14498 isl.isl_pw_aff_list_to_str.argtypes = [c_void_p]
14500 class pw_multi_aff_list(object):
14501 def __init__(self, *args, **keywords):
14502 if "ptr" in keywords:
14503 self.ctx = keywords["ctx"]
14504 self.ptr = keywords["ptr"]
14506 if len(args) == 1 and type(args[0]) == int:
14507 self.ctx = Context.getDefaultInstance()
14508 self.ptr = isl.isl_pw_multi_aff_list_alloc(self.ctx, args[0])
14510 if len(args) == 1 and args[0].__class__ is pw_multi_aff:
14511 self.ctx = Context.getDefaultInstance()
14512 self.ptr = isl.isl_pw_multi_aff_list_from_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr))
14514 if len(args) == 1 and type(args[0]) == str:
14515 self.ctx = Context.getDefaultInstance()
14516 self.ptr = isl.isl_pw_multi_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
14520 if hasattr(self, 'ptr'):
14521 isl.isl_pw_multi_aff_list_free(self.ptr)
14524 if not arg0.__class__ is pw_multi_aff_list:
14525 arg0 = pw_multi_aff_list(arg0)
14528 ptr = isl.isl_pw_multi_aff_list_to_str(arg0.ptr)
14529 res = cast(ptr, c_char_p).value.decode('ascii')
14532 def __repr__(self):
14535 return 'isl.pw_multi_aff_list("""%s""")' % s
14537 return 'isl.pw_multi_aff_list("%s")' % s
14538 def add(arg0, arg1):
14540 if not arg0.__class__ is pw_multi_aff_list:
14541 arg0 = pw_multi_aff_list(arg0)
14545 if not arg1.__class__ is pw_multi_aff:
14546 arg1 = pw_multi_aff(arg1)
14550 res = isl.isl_pw_multi_aff_list_add(isl.isl_pw_multi_aff_list_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
14551 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14553 def at(arg0, arg1):
14555 if not arg0.__class__ is pw_multi_aff_list:
14556 arg0 = pw_multi_aff_list(arg0)
14560 res = isl.isl_pw_multi_aff_list_get_at(arg0.ptr, arg1)
14561 obj = pw_multi_aff(ctx=ctx, ptr=res)
14563 def get_at(arg0, arg1):
14564 return arg0.at(arg1)
14567 if not arg0.__class__ is pw_multi_aff_list:
14568 arg0 = pw_multi_aff_list(arg0)
14572 res = isl.isl_pw_multi_aff_list_clear(isl.isl_pw_multi_aff_list_copy(arg0.ptr))
14573 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14575 def concat(arg0, arg1):
14577 if not arg0.__class__ is pw_multi_aff_list:
14578 arg0 = pw_multi_aff_list(arg0)
14582 if not arg1.__class__ is pw_multi_aff_list:
14583 arg1 = pw_multi_aff_list(arg1)
14587 res = isl.isl_pw_multi_aff_list_concat(isl.isl_pw_multi_aff_list_copy(arg0.ptr), isl.isl_pw_multi_aff_list_copy(arg1.ptr))
14588 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14590 def drop(arg0, arg1, arg2):
14592 if not arg0.__class__ is pw_multi_aff_list:
14593 arg0 = pw_multi_aff_list(arg0)
14597 res = isl.isl_pw_multi_aff_list_drop(isl.isl_pw_multi_aff_list_copy(arg0.ptr), arg1, arg2)
14598 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14600 def foreach(arg0, arg1):
14602 if not arg0.__class__ is pw_multi_aff_list:
14603 arg0 = pw_multi_aff_list(arg0)
14607 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14608 def cb_func(cb_arg0, cb_arg1):
14609 cb_arg0 = pw_multi_aff(ctx=arg0.ctx, ptr=(cb_arg0))
14612 except BaseException as e:
14618 res = isl.isl_pw_multi_aff_list_foreach(arg0.ptr, cb1, None)
14619 if exc_info[0] is not None:
14623 def foreach_scc(arg0, arg1, arg2):
14625 if not arg0.__class__ is pw_multi_aff_list:
14626 arg0 = pw_multi_aff_list(arg0)
14630 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
14631 def cb_func(cb_arg0, cb_arg1, cb_arg2):
14632 cb_arg0 = pw_multi_aff(ctx=arg0.ctx, ptr=isl.isl_pw_multi_aff_copy(cb_arg0))
14633 cb_arg1 = pw_multi_aff(ctx=arg0.ctx, ptr=isl.isl_pw_multi_aff_copy(cb_arg1))
14635 res = arg1(cb_arg0, cb_arg1)
14636 except BaseException as e:
14639 return 1 if res else 0
14642 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14643 def cb_func(cb_arg0, cb_arg1):
14644 cb_arg0 = pw_multi_aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
14647 except BaseException as e:
14653 res = isl.isl_pw_multi_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
14654 if exc_info[0] is not None:
14658 def insert(arg0, arg1, arg2):
14660 if not arg0.__class__ is pw_multi_aff_list:
14661 arg0 = pw_multi_aff_list(arg0)
14665 if not arg2.__class__ is pw_multi_aff:
14666 arg2 = pw_multi_aff(arg2)
14670 res = isl.isl_pw_multi_aff_list_insert(isl.isl_pw_multi_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_multi_aff_copy(arg2.ptr))
14671 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14673 def set_at(arg0, arg1, arg2):
14675 if not arg0.__class__ is pw_multi_aff_list:
14676 arg0 = pw_multi_aff_list(arg0)
14680 if not arg2.__class__ is pw_multi_aff:
14681 arg2 = pw_multi_aff(arg2)
14685 res = isl.isl_pw_multi_aff_list_set_at(isl.isl_pw_multi_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_multi_aff_copy(arg2.ptr))
14686 obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14690 if not arg0.__class__ is pw_multi_aff_list:
14691 arg0 = pw_multi_aff_list(arg0)
14695 res = isl.isl_pw_multi_aff_list_size(arg0.ptr)
14700 isl.isl_pw_multi_aff_list_alloc.restype = c_void_p
14701 isl.isl_pw_multi_aff_list_alloc.argtypes = [Context, c_int]
14702 isl.isl_pw_multi_aff_list_from_pw_multi_aff.restype = c_void_p
14703 isl.isl_pw_multi_aff_list_from_pw_multi_aff.argtypes = [c_void_p]
14704 isl.isl_pw_multi_aff_list_read_from_str.restype = c_void_p
14705 isl.isl_pw_multi_aff_list_read_from_str.argtypes = [Context, c_char_p]
14706 isl.isl_pw_multi_aff_list_add.restype = c_void_p
14707 isl.isl_pw_multi_aff_list_add.argtypes = [c_void_p, c_void_p]
14708 isl.isl_pw_multi_aff_list_get_at.restype = c_void_p
14709 isl.isl_pw_multi_aff_list_get_at.argtypes = [c_void_p, c_int]
14710 isl.isl_pw_multi_aff_list_clear.restype = c_void_p
14711 isl.isl_pw_multi_aff_list_clear.argtypes = [c_void_p]
14712 isl.isl_pw_multi_aff_list_concat.restype = c_void_p
14713 isl.isl_pw_multi_aff_list_concat.argtypes = [c_void_p, c_void_p]
14714 isl.isl_pw_multi_aff_list_drop.restype = c_void_p
14715 isl.isl_pw_multi_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
14716 isl.isl_pw_multi_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
14717 isl.isl_pw_multi_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
14718 isl.isl_pw_multi_aff_list_insert.restype = c_void_p
14719 isl.isl_pw_multi_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
14720 isl.isl_pw_multi_aff_list_set_at.restype = c_void_p
14721 isl.isl_pw_multi_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
14722 isl.isl_pw_multi_aff_list_size.argtypes = [c_void_p]
14723 isl.isl_pw_multi_aff_list_copy.restype = c_void_p
14724 isl.isl_pw_multi_aff_list_copy.argtypes = [c_void_p]
14725 isl.isl_pw_multi_aff_list_free.restype = c_void_p
14726 isl.isl_pw_multi_aff_list_free.argtypes = [c_void_p]
14727 isl.isl_pw_multi_aff_list_to_str.restype = POINTER(c_char)
14728 isl.isl_pw_multi_aff_list_to_str.argtypes = [c_void_p]
14730 class schedule(object):
14731 def __init__(self, *args, **keywords):
14732 if "ptr" in keywords:
14733 self.ctx = keywords["ctx"]
14734 self.ptr = keywords["ptr"]
14736 if len(args) == 1 and type(args[0]) == str:
14737 self.ctx = Context.getDefaultInstance()
14738 self.ptr = isl.isl_schedule_read_from_str(self.ctx, args[0].encode('ascii'))
14742 if hasattr(self, 'ptr'):
14743 isl.isl_schedule_free(self.ptr)
14746 if not arg0.__class__ is schedule:
14747 arg0 = schedule(arg0)
14750 ptr = isl.isl_schedule_to_str(arg0.ptr)
14751 res = cast(ptr, c_char_p).value.decode('ascii')
14754 def __repr__(self):
14757 return 'isl.schedule("""%s""")' % s
14759 return 'isl.schedule("%s")' % s
14762 if not arg0.__class__ is schedule:
14763 arg0 = schedule(arg0)
14767 res = isl.isl_schedule_get_domain(arg0.ptr)
14768 obj = union_set(ctx=ctx, ptr=res)
14770 def get_domain(arg0):
14771 return arg0.domain()
14773 def from_domain(arg0):
14775 if not arg0.__class__ is union_set:
14776 arg0 = union_set(arg0)
14780 res = isl.isl_schedule_from_domain(isl.isl_union_set_copy(arg0.ptr))
14781 obj = schedule(ctx=ctx, ptr=res)
14785 if not arg0.__class__ is schedule:
14786 arg0 = schedule(arg0)
14790 res = isl.isl_schedule_get_map(arg0.ptr)
14791 obj = union_map(ctx=ctx, ptr=res)
14795 def pullback(*args):
14796 if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
14799 if not args[0].__class__ is schedule:
14800 args[0] = schedule(args[0])
14804 res = isl.isl_schedule_pullback_union_pw_multi_aff(isl.isl_schedule_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
14805 obj = schedule(ctx=ctx, ptr=res)
14810 if not arg0.__class__ is schedule:
14811 arg0 = schedule(arg0)
14815 res = isl.isl_schedule_get_root(arg0.ptr)
14816 obj = schedule_node(ctx=ctx, ptr=res)
14818 def get_root(arg0):
14821 isl.isl_schedule_read_from_str.restype = c_void_p
14822 isl.isl_schedule_read_from_str.argtypes = [Context, c_char_p]
14823 isl.isl_schedule_get_domain.restype = c_void_p
14824 isl.isl_schedule_get_domain.argtypes = [c_void_p]
14825 isl.isl_schedule_from_domain.restype = c_void_p
14826 isl.isl_schedule_from_domain.argtypes = [c_void_p]
14827 isl.isl_schedule_get_map.restype = c_void_p
14828 isl.isl_schedule_get_map.argtypes = [c_void_p]
14829 isl.isl_schedule_pullback_union_pw_multi_aff.restype = c_void_p
14830 isl.isl_schedule_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
14831 isl.isl_schedule_get_root.restype = c_void_p
14832 isl.isl_schedule_get_root.argtypes = [c_void_p]
14833 isl.isl_schedule_copy.restype = c_void_p
14834 isl.isl_schedule_copy.argtypes = [c_void_p]
14835 isl.isl_schedule_free.restype = c_void_p
14836 isl.isl_schedule_free.argtypes = [c_void_p]
14837 isl.isl_schedule_to_str.restype = POINTER(c_char)
14838 isl.isl_schedule_to_str.argtypes = [c_void_p]
14840 class schedule_constraints(object):
14841 def __init__(self, *args, **keywords):
14842 if "ptr" in keywords:
14843 self.ctx = keywords["ctx"]
14844 self.ptr = keywords["ptr"]
14846 if len(args) == 1 and type(args[0]) == str:
14847 self.ctx = Context.getDefaultInstance()
14848 self.ptr = isl.isl_schedule_constraints_read_from_str(self.ctx, args[0].encode('ascii'))
14852 if hasattr(self, 'ptr'):
14853 isl.isl_schedule_constraints_free(self.ptr)
14856 if not arg0.__class__ is schedule_constraints:
14857 arg0 = schedule_constraints(arg0)
14860 ptr = isl.isl_schedule_constraints_to_str(arg0.ptr)
14861 res = cast(ptr, c_char_p).value.decode('ascii')
14864 def __repr__(self):
14867 return 'isl.schedule_constraints("""%s""")' % s
14869 return 'isl.schedule_constraints("%s")' % s
14870 def coincidence(arg0):
14872 if not arg0.__class__ is schedule_constraints:
14873 arg0 = schedule_constraints(arg0)
14877 res = isl.isl_schedule_constraints_get_coincidence(arg0.ptr)
14878 obj = union_map(ctx=ctx, ptr=res)
14880 def get_coincidence(arg0):
14881 return arg0.coincidence()
14882 def compute_schedule(arg0):
14884 if not arg0.__class__ is schedule_constraints:
14885 arg0 = schedule_constraints(arg0)
14889 res = isl.isl_schedule_constraints_compute_schedule(isl.isl_schedule_constraints_copy(arg0.ptr))
14890 obj = schedule(ctx=ctx, ptr=res)
14892 def conditional_validity(arg0):
14894 if not arg0.__class__ is schedule_constraints:
14895 arg0 = schedule_constraints(arg0)
14899 res = isl.isl_schedule_constraints_get_conditional_validity(arg0.ptr)
14900 obj = union_map(ctx=ctx, ptr=res)
14902 def get_conditional_validity(arg0):
14903 return arg0.conditional_validity()
14904 def conditional_validity_condition(arg0):
14906 if not arg0.__class__ is schedule_constraints:
14907 arg0 = schedule_constraints(arg0)
14911 res = isl.isl_schedule_constraints_get_conditional_validity_condition(arg0.ptr)
14912 obj = union_map(ctx=ctx, ptr=res)
14914 def get_conditional_validity_condition(arg0):
14915 return arg0.conditional_validity_condition()
14918 if not arg0.__class__ is schedule_constraints:
14919 arg0 = schedule_constraints(arg0)
14923 res = isl.isl_schedule_constraints_get_context(arg0.ptr)
14924 obj = set(ctx=ctx, ptr=res)
14926 def get_context(arg0):
14927 return arg0.context()
14930 if not arg0.__class__ is schedule_constraints:
14931 arg0 = schedule_constraints(arg0)
14935 res = isl.isl_schedule_constraints_get_domain(arg0.ptr)
14936 obj = union_set(ctx=ctx, ptr=res)
14938 def get_domain(arg0):
14939 return arg0.domain()
14941 def on_domain(arg0):
14943 if not arg0.__class__ is union_set:
14944 arg0 = union_set(arg0)
14948 res = isl.isl_schedule_constraints_on_domain(isl.isl_union_set_copy(arg0.ptr))
14949 obj = schedule_constraints(ctx=ctx, ptr=res)
14951 def proximity(arg0):
14953 if not arg0.__class__ is schedule_constraints:
14954 arg0 = schedule_constraints(arg0)
14958 res = isl.isl_schedule_constraints_get_proximity(arg0.ptr)
14959 obj = union_map(ctx=ctx, ptr=res)
14961 def get_proximity(arg0):
14962 return arg0.proximity()
14963 def set_coincidence(arg0, arg1):
14965 if not arg0.__class__ is schedule_constraints:
14966 arg0 = schedule_constraints(arg0)
14970 if not arg1.__class__ is union_map:
14971 arg1 = union_map(arg1)
14975 res = isl.isl_schedule_constraints_set_coincidence(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
14976 obj = schedule_constraints(ctx=ctx, ptr=res)
14978 def set_conditional_validity(arg0, arg1, arg2):
14980 if not arg0.__class__ is schedule_constraints:
14981 arg0 = schedule_constraints(arg0)
14985 if not arg1.__class__ is union_map:
14986 arg1 = union_map(arg1)
14990 if not arg2.__class__ is union_map:
14991 arg2 = union_map(arg2)
14995 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))
14996 obj = schedule_constraints(ctx=ctx, ptr=res)
14998 def set_context(arg0, arg1):
15000 if not arg0.__class__ is schedule_constraints:
15001 arg0 = schedule_constraints(arg0)
15005 if not arg1.__class__ is set:
15010 res = isl.isl_schedule_constraints_set_context(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
15011 obj = schedule_constraints(ctx=ctx, ptr=res)
15013 def set_proximity(arg0, arg1):
15015 if not arg0.__class__ is schedule_constraints:
15016 arg0 = schedule_constraints(arg0)
15020 if not arg1.__class__ is union_map:
15021 arg1 = union_map(arg1)
15025 res = isl.isl_schedule_constraints_set_proximity(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
15026 obj = schedule_constraints(ctx=ctx, ptr=res)
15028 def set_validity(arg0, arg1):
15030 if not arg0.__class__ is schedule_constraints:
15031 arg0 = schedule_constraints(arg0)
15035 if not arg1.__class__ is union_map:
15036 arg1 = union_map(arg1)
15040 res = isl.isl_schedule_constraints_set_validity(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
15041 obj = schedule_constraints(ctx=ctx, ptr=res)
15043 def validity(arg0):
15045 if not arg0.__class__ is schedule_constraints:
15046 arg0 = schedule_constraints(arg0)
15050 res = isl.isl_schedule_constraints_get_validity(arg0.ptr)
15051 obj = union_map(ctx=ctx, ptr=res)
15053 def get_validity(arg0):
15054 return arg0.validity()
15056 isl.isl_schedule_constraints_read_from_str.restype = c_void_p
15057 isl.isl_schedule_constraints_read_from_str.argtypes = [Context, c_char_p]
15058 isl.isl_schedule_constraints_get_coincidence.restype = c_void_p
15059 isl.isl_schedule_constraints_get_coincidence.argtypes = [c_void_p]
15060 isl.isl_schedule_constraints_compute_schedule.restype = c_void_p
15061 isl.isl_schedule_constraints_compute_schedule.argtypes = [c_void_p]
15062 isl.isl_schedule_constraints_get_conditional_validity.restype = c_void_p
15063 isl.isl_schedule_constraints_get_conditional_validity.argtypes = [c_void_p]
15064 isl.isl_schedule_constraints_get_conditional_validity_condition.restype = c_void_p
15065 isl.isl_schedule_constraints_get_conditional_validity_condition.argtypes = [c_void_p]
15066 isl.isl_schedule_constraints_get_context.restype = c_void_p
15067 isl.isl_schedule_constraints_get_context.argtypes = [c_void_p]
15068 isl.isl_schedule_constraints_get_domain.restype = c_void_p
15069 isl.isl_schedule_constraints_get_domain.argtypes = [c_void_p]
15070 isl.isl_schedule_constraints_on_domain.restype = c_void_p
15071 isl.isl_schedule_constraints_on_domain.argtypes = [c_void_p]
15072 isl.isl_schedule_constraints_get_proximity.restype = c_void_p
15073 isl.isl_schedule_constraints_get_proximity.argtypes = [c_void_p]
15074 isl.isl_schedule_constraints_set_coincidence.restype = c_void_p
15075 isl.isl_schedule_constraints_set_coincidence.argtypes = [c_void_p, c_void_p]
15076 isl.isl_schedule_constraints_set_conditional_validity.restype = c_void_p
15077 isl.isl_schedule_constraints_set_conditional_validity.argtypes = [c_void_p, c_void_p, c_void_p]
15078 isl.isl_schedule_constraints_set_context.restype = c_void_p
15079 isl.isl_schedule_constraints_set_context.argtypes = [c_void_p, c_void_p]
15080 isl.isl_schedule_constraints_set_proximity.restype = c_void_p
15081 isl.isl_schedule_constraints_set_proximity.argtypes = [c_void_p, c_void_p]
15082 isl.isl_schedule_constraints_set_validity.restype = c_void_p
15083 isl.isl_schedule_constraints_set_validity.argtypes = [c_void_p, c_void_p]
15084 isl.isl_schedule_constraints_get_validity.restype = c_void_p
15085 isl.isl_schedule_constraints_get_validity.argtypes = [c_void_p]
15086 isl.isl_schedule_constraints_copy.restype = c_void_p
15087 isl.isl_schedule_constraints_copy.argtypes = [c_void_p]
15088 isl.isl_schedule_constraints_free.restype = c_void_p
15089 isl.isl_schedule_constraints_free.argtypes = [c_void_p]
15090 isl.isl_schedule_constraints_to_str.restype = POINTER(c_char)
15091 isl.isl_schedule_constraints_to_str.argtypes = [c_void_p]
15093 class schedule_node(object):
15094 def __init__(self, *args, **keywords):
15095 if "ptr" in keywords:
15096 self.ctx = keywords["ctx"]
15097 self.ptr = keywords["ptr"]
15099 if len(args) == 1 and isinstance(args[0], schedule_node_band):
15100 self.ctx = args[0].ctx
15101 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15103 if len(args) == 1 and isinstance(args[0], schedule_node_context):
15104 self.ctx = args[0].ctx
15105 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15107 if len(args) == 1 and isinstance(args[0], schedule_node_domain):
15108 self.ctx = args[0].ctx
15109 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15111 if len(args) == 1 and isinstance(args[0], schedule_node_expansion):
15112 self.ctx = args[0].ctx
15113 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15115 if len(args) == 1 and isinstance(args[0], schedule_node_extension):
15116 self.ctx = args[0].ctx
15117 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15119 if len(args) == 1 and isinstance(args[0], schedule_node_filter):
15120 self.ctx = args[0].ctx
15121 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15123 if len(args) == 1 and isinstance(args[0], schedule_node_leaf):
15124 self.ctx = args[0].ctx
15125 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15127 if len(args) == 1 and isinstance(args[0], schedule_node_guard):
15128 self.ctx = args[0].ctx
15129 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15131 if len(args) == 1 and isinstance(args[0], schedule_node_mark):
15132 self.ctx = args[0].ctx
15133 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15135 if len(args) == 1 and isinstance(args[0], schedule_node_sequence):
15136 self.ctx = args[0].ctx
15137 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15139 if len(args) == 1 and isinstance(args[0], schedule_node_set):
15140 self.ctx = args[0].ctx
15141 self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15145 if hasattr(self, 'ptr'):
15146 isl.isl_schedule_node_free(self.ptr)
15147 def __new__(cls, *args, **keywords):
15148 if "ptr" in keywords:
15149 type = isl.isl_schedule_node_get_type(keywords["ptr"])
15151 return schedule_node_band(**keywords)
15153 return schedule_node_context(**keywords)
15155 return schedule_node_domain(**keywords)
15157 return schedule_node_expansion(**keywords)
15159 return schedule_node_extension(**keywords)
15161 return schedule_node_filter(**keywords)
15163 return schedule_node_leaf(**keywords)
15165 return schedule_node_guard(**keywords)
15167 return schedule_node_mark(**keywords)
15169 return schedule_node_sequence(**keywords)
15171 return schedule_node_set(**keywords)
15173 return super(schedule_node, cls).__new__(cls)
15176 if not arg0.__class__ is schedule_node:
15177 arg0 = schedule_node(arg0)
15180 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
15181 res = cast(ptr, c_char_p).value.decode('ascii')
15184 def __repr__(self):
15187 return 'isl.schedule_node("""%s""")' % s
15189 return 'isl.schedule_node("%s")' % s
15190 def ancestor(arg0, arg1):
15192 if not arg0.__class__ is schedule_node:
15193 arg0 = schedule_node(arg0)
15197 res = isl.isl_schedule_node_ancestor(isl.isl_schedule_node_copy(arg0.ptr), arg1)
15198 obj = schedule_node(ctx=ctx, ptr=res)
15200 def ancestor_child_position(arg0, arg1):
15202 if not arg0.__class__ is schedule_node:
15203 arg0 = schedule_node(arg0)
15207 if not arg1.__class__ is schedule_node:
15208 arg1 = schedule_node(arg1)
15212 res = isl.isl_schedule_node_get_ancestor_child_position(arg0.ptr, arg1.ptr)
15216 def get_ancestor_child_position(arg0, arg1):
15217 return arg0.ancestor_child_position(arg1)
15218 def child(arg0, arg1):
15220 if not arg0.__class__ is schedule_node:
15221 arg0 = schedule_node(arg0)
15225 res = isl.isl_schedule_node_child(isl.isl_schedule_node_copy(arg0.ptr), arg1)
15226 obj = schedule_node(ctx=ctx, ptr=res)
15228 def child_position(arg0):
15230 if not arg0.__class__ is schedule_node:
15231 arg0 = schedule_node(arg0)
15235 res = isl.isl_schedule_node_get_child_position(arg0.ptr)
15239 def get_child_position(arg0):
15240 return arg0.child_position()
15241 def every_descendant(arg0, arg1):
15243 if not arg0.__class__ is schedule_node:
15244 arg0 = schedule_node(arg0)
15248 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
15249 def cb_func(cb_arg0, cb_arg1):
15250 cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=isl.isl_schedule_node_copy(cb_arg0))
15252 res = arg1(cb_arg0)
15253 except BaseException as e:
15256 return 1 if res else 0
15259 res = isl.isl_schedule_node_every_descendant(arg0.ptr, cb1, None)
15260 if exc_info[0] is not None:
15265 def first_child(arg0):
15267 if not arg0.__class__ is schedule_node:
15268 arg0 = schedule_node(arg0)
15272 res = isl.isl_schedule_node_first_child(isl.isl_schedule_node_copy(arg0.ptr))
15273 obj = schedule_node(ctx=ctx, ptr=res)
15275 def foreach_ancestor_top_down(arg0, arg1):
15277 if not arg0.__class__ is schedule_node:
15278 arg0 = schedule_node(arg0)
15282 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
15283 def cb_func(cb_arg0, cb_arg1):
15284 cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=isl.isl_schedule_node_copy(cb_arg0))
15287 except BaseException as e:
15293 res = isl.isl_schedule_node_foreach_ancestor_top_down(arg0.ptr, cb1, None)
15294 if exc_info[0] is not None:
15298 def foreach_descendant_top_down(arg0, arg1):
15300 if not arg0.__class__ is schedule_node:
15301 arg0 = schedule_node(arg0)
15305 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
15306 def cb_func(cb_arg0, cb_arg1):
15307 cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=isl.isl_schedule_node_copy(cb_arg0))
15309 res = arg1(cb_arg0)
15310 except BaseException as e:
15313 return 1 if res else 0
15316 res = isl.isl_schedule_node_foreach_descendant_top_down(arg0.ptr, cb1, None)
15317 if exc_info[0] is not None:
15322 def from_domain(arg0):
15324 if not arg0.__class__ is union_set:
15325 arg0 = union_set(arg0)
15329 res = isl.isl_schedule_node_from_domain(isl.isl_union_set_copy(arg0.ptr))
15330 obj = schedule_node(ctx=ctx, ptr=res)
15333 def from_extension(arg0):
15335 if not arg0.__class__ is union_map:
15336 arg0 = union_map(arg0)
15340 res = isl.isl_schedule_node_from_extension(isl.isl_union_map_copy(arg0.ptr))
15341 obj = schedule_node(ctx=ctx, ptr=res)
15343 def graft_after(arg0, arg1):
15345 if not arg0.__class__ is schedule_node:
15346 arg0 = schedule_node(arg0)
15350 if not arg1.__class__ is schedule_node:
15351 arg1 = schedule_node(arg1)
15355 res = isl.isl_schedule_node_graft_after(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_schedule_node_copy(arg1.ptr))
15356 obj = schedule_node(ctx=ctx, ptr=res)
15358 def graft_before(arg0, arg1):
15360 if not arg0.__class__ is schedule_node:
15361 arg0 = schedule_node(arg0)
15365 if not arg1.__class__ is schedule_node:
15366 arg1 = schedule_node(arg1)
15370 res = isl.isl_schedule_node_graft_before(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_schedule_node_copy(arg1.ptr))
15371 obj = schedule_node(ctx=ctx, ptr=res)
15373 def has_children(arg0):
15375 if not arg0.__class__ is schedule_node:
15376 arg0 = schedule_node(arg0)
15380 res = isl.isl_schedule_node_has_children(arg0.ptr)
15384 def has_next_sibling(arg0):
15386 if not arg0.__class__ is schedule_node:
15387 arg0 = schedule_node(arg0)
15391 res = isl.isl_schedule_node_has_next_sibling(arg0.ptr)
15395 def has_parent(arg0):
15397 if not arg0.__class__ is schedule_node:
15398 arg0 = schedule_node(arg0)
15402 res = isl.isl_schedule_node_has_parent(arg0.ptr)
15406 def has_previous_sibling(arg0):
15408 if not arg0.__class__ is schedule_node:
15409 arg0 = schedule_node(arg0)
15413 res = isl.isl_schedule_node_has_previous_sibling(arg0.ptr)
15417 def insert_context(arg0, arg1):
15419 if not arg0.__class__ is schedule_node:
15420 arg0 = schedule_node(arg0)
15424 if not arg1.__class__ is set:
15429 res = isl.isl_schedule_node_insert_context(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
15430 obj = schedule_node(ctx=ctx, ptr=res)
15432 def insert_filter(arg0, arg1):
15434 if not arg0.__class__ is schedule_node:
15435 arg0 = schedule_node(arg0)
15439 if not arg1.__class__ is union_set:
15440 arg1 = union_set(arg1)
15444 res = isl.isl_schedule_node_insert_filter(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15445 obj = schedule_node(ctx=ctx, ptr=res)
15447 def insert_guard(arg0, arg1):
15449 if not arg0.__class__ is schedule_node:
15450 arg0 = schedule_node(arg0)
15454 if not arg1.__class__ is set:
15459 res = isl.isl_schedule_node_insert_guard(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
15460 obj = schedule_node(ctx=ctx, ptr=res)
15462 def insert_mark(arg0, arg1):
15464 if not arg0.__class__ is schedule_node:
15465 arg0 = schedule_node(arg0)
15469 if not arg1.__class__ is id:
15474 res = isl.isl_schedule_node_insert_mark(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr))
15475 obj = schedule_node(ctx=ctx, ptr=res)
15477 def insert_partial_schedule(arg0, arg1):
15479 if not arg0.__class__ is schedule_node:
15480 arg0 = schedule_node(arg0)
15484 if not arg1.__class__ is multi_union_pw_aff:
15485 arg1 = multi_union_pw_aff(arg1)
15489 res = isl.isl_schedule_node_insert_partial_schedule(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
15490 obj = schedule_node(ctx=ctx, ptr=res)
15492 def insert_sequence(arg0, arg1):
15494 if not arg0.__class__ is schedule_node:
15495 arg0 = schedule_node(arg0)
15499 if not arg1.__class__ is union_set_list:
15500 arg1 = union_set_list(arg1)
15504 res = isl.isl_schedule_node_insert_sequence(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_list_copy(arg1.ptr))
15505 obj = schedule_node(ctx=ctx, ptr=res)
15507 def insert_set(arg0, arg1):
15509 if not arg0.__class__ is schedule_node:
15510 arg0 = schedule_node(arg0)
15514 if not arg1.__class__ is union_set_list:
15515 arg1 = union_set_list(arg1)
15519 res = isl.isl_schedule_node_insert_set(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_list_copy(arg1.ptr))
15520 obj = schedule_node(ctx=ctx, ptr=res)
15522 def is_equal(arg0, arg1):
15524 if not arg0.__class__ is schedule_node:
15525 arg0 = schedule_node(arg0)
15529 if not arg1.__class__ is schedule_node:
15530 arg1 = schedule_node(arg1)
15534 res = isl.isl_schedule_node_is_equal(arg0.ptr, arg1.ptr)
15538 def is_subtree_anchored(arg0):
15540 if not arg0.__class__ is schedule_node:
15541 arg0 = schedule_node(arg0)
15545 res = isl.isl_schedule_node_is_subtree_anchored(arg0.ptr)
15549 def map_descendant_bottom_up(arg0, arg1):
15551 if not arg0.__class__ is schedule_node:
15552 arg0 = schedule_node(arg0)
15556 fn = CFUNCTYPE(c_void_p, c_void_p, c_void_p)
15557 def cb_func(cb_arg0, cb_arg1):
15558 cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=(cb_arg0))
15560 res = arg1(cb_arg0)
15561 except BaseException as e:
15564 return isl.isl_schedule_node_copy(res.ptr)
15567 res = isl.isl_schedule_node_map_descendant_bottom_up(isl.isl_schedule_node_copy(arg0.ptr), cb1, None)
15568 if exc_info[0] is not None:
15570 obj = schedule_node(ctx=ctx, ptr=res)
15572 def n_children(arg0):
15574 if not arg0.__class__ is schedule_node:
15575 arg0 = schedule_node(arg0)
15579 res = isl.isl_schedule_node_n_children(arg0.ptr)
15583 def next_sibling(arg0):
15585 if not arg0.__class__ is schedule_node:
15586 arg0 = schedule_node(arg0)
15590 res = isl.isl_schedule_node_next_sibling(isl.isl_schedule_node_copy(arg0.ptr))
15591 obj = schedule_node(ctx=ctx, ptr=res)
15593 def order_after(arg0, arg1):
15595 if not arg0.__class__ is schedule_node:
15596 arg0 = schedule_node(arg0)
15600 if not arg1.__class__ is union_set:
15601 arg1 = union_set(arg1)
15605 res = isl.isl_schedule_node_order_after(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15606 obj = schedule_node(ctx=ctx, ptr=res)
15608 def order_before(arg0, arg1):
15610 if not arg0.__class__ is schedule_node:
15611 arg0 = schedule_node(arg0)
15615 if not arg1.__class__ is union_set:
15616 arg1 = union_set(arg1)
15620 res = isl.isl_schedule_node_order_before(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15621 obj = schedule_node(ctx=ctx, ptr=res)
15625 if not arg0.__class__ is schedule_node:
15626 arg0 = schedule_node(arg0)
15630 res = isl.isl_schedule_node_parent(isl.isl_schedule_node_copy(arg0.ptr))
15631 obj = schedule_node(ctx=ctx, ptr=res)
15633 def prefix_schedule_multi_union_pw_aff(arg0):
15635 if not arg0.__class__ is schedule_node:
15636 arg0 = schedule_node(arg0)
15640 res = isl.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(arg0.ptr)
15641 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
15643 def get_prefix_schedule_multi_union_pw_aff(arg0):
15644 return arg0.prefix_schedule_multi_union_pw_aff()
15645 def prefix_schedule_union_map(arg0):
15647 if not arg0.__class__ is schedule_node:
15648 arg0 = schedule_node(arg0)
15652 res = isl.isl_schedule_node_get_prefix_schedule_union_map(arg0.ptr)
15653 obj = union_map(ctx=ctx, ptr=res)
15655 def get_prefix_schedule_union_map(arg0):
15656 return arg0.prefix_schedule_union_map()
15657 def prefix_schedule_union_pw_multi_aff(arg0):
15659 if not arg0.__class__ is schedule_node:
15660 arg0 = schedule_node(arg0)
15664 res = isl.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(arg0.ptr)
15665 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
15667 def get_prefix_schedule_union_pw_multi_aff(arg0):
15668 return arg0.prefix_schedule_union_pw_multi_aff()
15669 def previous_sibling(arg0):
15671 if not arg0.__class__ is schedule_node:
15672 arg0 = schedule_node(arg0)
15676 res = isl.isl_schedule_node_previous_sibling(isl.isl_schedule_node_copy(arg0.ptr))
15677 obj = schedule_node(ctx=ctx, ptr=res)
15681 if not arg0.__class__ is schedule_node:
15682 arg0 = schedule_node(arg0)
15686 res = isl.isl_schedule_node_root(isl.isl_schedule_node_copy(arg0.ptr))
15687 obj = schedule_node(ctx=ctx, ptr=res)
15689 def schedule(arg0):
15691 if not arg0.__class__ is schedule_node:
15692 arg0 = schedule_node(arg0)
15696 res = isl.isl_schedule_node_get_schedule(arg0.ptr)
15697 obj = schedule(ctx=ctx, ptr=res)
15699 def get_schedule(arg0):
15700 return arg0.schedule()
15701 def shared_ancestor(arg0, arg1):
15703 if not arg0.__class__ is schedule_node:
15704 arg0 = schedule_node(arg0)
15708 if not arg1.__class__ is schedule_node:
15709 arg1 = schedule_node(arg1)
15713 res = isl.isl_schedule_node_get_shared_ancestor(arg0.ptr, arg1.ptr)
15714 obj = schedule_node(ctx=ctx, ptr=res)
15716 def get_shared_ancestor(arg0, arg1):
15717 return arg0.shared_ancestor(arg1)
15718 def tree_depth(arg0):
15720 if not arg0.__class__ is schedule_node:
15721 arg0 = schedule_node(arg0)
15725 res = isl.isl_schedule_node_get_tree_depth(arg0.ptr)
15729 def get_tree_depth(arg0):
15730 return arg0.tree_depth()
15732 isl.isl_schedule_node_ancestor.restype = c_void_p
15733 isl.isl_schedule_node_ancestor.argtypes = [c_void_p, c_int]
15734 isl.isl_schedule_node_get_ancestor_child_position.argtypes = [c_void_p, c_void_p]
15735 isl.isl_schedule_node_child.restype = c_void_p
15736 isl.isl_schedule_node_child.argtypes = [c_void_p, c_int]
15737 isl.isl_schedule_node_get_child_position.argtypes = [c_void_p]
15738 isl.isl_schedule_node_every_descendant.argtypes = [c_void_p, c_void_p, c_void_p]
15739 isl.isl_schedule_node_first_child.restype = c_void_p
15740 isl.isl_schedule_node_first_child.argtypes = [c_void_p]
15741 isl.isl_schedule_node_foreach_ancestor_top_down.argtypes = [c_void_p, c_void_p, c_void_p]
15742 isl.isl_schedule_node_foreach_descendant_top_down.argtypes = [c_void_p, c_void_p, c_void_p]
15743 isl.isl_schedule_node_from_domain.restype = c_void_p
15744 isl.isl_schedule_node_from_domain.argtypes = [c_void_p]
15745 isl.isl_schedule_node_from_extension.restype = c_void_p
15746 isl.isl_schedule_node_from_extension.argtypes = [c_void_p]
15747 isl.isl_schedule_node_graft_after.restype = c_void_p
15748 isl.isl_schedule_node_graft_after.argtypes = [c_void_p, c_void_p]
15749 isl.isl_schedule_node_graft_before.restype = c_void_p
15750 isl.isl_schedule_node_graft_before.argtypes = [c_void_p, c_void_p]
15751 isl.isl_schedule_node_has_children.argtypes = [c_void_p]
15752 isl.isl_schedule_node_has_next_sibling.argtypes = [c_void_p]
15753 isl.isl_schedule_node_has_parent.argtypes = [c_void_p]
15754 isl.isl_schedule_node_has_previous_sibling.argtypes = [c_void_p]
15755 isl.isl_schedule_node_insert_context.restype = c_void_p
15756 isl.isl_schedule_node_insert_context.argtypes = [c_void_p, c_void_p]
15757 isl.isl_schedule_node_insert_filter.restype = c_void_p
15758 isl.isl_schedule_node_insert_filter.argtypes = [c_void_p, c_void_p]
15759 isl.isl_schedule_node_insert_guard.restype = c_void_p
15760 isl.isl_schedule_node_insert_guard.argtypes = [c_void_p, c_void_p]
15761 isl.isl_schedule_node_insert_mark.restype = c_void_p
15762 isl.isl_schedule_node_insert_mark.argtypes = [c_void_p, c_void_p]
15763 isl.isl_schedule_node_insert_partial_schedule.restype = c_void_p
15764 isl.isl_schedule_node_insert_partial_schedule.argtypes = [c_void_p, c_void_p]
15765 isl.isl_schedule_node_insert_sequence.restype = c_void_p
15766 isl.isl_schedule_node_insert_sequence.argtypes = [c_void_p, c_void_p]
15767 isl.isl_schedule_node_insert_set.restype = c_void_p
15768 isl.isl_schedule_node_insert_set.argtypes = [c_void_p, c_void_p]
15769 isl.isl_schedule_node_is_equal.argtypes = [c_void_p, c_void_p]
15770 isl.isl_schedule_node_is_subtree_anchored.argtypes = [c_void_p]
15771 isl.isl_schedule_node_map_descendant_bottom_up.restype = c_void_p
15772 isl.isl_schedule_node_map_descendant_bottom_up.argtypes = [c_void_p, c_void_p, c_void_p]
15773 isl.isl_schedule_node_n_children.argtypes = [c_void_p]
15774 isl.isl_schedule_node_next_sibling.restype = c_void_p
15775 isl.isl_schedule_node_next_sibling.argtypes = [c_void_p]
15776 isl.isl_schedule_node_order_after.restype = c_void_p
15777 isl.isl_schedule_node_order_after.argtypes = [c_void_p, c_void_p]
15778 isl.isl_schedule_node_order_before.restype = c_void_p
15779 isl.isl_schedule_node_order_before.argtypes = [c_void_p, c_void_p]
15780 isl.isl_schedule_node_parent.restype = c_void_p
15781 isl.isl_schedule_node_parent.argtypes = [c_void_p]
15782 isl.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff.restype = c_void_p
15783 isl.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff.argtypes = [c_void_p]
15784 isl.isl_schedule_node_get_prefix_schedule_union_map.restype = c_void_p
15785 isl.isl_schedule_node_get_prefix_schedule_union_map.argtypes = [c_void_p]
15786 isl.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff.restype = c_void_p
15787 isl.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff.argtypes = [c_void_p]
15788 isl.isl_schedule_node_previous_sibling.restype = c_void_p
15789 isl.isl_schedule_node_previous_sibling.argtypes = [c_void_p]
15790 isl.isl_schedule_node_root.restype = c_void_p
15791 isl.isl_schedule_node_root.argtypes = [c_void_p]
15792 isl.isl_schedule_node_get_schedule.restype = c_void_p
15793 isl.isl_schedule_node_get_schedule.argtypes = [c_void_p]
15794 isl.isl_schedule_node_get_shared_ancestor.restype = c_void_p
15795 isl.isl_schedule_node_get_shared_ancestor.argtypes = [c_void_p, c_void_p]
15796 isl.isl_schedule_node_get_tree_depth.argtypes = [c_void_p]
15797 isl.isl_schedule_node_copy.restype = c_void_p
15798 isl.isl_schedule_node_copy.argtypes = [c_void_p]
15799 isl.isl_schedule_node_free.restype = c_void_p
15800 isl.isl_schedule_node_free.argtypes = [c_void_p]
15801 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
15802 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
15803 isl.isl_schedule_node_get_type.argtypes = [c_void_p]
15805 class schedule_node_band(schedule_node):
15806 def __init__(self, *args, **keywords):
15807 if "ptr" in keywords:
15808 self.ctx = keywords["ctx"]
15809 self.ptr = keywords["ptr"]
15813 if hasattr(self, 'ptr'):
15814 isl.isl_schedule_node_free(self.ptr)
15815 def __new__(cls, *args, **keywords):
15816 return super(schedule_node_band, cls).__new__(cls)
15819 if not arg0.__class__ is schedule_node_band:
15820 arg0 = schedule_node_band(arg0)
15823 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
15824 res = cast(ptr, c_char_p).value.decode('ascii')
15827 def __repr__(self):
15830 return 'isl.schedule_node_band("""%s""")' % s
15832 return 'isl.schedule_node_band("%s")' % s
15833 def ast_build_options(arg0):
15835 if not arg0.__class__ is schedule_node:
15836 arg0 = schedule_node(arg0)
15840 res = isl.isl_schedule_node_band_get_ast_build_options(arg0.ptr)
15841 obj = union_set(ctx=ctx, ptr=res)
15843 def get_ast_build_options(arg0):
15844 return arg0.ast_build_options()
15845 def ast_isolate_option(arg0):
15847 if not arg0.__class__ is schedule_node:
15848 arg0 = schedule_node(arg0)
15852 res = isl.isl_schedule_node_band_get_ast_isolate_option(arg0.ptr)
15853 obj = set(ctx=ctx, ptr=res)
15855 def get_ast_isolate_option(arg0):
15856 return arg0.ast_isolate_option()
15857 def member_get_coincident(arg0, arg1):
15859 if not arg0.__class__ is schedule_node:
15860 arg0 = schedule_node(arg0)
15864 res = isl.isl_schedule_node_band_member_get_coincident(arg0.ptr, arg1)
15868 def member_set_coincident(arg0, arg1, arg2):
15870 if not arg0.__class__ is schedule_node:
15871 arg0 = schedule_node(arg0)
15875 res = isl.isl_schedule_node_band_member_set_coincident(isl.isl_schedule_node_copy(arg0.ptr), arg1, arg2)
15876 obj = schedule_node(ctx=ctx, ptr=res)
15878 def mod(arg0, arg1):
15880 if not arg0.__class__ is schedule_node:
15881 arg0 = schedule_node(arg0)
15885 if not arg1.__class__ is multi_val:
15886 arg1 = multi_val(arg1)
15890 res = isl.isl_schedule_node_band_mod(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
15891 obj = schedule_node(ctx=ctx, ptr=res)
15893 def n_member(arg0):
15895 if not arg0.__class__ is schedule_node:
15896 arg0 = schedule_node(arg0)
15900 res = isl.isl_schedule_node_band_n_member(arg0.ptr)
15904 def partial_schedule(arg0):
15906 if not arg0.__class__ is schedule_node:
15907 arg0 = schedule_node(arg0)
15911 res = isl.isl_schedule_node_band_get_partial_schedule(arg0.ptr)
15912 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
15914 def get_partial_schedule(arg0):
15915 return arg0.partial_schedule()
15916 def permutable(arg0):
15918 if not arg0.__class__ is schedule_node:
15919 arg0 = schedule_node(arg0)
15923 res = isl.isl_schedule_node_band_get_permutable(arg0.ptr)
15927 def get_permutable(arg0):
15928 return arg0.permutable()
15929 def scale(arg0, arg1):
15931 if not arg0.__class__ is schedule_node:
15932 arg0 = schedule_node(arg0)
15936 if not arg1.__class__ is multi_val:
15937 arg1 = multi_val(arg1)
15941 res = isl.isl_schedule_node_band_scale(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
15942 obj = schedule_node(ctx=ctx, ptr=res)
15944 def scale_down(arg0, arg1):
15946 if not arg0.__class__ is schedule_node:
15947 arg0 = schedule_node(arg0)
15951 if not arg1.__class__ is multi_val:
15952 arg1 = multi_val(arg1)
15956 res = isl.isl_schedule_node_band_scale_down(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
15957 obj = schedule_node(ctx=ctx, ptr=res)
15959 def set_ast_build_options(arg0, arg1):
15961 if not arg0.__class__ is schedule_node:
15962 arg0 = schedule_node(arg0)
15966 if not arg1.__class__ is union_set:
15967 arg1 = union_set(arg1)
15971 res = isl.isl_schedule_node_band_set_ast_build_options(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15972 obj = schedule_node(ctx=ctx, ptr=res)
15974 def set_permutable(arg0, arg1):
15976 if not arg0.__class__ is schedule_node:
15977 arg0 = schedule_node(arg0)
15981 res = isl.isl_schedule_node_band_set_permutable(isl.isl_schedule_node_copy(arg0.ptr), arg1)
15982 obj = schedule_node(ctx=ctx, ptr=res)
15984 def shift(arg0, arg1):
15986 if not arg0.__class__ is schedule_node:
15987 arg0 = schedule_node(arg0)
15991 if not arg1.__class__ is multi_union_pw_aff:
15992 arg1 = multi_union_pw_aff(arg1)
15996 res = isl.isl_schedule_node_band_shift(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
15997 obj = schedule_node(ctx=ctx, ptr=res)
15999 def split(arg0, arg1):
16001 if not arg0.__class__ is schedule_node:
16002 arg0 = schedule_node(arg0)
16006 res = isl.isl_schedule_node_band_split(isl.isl_schedule_node_copy(arg0.ptr), arg1)
16007 obj = schedule_node(ctx=ctx, ptr=res)
16009 def tile(arg0, arg1):
16011 if not arg0.__class__ is schedule_node:
16012 arg0 = schedule_node(arg0)
16016 if not arg1.__class__ is multi_val:
16017 arg1 = multi_val(arg1)
16021 res = isl.isl_schedule_node_band_tile(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
16022 obj = schedule_node(ctx=ctx, ptr=res)
16024 def member_set_ast_loop_default(arg0, arg1):
16026 if not arg0.__class__ is schedule_node:
16027 arg0 = schedule_node(arg0)
16031 res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 0)
16032 obj = schedule_node(ctx=ctx, ptr=res)
16034 def member_set_ast_loop_atomic(arg0, arg1):
16036 if not arg0.__class__ is schedule_node:
16037 arg0 = schedule_node(arg0)
16041 res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 1)
16042 obj = schedule_node(ctx=ctx, ptr=res)
16044 def member_set_ast_loop_unroll(arg0, arg1):
16046 if not arg0.__class__ is schedule_node:
16047 arg0 = schedule_node(arg0)
16051 res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 2)
16052 obj = schedule_node(ctx=ctx, ptr=res)
16054 def member_set_ast_loop_separate(arg0, arg1):
16056 if not arg0.__class__ is schedule_node:
16057 arg0 = schedule_node(arg0)
16061 res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 3)
16062 obj = schedule_node(ctx=ctx, ptr=res)
16065 isl.isl_schedule_node_band_get_ast_build_options.restype = c_void_p
16066 isl.isl_schedule_node_band_get_ast_build_options.argtypes = [c_void_p]
16067 isl.isl_schedule_node_band_get_ast_isolate_option.restype = c_void_p
16068 isl.isl_schedule_node_band_get_ast_isolate_option.argtypes = [c_void_p]
16069 isl.isl_schedule_node_band_member_get_coincident.argtypes = [c_void_p, c_int]
16070 isl.isl_schedule_node_band_member_set_coincident.restype = c_void_p
16071 isl.isl_schedule_node_band_member_set_coincident.argtypes = [c_void_p, c_int, c_int]
16072 isl.isl_schedule_node_band_mod.restype = c_void_p
16073 isl.isl_schedule_node_band_mod.argtypes = [c_void_p, c_void_p]
16074 isl.isl_schedule_node_band_n_member.argtypes = [c_void_p]
16075 isl.isl_schedule_node_band_get_partial_schedule.restype = c_void_p
16076 isl.isl_schedule_node_band_get_partial_schedule.argtypes = [c_void_p]
16077 isl.isl_schedule_node_band_get_permutable.argtypes = [c_void_p]
16078 isl.isl_schedule_node_band_scale.restype = c_void_p
16079 isl.isl_schedule_node_band_scale.argtypes = [c_void_p, c_void_p]
16080 isl.isl_schedule_node_band_scale_down.restype = c_void_p
16081 isl.isl_schedule_node_band_scale_down.argtypes = [c_void_p, c_void_p]
16082 isl.isl_schedule_node_band_set_ast_build_options.restype = c_void_p
16083 isl.isl_schedule_node_band_set_ast_build_options.argtypes = [c_void_p, c_void_p]
16084 isl.isl_schedule_node_band_set_permutable.restype = c_void_p
16085 isl.isl_schedule_node_band_set_permutable.argtypes = [c_void_p, c_int]
16086 isl.isl_schedule_node_band_shift.restype = c_void_p
16087 isl.isl_schedule_node_band_shift.argtypes = [c_void_p, c_void_p]
16088 isl.isl_schedule_node_band_split.restype = c_void_p
16089 isl.isl_schedule_node_band_split.argtypes = [c_void_p, c_int]
16090 isl.isl_schedule_node_band_tile.restype = c_void_p
16091 isl.isl_schedule_node_band_tile.argtypes = [c_void_p, c_void_p]
16092 isl.isl_schedule_node_band_member_set_ast_loop_type.restype = c_void_p
16093 isl.isl_schedule_node_band_member_set_ast_loop_type.argtypes = [c_void_p, c_int, c_int]
16094 isl.isl_schedule_node_copy.restype = c_void_p
16095 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16096 isl.isl_schedule_node_free.restype = c_void_p
16097 isl.isl_schedule_node_free.argtypes = [c_void_p]
16098 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16099 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16101 class schedule_node_context(schedule_node):
16102 def __init__(self, *args, **keywords):
16103 if "ptr" in keywords:
16104 self.ctx = keywords["ctx"]
16105 self.ptr = keywords["ptr"]
16109 if hasattr(self, 'ptr'):
16110 isl.isl_schedule_node_free(self.ptr)
16111 def __new__(cls, *args, **keywords):
16112 return super(schedule_node_context, cls).__new__(cls)
16115 if not arg0.__class__ is schedule_node_context:
16116 arg0 = schedule_node_context(arg0)
16119 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16120 res = cast(ptr, c_char_p).value.decode('ascii')
16123 def __repr__(self):
16126 return 'isl.schedule_node_context("""%s""")' % s
16128 return 'isl.schedule_node_context("%s")' % s
16131 if not arg0.__class__ is schedule_node:
16132 arg0 = schedule_node(arg0)
16136 res = isl.isl_schedule_node_context_get_context(arg0.ptr)
16137 obj = set(ctx=ctx, ptr=res)
16139 def get_context(arg0):
16140 return arg0.context()
16142 isl.isl_schedule_node_context_get_context.restype = c_void_p
16143 isl.isl_schedule_node_context_get_context.argtypes = [c_void_p]
16144 isl.isl_schedule_node_copy.restype = c_void_p
16145 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16146 isl.isl_schedule_node_free.restype = c_void_p
16147 isl.isl_schedule_node_free.argtypes = [c_void_p]
16148 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16149 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16151 class schedule_node_domain(schedule_node):
16152 def __init__(self, *args, **keywords):
16153 if "ptr" in keywords:
16154 self.ctx = keywords["ctx"]
16155 self.ptr = keywords["ptr"]
16159 if hasattr(self, 'ptr'):
16160 isl.isl_schedule_node_free(self.ptr)
16161 def __new__(cls, *args, **keywords):
16162 return super(schedule_node_domain, cls).__new__(cls)
16165 if not arg0.__class__ is schedule_node_domain:
16166 arg0 = schedule_node_domain(arg0)
16169 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16170 res = cast(ptr, c_char_p).value.decode('ascii')
16173 def __repr__(self):
16176 return 'isl.schedule_node_domain("""%s""")' % s
16178 return 'isl.schedule_node_domain("%s")' % s
16181 if not arg0.__class__ is schedule_node:
16182 arg0 = schedule_node(arg0)
16186 res = isl.isl_schedule_node_domain_get_domain(arg0.ptr)
16187 obj = union_set(ctx=ctx, ptr=res)
16189 def get_domain(arg0):
16190 return arg0.domain()
16192 isl.isl_schedule_node_domain_get_domain.restype = c_void_p
16193 isl.isl_schedule_node_domain_get_domain.argtypes = [c_void_p]
16194 isl.isl_schedule_node_copy.restype = c_void_p
16195 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16196 isl.isl_schedule_node_free.restype = c_void_p
16197 isl.isl_schedule_node_free.argtypes = [c_void_p]
16198 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16199 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16201 class schedule_node_expansion(schedule_node):
16202 def __init__(self, *args, **keywords):
16203 if "ptr" in keywords:
16204 self.ctx = keywords["ctx"]
16205 self.ptr = keywords["ptr"]
16209 if hasattr(self, 'ptr'):
16210 isl.isl_schedule_node_free(self.ptr)
16211 def __new__(cls, *args, **keywords):
16212 return super(schedule_node_expansion, cls).__new__(cls)
16215 if not arg0.__class__ is schedule_node_expansion:
16216 arg0 = schedule_node_expansion(arg0)
16219 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16220 res = cast(ptr, c_char_p).value.decode('ascii')
16223 def __repr__(self):
16226 return 'isl.schedule_node_expansion("""%s""")' % s
16228 return 'isl.schedule_node_expansion("%s")' % s
16229 def contraction(arg0):
16231 if not arg0.__class__ is schedule_node:
16232 arg0 = schedule_node(arg0)
16236 res = isl.isl_schedule_node_expansion_get_contraction(arg0.ptr)
16237 obj = union_pw_multi_aff(ctx=ctx, ptr=res)
16239 def get_contraction(arg0):
16240 return arg0.contraction()
16241 def expansion(arg0):
16243 if not arg0.__class__ is schedule_node:
16244 arg0 = schedule_node(arg0)
16248 res = isl.isl_schedule_node_expansion_get_expansion(arg0.ptr)
16249 obj = union_map(ctx=ctx, ptr=res)
16251 def get_expansion(arg0):
16252 return arg0.expansion()
16254 isl.isl_schedule_node_expansion_get_contraction.restype = c_void_p
16255 isl.isl_schedule_node_expansion_get_contraction.argtypes = [c_void_p]
16256 isl.isl_schedule_node_expansion_get_expansion.restype = c_void_p
16257 isl.isl_schedule_node_expansion_get_expansion.argtypes = [c_void_p]
16258 isl.isl_schedule_node_copy.restype = c_void_p
16259 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16260 isl.isl_schedule_node_free.restype = c_void_p
16261 isl.isl_schedule_node_free.argtypes = [c_void_p]
16262 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16263 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16265 class schedule_node_extension(schedule_node):
16266 def __init__(self, *args, **keywords):
16267 if "ptr" in keywords:
16268 self.ctx = keywords["ctx"]
16269 self.ptr = keywords["ptr"]
16273 if hasattr(self, 'ptr'):
16274 isl.isl_schedule_node_free(self.ptr)
16275 def __new__(cls, *args, **keywords):
16276 return super(schedule_node_extension, cls).__new__(cls)
16279 if not arg0.__class__ is schedule_node_extension:
16280 arg0 = schedule_node_extension(arg0)
16283 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16284 res = cast(ptr, c_char_p).value.decode('ascii')
16287 def __repr__(self):
16290 return 'isl.schedule_node_extension("""%s""")' % s
16292 return 'isl.schedule_node_extension("%s")' % s
16293 def extension(arg0):
16295 if not arg0.__class__ is schedule_node:
16296 arg0 = schedule_node(arg0)
16300 res = isl.isl_schedule_node_extension_get_extension(arg0.ptr)
16301 obj = union_map(ctx=ctx, ptr=res)
16303 def get_extension(arg0):
16304 return arg0.extension()
16306 isl.isl_schedule_node_extension_get_extension.restype = c_void_p
16307 isl.isl_schedule_node_extension_get_extension.argtypes = [c_void_p]
16308 isl.isl_schedule_node_copy.restype = c_void_p
16309 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16310 isl.isl_schedule_node_free.restype = c_void_p
16311 isl.isl_schedule_node_free.argtypes = [c_void_p]
16312 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16313 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16315 class schedule_node_filter(schedule_node):
16316 def __init__(self, *args, **keywords):
16317 if "ptr" in keywords:
16318 self.ctx = keywords["ctx"]
16319 self.ptr = keywords["ptr"]
16323 if hasattr(self, 'ptr'):
16324 isl.isl_schedule_node_free(self.ptr)
16325 def __new__(cls, *args, **keywords):
16326 return super(schedule_node_filter, cls).__new__(cls)
16329 if not arg0.__class__ is schedule_node_filter:
16330 arg0 = schedule_node_filter(arg0)
16333 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16334 res = cast(ptr, c_char_p).value.decode('ascii')
16337 def __repr__(self):
16340 return 'isl.schedule_node_filter("""%s""")' % s
16342 return 'isl.schedule_node_filter("%s")' % s
16345 if not arg0.__class__ is schedule_node:
16346 arg0 = schedule_node(arg0)
16350 res = isl.isl_schedule_node_filter_get_filter(arg0.ptr)
16351 obj = union_set(ctx=ctx, ptr=res)
16353 def get_filter(arg0):
16354 return arg0.filter()
16356 isl.isl_schedule_node_filter_get_filter.restype = c_void_p
16357 isl.isl_schedule_node_filter_get_filter.argtypes = [c_void_p]
16358 isl.isl_schedule_node_copy.restype = c_void_p
16359 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16360 isl.isl_schedule_node_free.restype = c_void_p
16361 isl.isl_schedule_node_free.argtypes = [c_void_p]
16362 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16363 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16365 class schedule_node_guard(schedule_node):
16366 def __init__(self, *args, **keywords):
16367 if "ptr" in keywords:
16368 self.ctx = keywords["ctx"]
16369 self.ptr = keywords["ptr"]
16373 if hasattr(self, 'ptr'):
16374 isl.isl_schedule_node_free(self.ptr)
16375 def __new__(cls, *args, **keywords):
16376 return super(schedule_node_guard, cls).__new__(cls)
16379 if not arg0.__class__ is schedule_node_guard:
16380 arg0 = schedule_node_guard(arg0)
16383 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16384 res = cast(ptr, c_char_p).value.decode('ascii')
16387 def __repr__(self):
16390 return 'isl.schedule_node_guard("""%s""")' % s
16392 return 'isl.schedule_node_guard("%s")' % s
16395 if not arg0.__class__ is schedule_node:
16396 arg0 = schedule_node(arg0)
16400 res = isl.isl_schedule_node_guard_get_guard(arg0.ptr)
16401 obj = set(ctx=ctx, ptr=res)
16403 def get_guard(arg0):
16404 return arg0.guard()
16406 isl.isl_schedule_node_guard_get_guard.restype = c_void_p
16407 isl.isl_schedule_node_guard_get_guard.argtypes = [c_void_p]
16408 isl.isl_schedule_node_copy.restype = c_void_p
16409 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16410 isl.isl_schedule_node_free.restype = c_void_p
16411 isl.isl_schedule_node_free.argtypes = [c_void_p]
16412 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16413 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16415 class schedule_node_leaf(schedule_node):
16416 def __init__(self, *args, **keywords):
16417 if "ptr" in keywords:
16418 self.ctx = keywords["ctx"]
16419 self.ptr = keywords["ptr"]
16423 if hasattr(self, 'ptr'):
16424 isl.isl_schedule_node_free(self.ptr)
16425 def __new__(cls, *args, **keywords):
16426 return super(schedule_node_leaf, cls).__new__(cls)
16429 if not arg0.__class__ is schedule_node_leaf:
16430 arg0 = schedule_node_leaf(arg0)
16433 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16434 res = cast(ptr, c_char_p).value.decode('ascii')
16437 def __repr__(self):
16440 return 'isl.schedule_node_leaf("""%s""")' % s
16442 return 'isl.schedule_node_leaf("%s")' % s
16444 isl.isl_schedule_node_copy.restype = c_void_p
16445 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16446 isl.isl_schedule_node_free.restype = c_void_p
16447 isl.isl_schedule_node_free.argtypes = [c_void_p]
16448 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16449 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16451 class schedule_node_mark(schedule_node):
16452 def __init__(self, *args, **keywords):
16453 if "ptr" in keywords:
16454 self.ctx = keywords["ctx"]
16455 self.ptr = keywords["ptr"]
16459 if hasattr(self, 'ptr'):
16460 isl.isl_schedule_node_free(self.ptr)
16461 def __new__(cls, *args, **keywords):
16462 return super(schedule_node_mark, cls).__new__(cls)
16465 if not arg0.__class__ is schedule_node_mark:
16466 arg0 = schedule_node_mark(arg0)
16469 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16470 res = cast(ptr, c_char_p).value.decode('ascii')
16473 def __repr__(self):
16476 return 'isl.schedule_node_mark("""%s""")' % s
16478 return 'isl.schedule_node_mark("%s")' % s
16480 isl.isl_schedule_node_copy.restype = c_void_p
16481 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16482 isl.isl_schedule_node_free.restype = c_void_p
16483 isl.isl_schedule_node_free.argtypes = [c_void_p]
16484 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16485 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16487 class schedule_node_sequence(schedule_node):
16488 def __init__(self, *args, **keywords):
16489 if "ptr" in keywords:
16490 self.ctx = keywords["ctx"]
16491 self.ptr = keywords["ptr"]
16495 if hasattr(self, 'ptr'):
16496 isl.isl_schedule_node_free(self.ptr)
16497 def __new__(cls, *args, **keywords):
16498 return super(schedule_node_sequence, cls).__new__(cls)
16501 if not arg0.__class__ is schedule_node_sequence:
16502 arg0 = schedule_node_sequence(arg0)
16505 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16506 res = cast(ptr, c_char_p).value.decode('ascii')
16509 def __repr__(self):
16512 return 'isl.schedule_node_sequence("""%s""")' % s
16514 return 'isl.schedule_node_sequence("%s")' % s
16516 isl.isl_schedule_node_copy.restype = c_void_p
16517 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16518 isl.isl_schedule_node_free.restype = c_void_p
16519 isl.isl_schedule_node_free.argtypes = [c_void_p]
16520 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16521 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16523 class schedule_node_set(schedule_node):
16524 def __init__(self, *args, **keywords):
16525 if "ptr" in keywords:
16526 self.ctx = keywords["ctx"]
16527 self.ptr = keywords["ptr"]
16531 if hasattr(self, 'ptr'):
16532 isl.isl_schedule_node_free(self.ptr)
16533 def __new__(cls, *args, **keywords):
16534 return super(schedule_node_set, cls).__new__(cls)
16537 if not arg0.__class__ is schedule_node_set:
16538 arg0 = schedule_node_set(arg0)
16541 ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16542 res = cast(ptr, c_char_p).value.decode('ascii')
16545 def __repr__(self):
16548 return 'isl.schedule_node_set("""%s""")' % s
16550 return 'isl.schedule_node_set("%s")' % s
16552 isl.isl_schedule_node_copy.restype = c_void_p
16553 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16554 isl.isl_schedule_node_free.restype = c_void_p
16555 isl.isl_schedule_node_free.argtypes = [c_void_p]
16556 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16557 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16559 class set_list(object):
16560 def __init__(self, *args, **keywords):
16561 if "ptr" in keywords:
16562 self.ctx = keywords["ctx"]
16563 self.ptr = keywords["ptr"]
16565 if len(args) == 1 and type(args[0]) == int:
16566 self.ctx = Context.getDefaultInstance()
16567 self.ptr = isl.isl_set_list_alloc(self.ctx, args[0])
16569 if len(args) == 1 and args[0].__class__ is set:
16570 self.ctx = Context.getDefaultInstance()
16571 self.ptr = isl.isl_set_list_from_set(isl.isl_set_copy(args[0].ptr))
16573 if len(args) == 1 and type(args[0]) == str:
16574 self.ctx = Context.getDefaultInstance()
16575 self.ptr = isl.isl_set_list_read_from_str(self.ctx, args[0].encode('ascii'))
16579 if hasattr(self, 'ptr'):
16580 isl.isl_set_list_free(self.ptr)
16583 if not arg0.__class__ is set_list:
16584 arg0 = set_list(arg0)
16587 ptr = isl.isl_set_list_to_str(arg0.ptr)
16588 res = cast(ptr, c_char_p).value.decode('ascii')
16591 def __repr__(self):
16594 return 'isl.set_list("""%s""")' % s
16596 return 'isl.set_list("%s")' % s
16597 def add(arg0, arg1):
16599 if not arg0.__class__ is set_list:
16600 arg0 = set_list(arg0)
16604 if not arg1.__class__ is set:
16609 res = isl.isl_set_list_add(isl.isl_set_list_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
16610 obj = set_list(ctx=ctx, ptr=res)
16612 def at(arg0, arg1):
16614 if not arg0.__class__ is set_list:
16615 arg0 = set_list(arg0)
16619 res = isl.isl_set_list_get_at(arg0.ptr, arg1)
16620 obj = set(ctx=ctx, ptr=res)
16622 def get_at(arg0, arg1):
16623 return arg0.at(arg1)
16626 if not arg0.__class__ is set_list:
16627 arg0 = set_list(arg0)
16631 res = isl.isl_set_list_clear(isl.isl_set_list_copy(arg0.ptr))
16632 obj = set_list(ctx=ctx, ptr=res)
16634 def concat(arg0, arg1):
16636 if not arg0.__class__ is set_list:
16637 arg0 = set_list(arg0)
16641 if not arg1.__class__ is set_list:
16642 arg1 = set_list(arg1)
16646 res = isl.isl_set_list_concat(isl.isl_set_list_copy(arg0.ptr), isl.isl_set_list_copy(arg1.ptr))
16647 obj = set_list(ctx=ctx, ptr=res)
16649 def drop(arg0, arg1, arg2):
16651 if not arg0.__class__ is set_list:
16652 arg0 = set_list(arg0)
16656 res = isl.isl_set_list_drop(isl.isl_set_list_copy(arg0.ptr), arg1, arg2)
16657 obj = set_list(ctx=ctx, ptr=res)
16659 def foreach(arg0, arg1):
16661 if not arg0.__class__ is set_list:
16662 arg0 = set_list(arg0)
16666 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
16667 def cb_func(cb_arg0, cb_arg1):
16668 cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
16671 except BaseException as e:
16677 res = isl.isl_set_list_foreach(arg0.ptr, cb1, None)
16678 if exc_info[0] is not None:
16682 def foreach_scc(arg0, arg1, arg2):
16684 if not arg0.__class__ is set_list:
16685 arg0 = set_list(arg0)
16689 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
16690 def cb_func(cb_arg0, cb_arg1, cb_arg2):
16691 cb_arg0 = set(ctx=arg0.ctx, ptr=isl.isl_set_copy(cb_arg0))
16692 cb_arg1 = set(ctx=arg0.ctx, ptr=isl.isl_set_copy(cb_arg1))
16694 res = arg1(cb_arg0, cb_arg1)
16695 except BaseException as e:
16698 return 1 if res else 0
16701 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
16702 def cb_func(cb_arg0, cb_arg1):
16703 cb_arg0 = set_list(ctx=arg0.ctx, ptr=(cb_arg0))
16706 except BaseException as e:
16712 res = isl.isl_set_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
16713 if exc_info[0] is not None:
16717 def insert(arg0, arg1, arg2):
16719 if not arg0.__class__ is set_list:
16720 arg0 = set_list(arg0)
16724 if not arg2.__class__ is set:
16729 res = isl.isl_set_list_insert(isl.isl_set_list_copy(arg0.ptr), arg1, isl.isl_set_copy(arg2.ptr))
16730 obj = set_list(ctx=ctx, ptr=res)
16732 def set_at(arg0, arg1, arg2):
16734 if not arg0.__class__ is set_list:
16735 arg0 = set_list(arg0)
16739 if not arg2.__class__ is set:
16744 res = isl.isl_set_list_set_at(isl.isl_set_list_copy(arg0.ptr), arg1, isl.isl_set_copy(arg2.ptr))
16745 obj = set_list(ctx=ctx, ptr=res)
16749 if not arg0.__class__ is set_list:
16750 arg0 = set_list(arg0)
16754 res = isl.isl_set_list_size(arg0.ptr)
16759 isl.isl_set_list_alloc.restype = c_void_p
16760 isl.isl_set_list_alloc.argtypes = [Context, c_int]
16761 isl.isl_set_list_from_set.restype = c_void_p
16762 isl.isl_set_list_from_set.argtypes = [c_void_p]
16763 isl.isl_set_list_read_from_str.restype = c_void_p
16764 isl.isl_set_list_read_from_str.argtypes = [Context, c_char_p]
16765 isl.isl_set_list_add.restype = c_void_p
16766 isl.isl_set_list_add.argtypes = [c_void_p, c_void_p]
16767 isl.isl_set_list_get_at.restype = c_void_p
16768 isl.isl_set_list_get_at.argtypes = [c_void_p, c_int]
16769 isl.isl_set_list_clear.restype = c_void_p
16770 isl.isl_set_list_clear.argtypes = [c_void_p]
16771 isl.isl_set_list_concat.restype = c_void_p
16772 isl.isl_set_list_concat.argtypes = [c_void_p, c_void_p]
16773 isl.isl_set_list_drop.restype = c_void_p
16774 isl.isl_set_list_drop.argtypes = [c_void_p, c_int, c_int]
16775 isl.isl_set_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
16776 isl.isl_set_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
16777 isl.isl_set_list_insert.restype = c_void_p
16778 isl.isl_set_list_insert.argtypes = [c_void_p, c_int, c_void_p]
16779 isl.isl_set_list_set_at.restype = c_void_p
16780 isl.isl_set_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
16781 isl.isl_set_list_size.argtypes = [c_void_p]
16782 isl.isl_set_list_copy.restype = c_void_p
16783 isl.isl_set_list_copy.argtypes = [c_void_p]
16784 isl.isl_set_list_free.restype = c_void_p
16785 isl.isl_set_list_free.argtypes = [c_void_p]
16786 isl.isl_set_list_to_str.restype = POINTER(c_char)
16787 isl.isl_set_list_to_str.argtypes = [c_void_p]
16789 class space(object):
16790 def __init__(self, *args, **keywords):
16791 if "ptr" in keywords:
16792 self.ctx = keywords["ctx"]
16793 self.ptr = keywords["ptr"]
16795 if len(args) == 1 and type(args[0]) == str:
16796 self.ctx = Context.getDefaultInstance()
16797 self.ptr = isl.isl_space_read_from_str(self.ctx, args[0].encode('ascii'))
16801 if hasattr(self, 'ptr'):
16802 isl.isl_space_free(self.ptr)
16805 if not arg0.__class__ is space:
16809 ptr = isl.isl_space_to_str(arg0.ptr)
16810 res = cast(ptr, c_char_p).value.decode('ascii')
16813 def __repr__(self):
16816 return 'isl.space("""%s""")' % s
16818 return 'isl.space("%s")' % s
16819 def add_named_tuple(*args):
16820 if len(args) == 3 and (args[1].__class__ is id or type(args[1]) == str) and type(args[2]) == int:
16823 if not args[0].__class__ is space:
16824 args[0] = space(args[0])
16828 if not args[1].__class__ is id:
16829 args[1] = id(args[1])
16833 res = isl.isl_space_add_named_tuple_id_ui(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr), args[2])
16834 obj = space(ctx=ctx, ptr=res)
16837 def add_param(*args):
16838 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
16841 if not args[0].__class__ is space:
16842 args[0] = space(args[0])
16846 if not args[1].__class__ is id:
16847 args[1] = id(args[1])
16851 res = isl.isl_space_add_param_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
16852 obj = space(ctx=ctx, ptr=res)
16855 def add_unnamed_tuple(*args):
16856 if len(args) == 2 and type(args[1]) == int:
16859 if not args[0].__class__ is space:
16860 args[0] = space(args[0])
16864 res = isl.isl_space_add_unnamed_tuple_ui(isl.isl_space_copy(args[0].ptr), args[1])
16865 obj = space(ctx=ctx, ptr=res)
16870 if not arg0.__class__ is space:
16875 res = isl.isl_space_curry(isl.isl_space_copy(arg0.ptr))
16876 obj = space(ctx=ctx, ptr=res)
16880 if not arg0.__class__ is space:
16885 res = isl.isl_space_domain(isl.isl_space_copy(arg0.ptr))
16886 obj = space(ctx=ctx, ptr=res)
16888 def domain_map_multi_aff(arg0):
16890 if not arg0.__class__ is space:
16895 res = isl.isl_space_domain_map_multi_aff(isl.isl_space_copy(arg0.ptr))
16896 obj = multi_aff(ctx=ctx, ptr=res)
16898 def domain_map_pw_multi_aff(arg0):
16900 if not arg0.__class__ is space:
16905 res = isl.isl_space_domain_map_pw_multi_aff(isl.isl_space_copy(arg0.ptr))
16906 obj = pw_multi_aff(ctx=ctx, ptr=res)
16908 def domain_reverse(arg0):
16910 if not arg0.__class__ is space:
16915 res = isl.isl_space_domain_reverse(isl.isl_space_copy(arg0.ptr))
16916 obj = space(ctx=ctx, ptr=res)
16918 def domain_tuple_id(arg0):
16920 if not arg0.__class__ is space:
16925 res = isl.isl_space_get_domain_tuple_id(arg0.ptr)
16926 obj = id(ctx=ctx, ptr=res)
16928 def get_domain_tuple_id(arg0):
16929 return arg0.domain_tuple_id()
16930 def drop_all_params(arg0):
16932 if not arg0.__class__ is space:
16937 res = isl.isl_space_drop_all_params(isl.isl_space_copy(arg0.ptr))
16938 obj = space(ctx=ctx, ptr=res)
16940 def flatten_domain(arg0):
16942 if not arg0.__class__ is space:
16947 res = isl.isl_space_flatten_domain(isl.isl_space_copy(arg0.ptr))
16948 obj = space(ctx=ctx, ptr=res)
16950 def flatten_range(arg0):
16952 if not arg0.__class__ is space:
16957 res = isl.isl_space_flatten_range(isl.isl_space_copy(arg0.ptr))
16958 obj = space(ctx=ctx, ptr=res)
16960 def has_domain_tuple_id(arg0):
16962 if not arg0.__class__ is space:
16967 res = isl.isl_space_has_domain_tuple_id(arg0.ptr)
16971 def has_range_tuple_id(arg0):
16973 if not arg0.__class__ is space:
16978 res = isl.isl_space_has_range_tuple_id(arg0.ptr)
16982 def identity_multi_aff_on_domain(arg0):
16984 if not arg0.__class__ is space:
16989 res = isl.isl_space_identity_multi_aff_on_domain(isl.isl_space_copy(arg0.ptr))
16990 obj = multi_aff(ctx=ctx, ptr=res)
16992 def identity_multi_pw_aff_on_domain(arg0):
16994 if not arg0.__class__ is space:
16999 res = isl.isl_space_identity_multi_pw_aff_on_domain(isl.isl_space_copy(arg0.ptr))
17000 obj = multi_pw_aff(ctx=ctx, ptr=res)
17002 def identity_pw_multi_aff_on_domain(arg0):
17004 if not arg0.__class__ is space:
17009 res = isl.isl_space_identity_pw_multi_aff_on_domain(isl.isl_space_copy(arg0.ptr))
17010 obj = pw_multi_aff(ctx=ctx, ptr=res)
17012 def is_equal(arg0, arg1):
17014 if not arg0.__class__ is space:
17019 if not arg1.__class__ is space:
17024 res = isl.isl_space_is_equal(arg0.ptr, arg1.ptr)
17028 def is_wrapping(arg0):
17030 if not arg0.__class__ is space:
17035 res = isl.isl_space_is_wrapping(arg0.ptr)
17039 def map_from_set(arg0):
17041 if not arg0.__class__ is space:
17046 res = isl.isl_space_map_from_set(isl.isl_space_copy(arg0.ptr))
17047 obj = space(ctx=ctx, ptr=res)
17049 def multi_aff(arg0, arg1):
17051 if not arg0.__class__ is space:
17056 if not arg1.__class__ is aff_list:
17057 arg1 = aff_list(arg1)
17061 res = isl.isl_space_multi_aff(isl.isl_space_copy(arg0.ptr), isl.isl_aff_list_copy(arg1.ptr))
17062 obj = multi_aff(ctx=ctx, ptr=res)
17064 def multi_aff_on_domain(*args):
17065 if len(args) == 2 and args[1].__class__ is multi_val:
17068 if not args[0].__class__ is space:
17069 args[0] = space(args[0])
17073 res = isl.isl_space_multi_aff_on_domain_multi_val(isl.isl_space_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
17074 obj = multi_aff(ctx=ctx, ptr=res)
17077 def multi_id(arg0, arg1):
17079 if not arg0.__class__ is space:
17084 if not arg1.__class__ is id_list:
17085 arg1 = id_list(arg1)
17089 res = isl.isl_space_multi_id(isl.isl_space_copy(arg0.ptr), isl.isl_id_list_copy(arg1.ptr))
17090 obj = multi_id(ctx=ctx, ptr=res)
17092 def multi_pw_aff(arg0, arg1):
17094 if not arg0.__class__ is space:
17099 if not arg1.__class__ is pw_aff_list:
17100 arg1 = pw_aff_list(arg1)
17104 res = isl.isl_space_multi_pw_aff(isl.isl_space_copy(arg0.ptr), isl.isl_pw_aff_list_copy(arg1.ptr))
17105 obj = multi_pw_aff(ctx=ctx, ptr=res)
17107 def multi_union_pw_aff(arg0, arg1):
17109 if not arg0.__class__ is space:
17114 if not arg1.__class__ is union_pw_aff_list:
17115 arg1 = union_pw_aff_list(arg1)
17119 res = isl.isl_space_multi_union_pw_aff(isl.isl_space_copy(arg0.ptr), isl.isl_union_pw_aff_list_copy(arg1.ptr))
17120 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
17122 def multi_val(arg0, arg1):
17124 if not arg0.__class__ is space:
17129 if not arg1.__class__ is val_list:
17130 arg1 = val_list(arg1)
17134 res = isl.isl_space_multi_val(isl.isl_space_copy(arg0.ptr), isl.isl_val_list_copy(arg1.ptr))
17135 obj = multi_val(ctx=ctx, ptr=res)
17137 def param_aff_on_domain(*args):
17138 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
17141 if not args[0].__class__ is space:
17142 args[0] = space(args[0])
17146 if not args[1].__class__ is id:
17147 args[1] = id(args[1])
17151 res = isl.isl_space_param_aff_on_domain_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
17152 obj = aff(ctx=ctx, ptr=res)
17157 if not arg0.__class__ is space:
17162 res = isl.isl_space_params(isl.isl_space_copy(arg0.ptr))
17163 obj = space(ctx=ctx, ptr=res)
17165 def product(arg0, arg1):
17167 if not arg0.__class__ is space:
17172 if not arg1.__class__ is space:
17177 res = isl.isl_space_product(isl.isl_space_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
17178 obj = space(ctx=ctx, ptr=res)
17182 if not arg0.__class__ is space:
17187 res = isl.isl_space_range(isl.isl_space_copy(arg0.ptr))
17188 obj = space(ctx=ctx, ptr=res)
17190 def range_map_multi_aff(arg0):
17192 if not arg0.__class__ is space:
17197 res = isl.isl_space_range_map_multi_aff(isl.isl_space_copy(arg0.ptr))
17198 obj = multi_aff(ctx=ctx, ptr=res)
17200 def range_map_pw_multi_aff(arg0):
17202 if not arg0.__class__ is space:
17207 res = isl.isl_space_range_map_pw_multi_aff(isl.isl_space_copy(arg0.ptr))
17208 obj = pw_multi_aff(ctx=ctx, ptr=res)
17210 def range_reverse(arg0):
17212 if not arg0.__class__ is space:
17217 res = isl.isl_space_range_reverse(isl.isl_space_copy(arg0.ptr))
17218 obj = space(ctx=ctx, ptr=res)
17220 def range_tuple_id(arg0):
17222 if not arg0.__class__ is space:
17227 res = isl.isl_space_get_range_tuple_id(arg0.ptr)
17228 obj = id(ctx=ctx, ptr=res)
17230 def get_range_tuple_id(arg0):
17231 return arg0.range_tuple_id()
17234 if not arg0.__class__ is space:
17239 res = isl.isl_space_reverse(isl.isl_space_copy(arg0.ptr))
17240 obj = space(ctx=ctx, ptr=res)
17242 def set_domain_tuple(*args):
17243 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
17246 if not args[0].__class__ is space:
17247 args[0] = space(args[0])
17251 if not args[1].__class__ is id:
17252 args[1] = id(args[1])
17256 res = isl.isl_space_set_domain_tuple_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
17257 obj = space(ctx=ctx, ptr=res)
17260 def set_range_tuple(*args):
17261 if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
17264 if not args[0].__class__ is space:
17265 args[0] = space(args[0])
17269 if not args[1].__class__ is id:
17270 args[1] = id(args[1])
17274 res = isl.isl_space_set_range_tuple_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
17275 obj = space(ctx=ctx, ptr=res)
17280 if not arg0.__class__ is space:
17285 res = isl.isl_space_uncurry(isl.isl_space_copy(arg0.ptr))
17286 obj = space(ctx=ctx, ptr=res)
17290 ctx = Context.getDefaultInstance()
17291 res = isl.isl_space_unit(ctx)
17292 obj = space(ctx=ctx, ptr=res)
17294 def universe_map(arg0):
17296 if not arg0.__class__ is space:
17301 res = isl.isl_space_universe_map(isl.isl_space_copy(arg0.ptr))
17302 obj = map(ctx=ctx, ptr=res)
17304 def universe_set(arg0):
17306 if not arg0.__class__ is space:
17311 res = isl.isl_space_universe_set(isl.isl_space_copy(arg0.ptr))
17312 obj = set(ctx=ctx, ptr=res)
17316 if not arg0.__class__ is space:
17321 res = isl.isl_space_unwrap(isl.isl_space_copy(arg0.ptr))
17322 obj = space(ctx=ctx, ptr=res)
17326 if not arg0.__class__ is space:
17331 res = isl.isl_space_wrap(isl.isl_space_copy(arg0.ptr))
17332 obj = space(ctx=ctx, ptr=res)
17334 def wrapped_reverse(arg0):
17336 if not arg0.__class__ is space:
17341 res = isl.isl_space_wrapped_reverse(isl.isl_space_copy(arg0.ptr))
17342 obj = space(ctx=ctx, ptr=res)
17344 def zero_aff_on_domain(arg0):
17346 if not arg0.__class__ is space:
17351 res = isl.isl_space_zero_aff_on_domain(isl.isl_space_copy(arg0.ptr))
17352 obj = aff(ctx=ctx, ptr=res)
17354 def zero_multi_aff(arg0):
17356 if not arg0.__class__ is space:
17361 res = isl.isl_space_zero_multi_aff(isl.isl_space_copy(arg0.ptr))
17362 obj = multi_aff(ctx=ctx, ptr=res)
17364 def zero_multi_pw_aff(arg0):
17366 if not arg0.__class__ is space:
17371 res = isl.isl_space_zero_multi_pw_aff(isl.isl_space_copy(arg0.ptr))
17372 obj = multi_pw_aff(ctx=ctx, ptr=res)
17374 def zero_multi_union_pw_aff(arg0):
17376 if not arg0.__class__ is space:
17381 res = isl.isl_space_zero_multi_union_pw_aff(isl.isl_space_copy(arg0.ptr))
17382 obj = multi_union_pw_aff(ctx=ctx, ptr=res)
17384 def zero_multi_val(arg0):
17386 if not arg0.__class__ is space:
17391 res = isl.isl_space_zero_multi_val(isl.isl_space_copy(arg0.ptr))
17392 obj = multi_val(ctx=ctx, ptr=res)
17395 isl.isl_space_read_from_str.restype = c_void_p
17396 isl.isl_space_read_from_str.argtypes = [Context, c_char_p]
17397 isl.isl_space_add_named_tuple_id_ui.restype = c_void_p
17398 isl.isl_space_add_named_tuple_id_ui.argtypes = [c_void_p, c_void_p, c_int]
17399 isl.isl_space_add_param_id.restype = c_void_p
17400 isl.isl_space_add_param_id.argtypes = [c_void_p, c_void_p]
17401 isl.isl_space_add_unnamed_tuple_ui.restype = c_void_p
17402 isl.isl_space_add_unnamed_tuple_ui.argtypes = [c_void_p, c_int]
17403 isl.isl_space_curry.restype = c_void_p
17404 isl.isl_space_curry.argtypes = [c_void_p]
17405 isl.isl_space_domain.restype = c_void_p
17406 isl.isl_space_domain.argtypes = [c_void_p]
17407 isl.isl_space_domain_map_multi_aff.restype = c_void_p
17408 isl.isl_space_domain_map_multi_aff.argtypes = [c_void_p]
17409 isl.isl_space_domain_map_pw_multi_aff.restype = c_void_p
17410 isl.isl_space_domain_map_pw_multi_aff.argtypes = [c_void_p]
17411 isl.isl_space_domain_reverse.restype = c_void_p
17412 isl.isl_space_domain_reverse.argtypes = [c_void_p]
17413 isl.isl_space_get_domain_tuple_id.restype = c_void_p
17414 isl.isl_space_get_domain_tuple_id.argtypes = [c_void_p]
17415 isl.isl_space_drop_all_params.restype = c_void_p
17416 isl.isl_space_drop_all_params.argtypes = [c_void_p]
17417 isl.isl_space_flatten_domain.restype = c_void_p
17418 isl.isl_space_flatten_domain.argtypes = [c_void_p]
17419 isl.isl_space_flatten_range.restype = c_void_p
17420 isl.isl_space_flatten_range.argtypes = [c_void_p]
17421 isl.isl_space_has_domain_tuple_id.argtypes = [c_void_p]
17422 isl.isl_space_has_range_tuple_id.argtypes = [c_void_p]
17423 isl.isl_space_identity_multi_aff_on_domain.restype = c_void_p
17424 isl.isl_space_identity_multi_aff_on_domain.argtypes = [c_void_p]
17425 isl.isl_space_identity_multi_pw_aff_on_domain.restype = c_void_p
17426 isl.isl_space_identity_multi_pw_aff_on_domain.argtypes = [c_void_p]
17427 isl.isl_space_identity_pw_multi_aff_on_domain.restype = c_void_p
17428 isl.isl_space_identity_pw_multi_aff_on_domain.argtypes = [c_void_p]
17429 isl.isl_space_is_equal.argtypes = [c_void_p, c_void_p]
17430 isl.isl_space_is_wrapping.argtypes = [c_void_p]
17431 isl.isl_space_map_from_set.restype = c_void_p
17432 isl.isl_space_map_from_set.argtypes = [c_void_p]
17433 isl.isl_space_multi_aff.restype = c_void_p
17434 isl.isl_space_multi_aff.argtypes = [c_void_p, c_void_p]
17435 isl.isl_space_multi_aff_on_domain_multi_val.restype = c_void_p
17436 isl.isl_space_multi_aff_on_domain_multi_val.argtypes = [c_void_p, c_void_p]
17437 isl.isl_space_multi_id.restype = c_void_p
17438 isl.isl_space_multi_id.argtypes = [c_void_p, c_void_p]
17439 isl.isl_space_multi_pw_aff.restype = c_void_p
17440 isl.isl_space_multi_pw_aff.argtypes = [c_void_p, c_void_p]
17441 isl.isl_space_multi_union_pw_aff.restype = c_void_p
17442 isl.isl_space_multi_union_pw_aff.argtypes = [c_void_p, c_void_p]
17443 isl.isl_space_multi_val.restype = c_void_p
17444 isl.isl_space_multi_val.argtypes = [c_void_p, c_void_p]
17445 isl.isl_space_param_aff_on_domain_id.restype = c_void_p
17446 isl.isl_space_param_aff_on_domain_id.argtypes = [c_void_p, c_void_p]
17447 isl.isl_space_params.restype = c_void_p
17448 isl.isl_space_params.argtypes = [c_void_p]
17449 isl.isl_space_product.restype = c_void_p
17450 isl.isl_space_product.argtypes = [c_void_p, c_void_p]
17451 isl.isl_space_range.restype = c_void_p
17452 isl.isl_space_range.argtypes = [c_void_p]
17453 isl.isl_space_range_map_multi_aff.restype = c_void_p
17454 isl.isl_space_range_map_multi_aff.argtypes = [c_void_p]
17455 isl.isl_space_range_map_pw_multi_aff.restype = c_void_p
17456 isl.isl_space_range_map_pw_multi_aff.argtypes = [c_void_p]
17457 isl.isl_space_range_reverse.restype = c_void_p
17458 isl.isl_space_range_reverse.argtypes = [c_void_p]
17459 isl.isl_space_get_range_tuple_id.restype = c_void_p
17460 isl.isl_space_get_range_tuple_id.argtypes = [c_void_p]
17461 isl.isl_space_reverse.restype = c_void_p
17462 isl.isl_space_reverse.argtypes = [c_void_p]
17463 isl.isl_space_set_domain_tuple_id.restype = c_void_p
17464 isl.isl_space_set_domain_tuple_id.argtypes = [c_void_p, c_void_p]
17465 isl.isl_space_set_range_tuple_id.restype = c_void_p
17466 isl.isl_space_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
17467 isl.isl_space_uncurry.restype = c_void_p
17468 isl.isl_space_uncurry.argtypes = [c_void_p]
17469 isl.isl_space_unit.restype = c_void_p
17470 isl.isl_space_unit.argtypes = [Context]
17471 isl.isl_space_universe_map.restype = c_void_p
17472 isl.isl_space_universe_map.argtypes = [c_void_p]
17473 isl.isl_space_universe_set.restype = c_void_p
17474 isl.isl_space_universe_set.argtypes = [c_void_p]
17475 isl.isl_space_unwrap.restype = c_void_p
17476 isl.isl_space_unwrap.argtypes = [c_void_p]
17477 isl.isl_space_wrap.restype = c_void_p
17478 isl.isl_space_wrap.argtypes = [c_void_p]
17479 isl.isl_space_wrapped_reverse.restype = c_void_p
17480 isl.isl_space_wrapped_reverse.argtypes = [c_void_p]
17481 isl.isl_space_zero_aff_on_domain.restype = c_void_p
17482 isl.isl_space_zero_aff_on_domain.argtypes = [c_void_p]
17483 isl.isl_space_zero_multi_aff.restype = c_void_p
17484 isl.isl_space_zero_multi_aff.argtypes = [c_void_p]
17485 isl.isl_space_zero_multi_pw_aff.restype = c_void_p
17486 isl.isl_space_zero_multi_pw_aff.argtypes = [c_void_p]
17487 isl.isl_space_zero_multi_union_pw_aff.restype = c_void_p
17488 isl.isl_space_zero_multi_union_pw_aff.argtypes = [c_void_p]
17489 isl.isl_space_zero_multi_val.restype = c_void_p
17490 isl.isl_space_zero_multi_val.argtypes = [c_void_p]
17491 isl.isl_space_copy.restype = c_void_p
17492 isl.isl_space_copy.argtypes = [c_void_p]
17493 isl.isl_space_free.restype = c_void_p
17494 isl.isl_space_free.argtypes = [c_void_p]
17495 isl.isl_space_to_str.restype = POINTER(c_char)
17496 isl.isl_space_to_str.argtypes = [c_void_p]
17498 class union_access_info(object):
17499 def __init__(self, *args, **keywords):
17500 if "ptr" in keywords:
17501 self.ctx = keywords["ctx"]
17502 self.ptr = keywords["ptr"]
17504 if len(args) == 1 and args[0].__class__ is union_map:
17505 self.ctx = Context.getDefaultInstance()
17506 self.ptr = isl.isl_union_access_info_from_sink(isl.isl_union_map_copy(args[0].ptr))
17510 if hasattr(self, 'ptr'):
17511 isl.isl_union_access_info_free(self.ptr)
17514 if not arg0.__class__ is union_access_info:
17515 arg0 = union_access_info(arg0)
17518 ptr = isl.isl_union_access_info_to_str(arg0.ptr)
17519 res = cast(ptr, c_char_p).value.decode('ascii')
17522 def __repr__(self):
17525 return 'isl.union_access_info("""%s""")' % s
17527 return 'isl.union_access_info("%s")' % s
17528 def compute_flow(arg0):
17530 if not arg0.__class__ is union_access_info:
17531 arg0 = union_access_info(arg0)
17535 res = isl.isl_union_access_info_compute_flow(isl.isl_union_access_info_copy(arg0.ptr))
17536 obj = union_flow(ctx=ctx, ptr=res)
17538 def set_kill(arg0, arg1):
17540 if not arg0.__class__ is union_access_info:
17541 arg0 = union_access_info(arg0)
17545 if not arg1.__class__ is union_map:
17546 arg1 = union_map(arg1)
17550 res = isl.isl_union_access_info_set_kill(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17551 obj = union_access_info(ctx=ctx, ptr=res)
17553 def set_may_source(arg0, arg1):
17555 if not arg0.__class__ is union_access_info:
17556 arg0 = union_access_info(arg0)
17560 if not arg1.__class__ is union_map:
17561 arg1 = union_map(arg1)
17565 res = isl.isl_union_access_info_set_may_source(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17566 obj = union_access_info(ctx=ctx, ptr=res)
17568 def set_must_source(arg0, arg1):
17570 if not arg0.__class__ is union_access_info:
17571 arg0 = union_access_info(arg0)
17575 if not arg1.__class__ is union_map:
17576 arg1 = union_map(arg1)
17580 res = isl.isl_union_access_info_set_must_source(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17581 obj = union_access_info(ctx=ctx, ptr=res)
17583 def set_schedule(arg0, arg1):
17585 if not arg0.__class__ is union_access_info:
17586 arg0 = union_access_info(arg0)
17590 if not arg1.__class__ is schedule:
17591 arg1 = schedule(arg1)
17595 res = isl.isl_union_access_info_set_schedule(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_schedule_copy(arg1.ptr))
17596 obj = union_access_info(ctx=ctx, ptr=res)
17598 def set_schedule_map(arg0, arg1):
17600 if not arg0.__class__ is union_access_info:
17601 arg0 = union_access_info(arg0)
17605 if not arg1.__class__ is union_map:
17606 arg1 = union_map(arg1)
17610 res = isl.isl_union_access_info_set_schedule_map(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17611 obj = union_access_info(ctx=ctx, ptr=res)
17614 isl.isl_union_access_info_from_sink.restype = c_void_p
17615 isl.isl_union_access_info_from_sink.argtypes = [c_void_p]
17616 isl.isl_union_access_info_compute_flow.restype = c_void_p
17617 isl.isl_union_access_info_compute_flow.argtypes = [c_void_p]
17618 isl.isl_union_access_info_set_kill.restype = c_void_p
17619 isl.isl_union_access_info_set_kill.argtypes = [c_void_p, c_void_p]
17620 isl.isl_union_access_info_set_may_source.restype = c_void_p
17621 isl.isl_union_access_info_set_may_source.argtypes = [c_void_p, c_void_p]
17622 isl.isl_union_access_info_set_must_source.restype = c_void_p
17623 isl.isl_union_access_info_set_must_source.argtypes = [c_void_p, c_void_p]
17624 isl.isl_union_access_info_set_schedule.restype = c_void_p
17625 isl.isl_union_access_info_set_schedule.argtypes = [c_void_p, c_void_p]
17626 isl.isl_union_access_info_set_schedule_map.restype = c_void_p
17627 isl.isl_union_access_info_set_schedule_map.argtypes = [c_void_p, c_void_p]
17628 isl.isl_union_access_info_copy.restype = c_void_p
17629 isl.isl_union_access_info_copy.argtypes = [c_void_p]
17630 isl.isl_union_access_info_free.restype = c_void_p
17631 isl.isl_union_access_info_free.argtypes = [c_void_p]
17632 isl.isl_union_access_info_to_str.restype = POINTER(c_char)
17633 isl.isl_union_access_info_to_str.argtypes = [c_void_p]
17635 class union_flow(object):
17636 def __init__(self, *args, **keywords):
17637 if "ptr" in keywords:
17638 self.ctx = keywords["ctx"]
17639 self.ptr = keywords["ptr"]
17643 if hasattr(self, 'ptr'):
17644 isl.isl_union_flow_free(self.ptr)
17647 if not arg0.__class__ is union_flow:
17648 arg0 = union_flow(arg0)
17651 ptr = isl.isl_union_flow_to_str(arg0.ptr)
17652 res = cast(ptr, c_char_p).value.decode('ascii')
17655 def __repr__(self):
17658 return 'isl.union_flow("""%s""")' % s
17660 return 'isl.union_flow("%s")' % s
17661 def full_may_dependence(arg0):
17663 if not arg0.__class__ is union_flow:
17664 arg0 = union_flow(arg0)
17668 res = isl.isl_union_flow_get_full_may_dependence(arg0.ptr)
17669 obj = union_map(ctx=ctx, ptr=res)
17671 def get_full_may_dependence(arg0):
17672 return arg0.full_may_dependence()
17673 def full_must_dependence(arg0):
17675 if not arg0.__class__ is union_flow:
17676 arg0 = union_flow(arg0)
17680 res = isl.isl_union_flow_get_full_must_dependence(arg0.ptr)
17681 obj = union_map(ctx=ctx, ptr=res)
17683 def get_full_must_dependence(arg0):
17684 return arg0.full_must_dependence()
17685 def may_dependence(arg0):
17687 if not arg0.__class__ is union_flow:
17688 arg0 = union_flow(arg0)
17692 res = isl.isl_union_flow_get_may_dependence(arg0.ptr)
17693 obj = union_map(ctx=ctx, ptr=res)
17695 def get_may_dependence(arg0):
17696 return arg0.may_dependence()
17697 def may_no_source(arg0):
17699 if not arg0.__class__ is union_flow:
17700 arg0 = union_flow(arg0)
17704 res = isl.isl_union_flow_get_may_no_source(arg0.ptr)
17705 obj = union_map(ctx=ctx, ptr=res)
17707 def get_may_no_source(arg0):
17708 return arg0.may_no_source()
17709 def must_dependence(arg0):
17711 if not arg0.__class__ is union_flow:
17712 arg0 = union_flow(arg0)
17716 res = isl.isl_union_flow_get_must_dependence(arg0.ptr)
17717 obj = union_map(ctx=ctx, ptr=res)
17719 def get_must_dependence(arg0):
17720 return arg0.must_dependence()
17721 def must_no_source(arg0):
17723 if not arg0.__class__ is union_flow:
17724 arg0 = union_flow(arg0)
17728 res = isl.isl_union_flow_get_must_no_source(arg0.ptr)
17729 obj = union_map(ctx=ctx, ptr=res)
17731 def get_must_no_source(arg0):
17732 return arg0.must_no_source()
17734 isl.isl_union_flow_get_full_may_dependence.restype = c_void_p
17735 isl.isl_union_flow_get_full_may_dependence.argtypes = [c_void_p]
17736 isl.isl_union_flow_get_full_must_dependence.restype = c_void_p
17737 isl.isl_union_flow_get_full_must_dependence.argtypes = [c_void_p]
17738 isl.isl_union_flow_get_may_dependence.restype = c_void_p
17739 isl.isl_union_flow_get_may_dependence.argtypes = [c_void_p]
17740 isl.isl_union_flow_get_may_no_source.restype = c_void_p
17741 isl.isl_union_flow_get_may_no_source.argtypes = [c_void_p]
17742 isl.isl_union_flow_get_must_dependence.restype = c_void_p
17743 isl.isl_union_flow_get_must_dependence.argtypes = [c_void_p]
17744 isl.isl_union_flow_get_must_no_source.restype = c_void_p
17745 isl.isl_union_flow_get_must_no_source.argtypes = [c_void_p]
17746 isl.isl_union_flow_copy.restype = c_void_p
17747 isl.isl_union_flow_copy.argtypes = [c_void_p]
17748 isl.isl_union_flow_free.restype = c_void_p
17749 isl.isl_union_flow_free.argtypes = [c_void_p]
17750 isl.isl_union_flow_to_str.restype = POINTER(c_char)
17751 isl.isl_union_flow_to_str.argtypes = [c_void_p]
17753 class union_pw_aff_list(object):
17754 def __init__(self, *args, **keywords):
17755 if "ptr" in keywords:
17756 self.ctx = keywords["ctx"]
17757 self.ptr = keywords["ptr"]
17759 if len(args) == 1 and type(args[0]) == int:
17760 self.ctx = Context.getDefaultInstance()
17761 self.ptr = isl.isl_union_pw_aff_list_alloc(self.ctx, args[0])
17763 if len(args) == 1 and args[0].__class__ is union_pw_aff:
17764 self.ctx = Context.getDefaultInstance()
17765 self.ptr = isl.isl_union_pw_aff_list_from_union_pw_aff(isl.isl_union_pw_aff_copy(args[0].ptr))
17767 if len(args) == 1 and type(args[0]) == str:
17768 self.ctx = Context.getDefaultInstance()
17769 self.ptr = isl.isl_union_pw_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
17773 if hasattr(self, 'ptr'):
17774 isl.isl_union_pw_aff_list_free(self.ptr)
17777 if not arg0.__class__ is union_pw_aff_list:
17778 arg0 = union_pw_aff_list(arg0)
17781 ptr = isl.isl_union_pw_aff_list_to_str(arg0.ptr)
17782 res = cast(ptr, c_char_p).value.decode('ascii')
17785 def __repr__(self):
17788 return 'isl.union_pw_aff_list("""%s""")' % s
17790 return 'isl.union_pw_aff_list("%s")' % s
17791 def add(arg0, arg1):
17793 if not arg0.__class__ is union_pw_aff_list:
17794 arg0 = union_pw_aff_list(arg0)
17798 if not arg1.__class__ is union_pw_aff:
17799 arg1 = union_pw_aff(arg1)
17803 res = isl.isl_union_pw_aff_list_add(isl.isl_union_pw_aff_list_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
17804 obj = union_pw_aff_list(ctx=ctx, ptr=res)
17806 def at(arg0, arg1):
17808 if not arg0.__class__ is union_pw_aff_list:
17809 arg0 = union_pw_aff_list(arg0)
17813 res = isl.isl_union_pw_aff_list_get_at(arg0.ptr, arg1)
17814 obj = union_pw_aff(ctx=ctx, ptr=res)
17816 def get_at(arg0, arg1):
17817 return arg0.at(arg1)
17820 if not arg0.__class__ is union_pw_aff_list:
17821 arg0 = union_pw_aff_list(arg0)
17825 res = isl.isl_union_pw_aff_list_clear(isl.isl_union_pw_aff_list_copy(arg0.ptr))
17826 obj = union_pw_aff_list(ctx=ctx, ptr=res)
17828 def concat(arg0, arg1):
17830 if not arg0.__class__ is union_pw_aff_list:
17831 arg0 = union_pw_aff_list(arg0)
17835 if not arg1.__class__ is union_pw_aff_list:
17836 arg1 = union_pw_aff_list(arg1)
17840 res = isl.isl_union_pw_aff_list_concat(isl.isl_union_pw_aff_list_copy(arg0.ptr), isl.isl_union_pw_aff_list_copy(arg1.ptr))
17841 obj = union_pw_aff_list(ctx=ctx, ptr=res)
17843 def drop(arg0, arg1, arg2):
17845 if not arg0.__class__ is union_pw_aff_list:
17846 arg0 = union_pw_aff_list(arg0)
17850 res = isl.isl_union_pw_aff_list_drop(isl.isl_union_pw_aff_list_copy(arg0.ptr), arg1, arg2)
17851 obj = union_pw_aff_list(ctx=ctx, ptr=res)
17853 def foreach(arg0, arg1):
17855 if not arg0.__class__ is union_pw_aff_list:
17856 arg0 = union_pw_aff_list(arg0)
17860 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
17861 def cb_func(cb_arg0, cb_arg1):
17862 cb_arg0 = union_pw_aff(ctx=arg0.ctx, ptr=(cb_arg0))
17865 except BaseException as e:
17871 res = isl.isl_union_pw_aff_list_foreach(arg0.ptr, cb1, None)
17872 if exc_info[0] is not None:
17876 def foreach_scc(arg0, arg1, arg2):
17878 if not arg0.__class__ is union_pw_aff_list:
17879 arg0 = union_pw_aff_list(arg0)
17883 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
17884 def cb_func(cb_arg0, cb_arg1, cb_arg2):
17885 cb_arg0 = union_pw_aff(ctx=arg0.ctx, ptr=isl.isl_union_pw_aff_copy(cb_arg0))
17886 cb_arg1 = union_pw_aff(ctx=arg0.ctx, ptr=isl.isl_union_pw_aff_copy(cb_arg1))
17888 res = arg1(cb_arg0, cb_arg1)
17889 except BaseException as e:
17892 return 1 if res else 0
17895 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
17896 def cb_func(cb_arg0, cb_arg1):
17897 cb_arg0 = union_pw_aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
17900 except BaseException as e:
17906 res = isl.isl_union_pw_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
17907 if exc_info[0] is not None:
17911 def insert(arg0, arg1, arg2):
17913 if not arg0.__class__ is union_pw_aff_list:
17914 arg0 = union_pw_aff_list(arg0)
17918 if not arg2.__class__ is union_pw_aff:
17919 arg2 = union_pw_aff(arg2)
17923 res = isl.isl_union_pw_aff_list_insert(isl.isl_union_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_union_pw_aff_copy(arg2.ptr))
17924 obj = union_pw_aff_list(ctx=ctx, ptr=res)
17926 def set_at(arg0, arg1, arg2):
17928 if not arg0.__class__ is union_pw_aff_list:
17929 arg0 = union_pw_aff_list(arg0)
17933 if not arg2.__class__ is union_pw_aff:
17934 arg2 = union_pw_aff(arg2)
17938 res = isl.isl_union_pw_aff_list_set_at(isl.isl_union_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_union_pw_aff_copy(arg2.ptr))
17939 obj = union_pw_aff_list(ctx=ctx, ptr=res)
17943 if not arg0.__class__ is union_pw_aff_list:
17944 arg0 = union_pw_aff_list(arg0)
17948 res = isl.isl_union_pw_aff_list_size(arg0.ptr)
17953 isl.isl_union_pw_aff_list_alloc.restype = c_void_p
17954 isl.isl_union_pw_aff_list_alloc.argtypes = [Context, c_int]
17955 isl.isl_union_pw_aff_list_from_union_pw_aff.restype = c_void_p
17956 isl.isl_union_pw_aff_list_from_union_pw_aff.argtypes = [c_void_p]
17957 isl.isl_union_pw_aff_list_read_from_str.restype = c_void_p
17958 isl.isl_union_pw_aff_list_read_from_str.argtypes = [Context, c_char_p]
17959 isl.isl_union_pw_aff_list_add.restype = c_void_p
17960 isl.isl_union_pw_aff_list_add.argtypes = [c_void_p, c_void_p]
17961 isl.isl_union_pw_aff_list_get_at.restype = c_void_p
17962 isl.isl_union_pw_aff_list_get_at.argtypes = [c_void_p, c_int]
17963 isl.isl_union_pw_aff_list_clear.restype = c_void_p
17964 isl.isl_union_pw_aff_list_clear.argtypes = [c_void_p]
17965 isl.isl_union_pw_aff_list_concat.restype = c_void_p
17966 isl.isl_union_pw_aff_list_concat.argtypes = [c_void_p, c_void_p]
17967 isl.isl_union_pw_aff_list_drop.restype = c_void_p
17968 isl.isl_union_pw_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
17969 isl.isl_union_pw_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
17970 isl.isl_union_pw_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
17971 isl.isl_union_pw_aff_list_insert.restype = c_void_p
17972 isl.isl_union_pw_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
17973 isl.isl_union_pw_aff_list_set_at.restype = c_void_p
17974 isl.isl_union_pw_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
17975 isl.isl_union_pw_aff_list_size.argtypes = [c_void_p]
17976 isl.isl_union_pw_aff_list_copy.restype = c_void_p
17977 isl.isl_union_pw_aff_list_copy.argtypes = [c_void_p]
17978 isl.isl_union_pw_aff_list_free.restype = c_void_p
17979 isl.isl_union_pw_aff_list_free.argtypes = [c_void_p]
17980 isl.isl_union_pw_aff_list_to_str.restype = POINTER(c_char)
17981 isl.isl_union_pw_aff_list_to_str.argtypes = [c_void_p]
17983 class union_set_list(object):
17984 def __init__(self, *args, **keywords):
17985 if "ptr" in keywords:
17986 self.ctx = keywords["ctx"]
17987 self.ptr = keywords["ptr"]
17989 if len(args) == 1 and type(args[0]) == int:
17990 self.ctx = Context.getDefaultInstance()
17991 self.ptr = isl.isl_union_set_list_alloc(self.ctx, args[0])
17993 if len(args) == 1 and args[0].__class__ is union_set:
17994 self.ctx = Context.getDefaultInstance()
17995 self.ptr = isl.isl_union_set_list_from_union_set(isl.isl_union_set_copy(args[0].ptr))
17997 if len(args) == 1 and type(args[0]) == str:
17998 self.ctx = Context.getDefaultInstance()
17999 self.ptr = isl.isl_union_set_list_read_from_str(self.ctx, args[0].encode('ascii'))
18003 if hasattr(self, 'ptr'):
18004 isl.isl_union_set_list_free(self.ptr)
18007 if not arg0.__class__ is union_set_list:
18008 arg0 = union_set_list(arg0)
18011 ptr = isl.isl_union_set_list_to_str(arg0.ptr)
18012 res = cast(ptr, c_char_p).value.decode('ascii')
18015 def __repr__(self):
18018 return 'isl.union_set_list("""%s""")' % s
18020 return 'isl.union_set_list("%s")' % s
18021 def add(arg0, arg1):
18023 if not arg0.__class__ is union_set_list:
18024 arg0 = union_set_list(arg0)
18028 if not arg1.__class__ is union_set:
18029 arg1 = union_set(arg1)
18033 res = isl.isl_union_set_list_add(isl.isl_union_set_list_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
18034 obj = union_set_list(ctx=ctx, ptr=res)
18036 def at(arg0, arg1):
18038 if not arg0.__class__ is union_set_list:
18039 arg0 = union_set_list(arg0)
18043 res = isl.isl_union_set_list_get_at(arg0.ptr, arg1)
18044 obj = union_set(ctx=ctx, ptr=res)
18046 def get_at(arg0, arg1):
18047 return arg0.at(arg1)
18050 if not arg0.__class__ is union_set_list:
18051 arg0 = union_set_list(arg0)
18055 res = isl.isl_union_set_list_clear(isl.isl_union_set_list_copy(arg0.ptr))
18056 obj = union_set_list(ctx=ctx, ptr=res)
18058 def concat(arg0, arg1):
18060 if not arg0.__class__ is union_set_list:
18061 arg0 = union_set_list(arg0)
18065 if not arg1.__class__ is union_set_list:
18066 arg1 = union_set_list(arg1)
18070 res = isl.isl_union_set_list_concat(isl.isl_union_set_list_copy(arg0.ptr), isl.isl_union_set_list_copy(arg1.ptr))
18071 obj = union_set_list(ctx=ctx, ptr=res)
18073 def drop(arg0, arg1, arg2):
18075 if not arg0.__class__ is union_set_list:
18076 arg0 = union_set_list(arg0)
18080 res = isl.isl_union_set_list_drop(isl.isl_union_set_list_copy(arg0.ptr), arg1, arg2)
18081 obj = union_set_list(ctx=ctx, ptr=res)
18083 def foreach(arg0, arg1):
18085 if not arg0.__class__ is union_set_list:
18086 arg0 = union_set_list(arg0)
18090 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
18091 def cb_func(cb_arg0, cb_arg1):
18092 cb_arg0 = union_set(ctx=arg0.ctx, ptr=(cb_arg0))
18095 except BaseException as e:
18101 res = isl.isl_union_set_list_foreach(arg0.ptr, cb1, None)
18102 if exc_info[0] is not None:
18106 def foreach_scc(arg0, arg1, arg2):
18108 if not arg0.__class__ is union_set_list:
18109 arg0 = union_set_list(arg0)
18113 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
18114 def cb_func(cb_arg0, cb_arg1, cb_arg2):
18115 cb_arg0 = union_set(ctx=arg0.ctx, ptr=isl.isl_union_set_copy(cb_arg0))
18116 cb_arg1 = union_set(ctx=arg0.ctx, ptr=isl.isl_union_set_copy(cb_arg1))
18118 res = arg1(cb_arg0, cb_arg1)
18119 except BaseException as e:
18122 return 1 if res else 0
18125 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
18126 def cb_func(cb_arg0, cb_arg1):
18127 cb_arg0 = union_set_list(ctx=arg0.ctx, ptr=(cb_arg0))
18130 except BaseException as e:
18136 res = isl.isl_union_set_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
18137 if exc_info[0] is not None:
18141 def insert(arg0, arg1, arg2):
18143 if not arg0.__class__ is union_set_list:
18144 arg0 = union_set_list(arg0)
18148 if not arg2.__class__ is union_set:
18149 arg2 = union_set(arg2)
18153 res = isl.isl_union_set_list_insert(isl.isl_union_set_list_copy(arg0.ptr), arg1, isl.isl_union_set_copy(arg2.ptr))
18154 obj = union_set_list(ctx=ctx, ptr=res)
18156 def set_at(arg0, arg1, arg2):
18158 if not arg0.__class__ is union_set_list:
18159 arg0 = union_set_list(arg0)
18163 if not arg2.__class__ is union_set:
18164 arg2 = union_set(arg2)
18168 res = isl.isl_union_set_list_set_at(isl.isl_union_set_list_copy(arg0.ptr), arg1, isl.isl_union_set_copy(arg2.ptr))
18169 obj = union_set_list(ctx=ctx, ptr=res)
18173 if not arg0.__class__ is union_set_list:
18174 arg0 = union_set_list(arg0)
18178 res = isl.isl_union_set_list_size(arg0.ptr)
18183 isl.isl_union_set_list_alloc.restype = c_void_p
18184 isl.isl_union_set_list_alloc.argtypes = [Context, c_int]
18185 isl.isl_union_set_list_from_union_set.restype = c_void_p
18186 isl.isl_union_set_list_from_union_set.argtypes = [c_void_p]
18187 isl.isl_union_set_list_read_from_str.restype = c_void_p
18188 isl.isl_union_set_list_read_from_str.argtypes = [Context, c_char_p]
18189 isl.isl_union_set_list_add.restype = c_void_p
18190 isl.isl_union_set_list_add.argtypes = [c_void_p, c_void_p]
18191 isl.isl_union_set_list_get_at.restype = c_void_p
18192 isl.isl_union_set_list_get_at.argtypes = [c_void_p, c_int]
18193 isl.isl_union_set_list_clear.restype = c_void_p
18194 isl.isl_union_set_list_clear.argtypes = [c_void_p]
18195 isl.isl_union_set_list_concat.restype = c_void_p
18196 isl.isl_union_set_list_concat.argtypes = [c_void_p, c_void_p]
18197 isl.isl_union_set_list_drop.restype = c_void_p
18198 isl.isl_union_set_list_drop.argtypes = [c_void_p, c_int, c_int]
18199 isl.isl_union_set_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
18200 isl.isl_union_set_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
18201 isl.isl_union_set_list_insert.restype = c_void_p
18202 isl.isl_union_set_list_insert.argtypes = [c_void_p, c_int, c_void_p]
18203 isl.isl_union_set_list_set_at.restype = c_void_p
18204 isl.isl_union_set_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
18205 isl.isl_union_set_list_size.argtypes = [c_void_p]
18206 isl.isl_union_set_list_copy.restype = c_void_p
18207 isl.isl_union_set_list_copy.argtypes = [c_void_p]
18208 isl.isl_union_set_list_free.restype = c_void_p
18209 isl.isl_union_set_list_free.argtypes = [c_void_p]
18210 isl.isl_union_set_list_to_str.restype = POINTER(c_char)
18211 isl.isl_union_set_list_to_str.argtypes = [c_void_p]
18214 def __init__(self, *args, **keywords):
18215 if "ptr" in keywords:
18216 self.ctx = keywords["ctx"]
18217 self.ptr = keywords["ptr"]
18219 if len(args) == 1 and type(args[0]) == int:
18220 self.ctx = Context.getDefaultInstance()
18221 self.ptr = isl.isl_val_int_from_si(self.ctx, args[0])
18223 if len(args) == 1 and type(args[0]) == str:
18224 self.ctx = Context.getDefaultInstance()
18225 self.ptr = isl.isl_val_read_from_str(self.ctx, args[0].encode('ascii'))
18229 if hasattr(self, 'ptr'):
18230 isl.isl_val_free(self.ptr)
18233 if not arg0.__class__ is val:
18237 ptr = isl.isl_val_to_str(arg0.ptr)
18238 res = cast(ptr, c_char_p).value.decode('ascii')
18241 def __repr__(self):
18244 return 'isl.val("""%s""")' % s
18246 return 'isl.val("%s")' % s
18249 if not arg0.__class__ is val:
18254 res = isl.isl_val_abs(isl.isl_val_copy(arg0.ptr))
18255 obj = val(ctx=ctx, ptr=res)
18257 def abs_eq(arg0, arg1):
18259 if not arg0.__class__ is val:
18264 if not arg1.__class__ is val:
18269 res = isl.isl_val_abs_eq(arg0.ptr, arg1.ptr)
18273 def add(arg0, arg1):
18275 if not arg0.__class__ is val:
18280 if not arg1.__class__ is val:
18285 res = isl.isl_val_add(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18286 obj = val(ctx=ctx, ptr=res)
18290 if not arg0.__class__ is val:
18295 res = isl.isl_val_ceil(isl.isl_val_copy(arg0.ptr))
18296 obj = val(ctx=ctx, ptr=res)
18298 def cmp_si(arg0, arg1):
18300 if not arg0.__class__ is val:
18305 res = isl.isl_val_cmp_si(arg0.ptr, arg1)
18309 if not arg0.__class__ is val:
18314 res = isl.isl_val_get_den_si(arg0.ptr)
18316 def get_den_si(arg0):
18317 return arg0.den_si()
18318 def div(arg0, arg1):
18320 if not arg0.__class__ is val:
18325 if not arg1.__class__ is val:
18330 res = isl.isl_val_div(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18331 obj = val(ctx=ctx, ptr=res)
18333 def eq(arg0, arg1):
18335 if not arg0.__class__ is val:
18340 if not arg1.__class__ is val:
18345 res = isl.isl_val_eq(arg0.ptr, arg1.ptr)
18351 if not arg0.__class__ is val:
18356 res = isl.isl_val_floor(isl.isl_val_copy(arg0.ptr))
18357 obj = val(ctx=ctx, ptr=res)
18359 def gcd(arg0, arg1):
18361 if not arg0.__class__ is val:
18366 if not arg1.__class__ is val:
18371 res = isl.isl_val_gcd(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18372 obj = val(ctx=ctx, ptr=res)
18374 def ge(arg0, arg1):
18376 if not arg0.__class__ is val:
18381 if not arg1.__class__ is val:
18386 res = isl.isl_val_ge(arg0.ptr, arg1.ptr)
18390 def gt(arg0, arg1):
18392 if not arg0.__class__ is val:
18397 if not arg1.__class__ is val:
18402 res = isl.isl_val_gt(arg0.ptr, arg1.ptr)
18408 ctx = Context.getDefaultInstance()
18409 res = isl.isl_val_infty(ctx)
18410 obj = val(ctx=ctx, ptr=res)
18414 if not arg0.__class__ is val:
18419 res = isl.isl_val_inv(isl.isl_val_copy(arg0.ptr))
18420 obj = val(ctx=ctx, ptr=res)
18422 def is_divisible_by(arg0, arg1):
18424 if not arg0.__class__ is val:
18429 if not arg1.__class__ is val:
18434 res = isl.isl_val_is_divisible_by(arg0.ptr, arg1.ptr)
18438 def is_infty(arg0):
18440 if not arg0.__class__ is val:
18445 res = isl.isl_val_is_infty(arg0.ptr)
18451 if not arg0.__class__ is val:
18456 res = isl.isl_val_is_int(arg0.ptr)
18462 if not arg0.__class__ is val:
18467 res = isl.isl_val_is_nan(arg0.ptr)
18473 if not arg0.__class__ is val:
18478 res = isl.isl_val_is_neg(arg0.ptr)
18482 def is_neginfty(arg0):
18484 if not arg0.__class__ is val:
18489 res = isl.isl_val_is_neginfty(arg0.ptr)
18493 def is_negone(arg0):
18495 if not arg0.__class__ is val:
18500 res = isl.isl_val_is_negone(arg0.ptr)
18504 def is_nonneg(arg0):
18506 if not arg0.__class__ is val:
18511 res = isl.isl_val_is_nonneg(arg0.ptr)
18515 def is_nonpos(arg0):
18517 if not arg0.__class__ is val:
18522 res = isl.isl_val_is_nonpos(arg0.ptr)
18528 if not arg0.__class__ is val:
18533 res = isl.isl_val_is_one(arg0.ptr)
18539 if not arg0.__class__ is val:
18544 res = isl.isl_val_is_pos(arg0.ptr)
18550 if not arg0.__class__ is val:
18555 res = isl.isl_val_is_rat(arg0.ptr)
18561 if not arg0.__class__ is val:
18566 res = isl.isl_val_is_zero(arg0.ptr)
18570 def le(arg0, arg1):
18572 if not arg0.__class__ is val:
18577 if not arg1.__class__ is val:
18582 res = isl.isl_val_le(arg0.ptr, arg1.ptr)
18586 def lt(arg0, arg1):
18588 if not arg0.__class__ is val:
18593 if not arg1.__class__ is val:
18598 res = isl.isl_val_lt(arg0.ptr, arg1.ptr)
18602 def max(arg0, arg1):
18604 if not arg0.__class__ is val:
18609 if not arg1.__class__ is val:
18614 res = isl.isl_val_max(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18615 obj = val(ctx=ctx, ptr=res)
18617 def min(arg0, arg1):
18619 if not arg0.__class__ is val:
18624 if not arg1.__class__ is val:
18629 res = isl.isl_val_min(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18630 obj = val(ctx=ctx, ptr=res)
18632 def mod(arg0, arg1):
18634 if not arg0.__class__ is val:
18639 if not arg1.__class__ is val:
18644 res = isl.isl_val_mod(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18645 obj = val(ctx=ctx, ptr=res)
18647 def mul(arg0, arg1):
18649 if not arg0.__class__ is val:
18654 if not arg1.__class__ is val:
18659 res = isl.isl_val_mul(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18660 obj = val(ctx=ctx, ptr=res)
18664 ctx = Context.getDefaultInstance()
18665 res = isl.isl_val_nan(ctx)
18666 obj = val(ctx=ctx, ptr=res)
18668 def ne(arg0, arg1):
18670 if not arg0.__class__ is val:
18675 if not arg1.__class__ is val:
18680 res = isl.isl_val_ne(arg0.ptr, arg1.ptr)
18686 if not arg0.__class__ is val:
18691 res = isl.isl_val_neg(isl.isl_val_copy(arg0.ptr))
18692 obj = val(ctx=ctx, ptr=res)
18696 ctx = Context.getDefaultInstance()
18697 res = isl.isl_val_neginfty(ctx)
18698 obj = val(ctx=ctx, ptr=res)
18702 ctx = Context.getDefaultInstance()
18703 res = isl.isl_val_negone(ctx)
18704 obj = val(ctx=ctx, ptr=res)
18708 if not arg0.__class__ is val:
18713 res = isl.isl_val_get_num_si(arg0.ptr)
18715 def get_num_si(arg0):
18716 return arg0.num_si()
18719 ctx = Context.getDefaultInstance()
18720 res = isl.isl_val_one(ctx)
18721 obj = val(ctx=ctx, ptr=res)
18725 if not arg0.__class__ is val:
18730 res = isl.isl_val_pow2(isl.isl_val_copy(arg0.ptr))
18731 obj = val(ctx=ctx, ptr=res)
18735 if not arg0.__class__ is val:
18740 res = isl.isl_val_sgn(arg0.ptr)
18742 def sub(arg0, arg1):
18744 if not arg0.__class__ is val:
18749 if not arg1.__class__ is val:
18754 res = isl.isl_val_sub(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18755 obj = val(ctx=ctx, ptr=res)
18759 if not arg0.__class__ is val:
18764 res = isl.isl_val_to_list(isl.isl_val_copy(arg0.ptr))
18765 obj = val_list(ctx=ctx, ptr=res)
18769 if not arg0.__class__ is val:
18774 res = isl.isl_val_trunc(isl.isl_val_copy(arg0.ptr))
18775 obj = val(ctx=ctx, ptr=res)
18779 ctx = Context.getDefaultInstance()
18780 res = isl.isl_val_zero(ctx)
18781 obj = val(ctx=ctx, ptr=res)
18784 isl.isl_val_int_from_si.restype = c_void_p
18785 isl.isl_val_int_from_si.argtypes = [Context, c_long]
18786 isl.isl_val_read_from_str.restype = c_void_p
18787 isl.isl_val_read_from_str.argtypes = [Context, c_char_p]
18788 isl.isl_val_abs.restype = c_void_p
18789 isl.isl_val_abs.argtypes = [c_void_p]
18790 isl.isl_val_abs_eq.argtypes = [c_void_p, c_void_p]
18791 isl.isl_val_add.restype = c_void_p
18792 isl.isl_val_add.argtypes = [c_void_p, c_void_p]
18793 isl.isl_val_ceil.restype = c_void_p
18794 isl.isl_val_ceil.argtypes = [c_void_p]
18795 isl.isl_val_cmp_si.argtypes = [c_void_p, c_long]
18796 isl.isl_val_get_den_si.argtypes = [c_void_p]
18797 isl.isl_val_div.restype = c_void_p
18798 isl.isl_val_div.argtypes = [c_void_p, c_void_p]
18799 isl.isl_val_eq.argtypes = [c_void_p, c_void_p]
18800 isl.isl_val_floor.restype = c_void_p
18801 isl.isl_val_floor.argtypes = [c_void_p]
18802 isl.isl_val_gcd.restype = c_void_p
18803 isl.isl_val_gcd.argtypes = [c_void_p, c_void_p]
18804 isl.isl_val_ge.argtypes = [c_void_p, c_void_p]
18805 isl.isl_val_gt.argtypes = [c_void_p, c_void_p]
18806 isl.isl_val_infty.restype = c_void_p
18807 isl.isl_val_infty.argtypes = [Context]
18808 isl.isl_val_inv.restype = c_void_p
18809 isl.isl_val_inv.argtypes = [c_void_p]
18810 isl.isl_val_is_divisible_by.argtypes = [c_void_p, c_void_p]
18811 isl.isl_val_is_infty.argtypes = [c_void_p]
18812 isl.isl_val_is_int.argtypes = [c_void_p]
18813 isl.isl_val_is_nan.argtypes = [c_void_p]
18814 isl.isl_val_is_neg.argtypes = [c_void_p]
18815 isl.isl_val_is_neginfty.argtypes = [c_void_p]
18816 isl.isl_val_is_negone.argtypes = [c_void_p]
18817 isl.isl_val_is_nonneg.argtypes = [c_void_p]
18818 isl.isl_val_is_nonpos.argtypes = [c_void_p]
18819 isl.isl_val_is_one.argtypes = [c_void_p]
18820 isl.isl_val_is_pos.argtypes = [c_void_p]
18821 isl.isl_val_is_rat.argtypes = [c_void_p]
18822 isl.isl_val_is_zero.argtypes = [c_void_p]
18823 isl.isl_val_le.argtypes = [c_void_p, c_void_p]
18824 isl.isl_val_lt.argtypes = [c_void_p, c_void_p]
18825 isl.isl_val_max.restype = c_void_p
18826 isl.isl_val_max.argtypes = [c_void_p, c_void_p]
18827 isl.isl_val_min.restype = c_void_p
18828 isl.isl_val_min.argtypes = [c_void_p, c_void_p]
18829 isl.isl_val_mod.restype = c_void_p
18830 isl.isl_val_mod.argtypes = [c_void_p, c_void_p]
18831 isl.isl_val_mul.restype = c_void_p
18832 isl.isl_val_mul.argtypes = [c_void_p, c_void_p]
18833 isl.isl_val_nan.restype = c_void_p
18834 isl.isl_val_nan.argtypes = [Context]
18835 isl.isl_val_ne.argtypes = [c_void_p, c_void_p]
18836 isl.isl_val_neg.restype = c_void_p
18837 isl.isl_val_neg.argtypes = [c_void_p]
18838 isl.isl_val_neginfty.restype = c_void_p
18839 isl.isl_val_neginfty.argtypes = [Context]
18840 isl.isl_val_negone.restype = c_void_p
18841 isl.isl_val_negone.argtypes = [Context]
18842 isl.isl_val_get_num_si.argtypes = [c_void_p]
18843 isl.isl_val_one.restype = c_void_p
18844 isl.isl_val_one.argtypes = [Context]
18845 isl.isl_val_pow2.restype = c_void_p
18846 isl.isl_val_pow2.argtypes = [c_void_p]
18847 isl.isl_val_sgn.argtypes = [c_void_p]
18848 isl.isl_val_sub.restype = c_void_p
18849 isl.isl_val_sub.argtypes = [c_void_p, c_void_p]
18850 isl.isl_val_to_list.restype = c_void_p
18851 isl.isl_val_to_list.argtypes = [c_void_p]
18852 isl.isl_val_trunc.restype = c_void_p
18853 isl.isl_val_trunc.argtypes = [c_void_p]
18854 isl.isl_val_zero.restype = c_void_p
18855 isl.isl_val_zero.argtypes = [Context]
18856 isl.isl_val_copy.restype = c_void_p
18857 isl.isl_val_copy.argtypes = [c_void_p]
18858 isl.isl_val_free.restype = c_void_p
18859 isl.isl_val_free.argtypes = [c_void_p]
18860 isl.isl_val_to_str.restype = POINTER(c_char)
18861 isl.isl_val_to_str.argtypes = [c_void_p]
18863 class val_list(object):
18864 def __init__(self, *args, **keywords):
18865 if "ptr" in keywords:
18866 self.ctx = keywords["ctx"]
18867 self.ptr = keywords["ptr"]
18869 if len(args) == 1 and type(args[0]) == int:
18870 self.ctx = Context.getDefaultInstance()
18871 self.ptr = isl.isl_val_list_alloc(self.ctx, args[0])
18873 if len(args) == 1 and (args[0].__class__ is val or type(args[0]) == int):
18876 if not args[0].__class__ is val:
18877 args[0] = val(args[0])
18880 self.ctx = Context.getDefaultInstance()
18881 self.ptr = isl.isl_val_list_from_val(isl.isl_val_copy(args[0].ptr))
18883 if len(args) == 1 and type(args[0]) == str:
18884 self.ctx = Context.getDefaultInstance()
18885 self.ptr = isl.isl_val_list_read_from_str(self.ctx, args[0].encode('ascii'))
18889 if hasattr(self, 'ptr'):
18890 isl.isl_val_list_free(self.ptr)
18893 if not arg0.__class__ is val_list:
18894 arg0 = val_list(arg0)
18897 ptr = isl.isl_val_list_to_str(arg0.ptr)
18898 res = cast(ptr, c_char_p).value.decode('ascii')
18901 def __repr__(self):
18904 return 'isl.val_list("""%s""")' % s
18906 return 'isl.val_list("%s")' % s
18907 def add(arg0, arg1):
18909 if not arg0.__class__ is val_list:
18910 arg0 = val_list(arg0)
18914 if not arg1.__class__ is val:
18919 res = isl.isl_val_list_add(isl.isl_val_list_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18920 obj = val_list(ctx=ctx, ptr=res)
18922 def at(arg0, arg1):
18924 if not arg0.__class__ is val_list:
18925 arg0 = val_list(arg0)
18929 res = isl.isl_val_list_get_at(arg0.ptr, arg1)
18930 obj = val(ctx=ctx, ptr=res)
18932 def get_at(arg0, arg1):
18933 return arg0.at(arg1)
18936 if not arg0.__class__ is val_list:
18937 arg0 = val_list(arg0)
18941 res = isl.isl_val_list_clear(isl.isl_val_list_copy(arg0.ptr))
18942 obj = val_list(ctx=ctx, ptr=res)
18944 def concat(arg0, arg1):
18946 if not arg0.__class__ is val_list:
18947 arg0 = val_list(arg0)
18951 if not arg1.__class__ is val_list:
18952 arg1 = val_list(arg1)
18956 res = isl.isl_val_list_concat(isl.isl_val_list_copy(arg0.ptr), isl.isl_val_list_copy(arg1.ptr))
18957 obj = val_list(ctx=ctx, ptr=res)
18959 def drop(arg0, arg1, arg2):
18961 if not arg0.__class__ is val_list:
18962 arg0 = val_list(arg0)
18966 res = isl.isl_val_list_drop(isl.isl_val_list_copy(arg0.ptr), arg1, arg2)
18967 obj = val_list(ctx=ctx, ptr=res)
18969 def foreach(arg0, arg1):
18971 if not arg0.__class__ is val_list:
18972 arg0 = val_list(arg0)
18976 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
18977 def cb_func(cb_arg0, cb_arg1):
18978 cb_arg0 = val(ctx=arg0.ctx, ptr=(cb_arg0))
18981 except BaseException as e:
18987 res = isl.isl_val_list_foreach(arg0.ptr, cb1, None)
18988 if exc_info[0] is not None:
18992 def foreach_scc(arg0, arg1, arg2):
18994 if not arg0.__class__ is val_list:
18995 arg0 = val_list(arg0)
18999 fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
19000 def cb_func(cb_arg0, cb_arg1, cb_arg2):
19001 cb_arg0 = val(ctx=arg0.ctx, ptr=isl.isl_val_copy(cb_arg0))
19002 cb_arg1 = val(ctx=arg0.ctx, ptr=isl.isl_val_copy(cb_arg1))
19004 res = arg1(cb_arg0, cb_arg1)
19005 except BaseException as e:
19008 return 1 if res else 0
19011 fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
19012 def cb_func(cb_arg0, cb_arg1):
19013 cb_arg0 = val_list(ctx=arg0.ctx, ptr=(cb_arg0))
19016 except BaseException as e:
19022 res = isl.isl_val_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
19023 if exc_info[0] is not None:
19027 def insert(arg0, arg1, arg2):
19029 if not arg0.__class__ is val_list:
19030 arg0 = val_list(arg0)
19034 if not arg2.__class__ is val:
19039 res = isl.isl_val_list_insert(isl.isl_val_list_copy(arg0.ptr), arg1, isl.isl_val_copy(arg2.ptr))
19040 obj = val_list(ctx=ctx, ptr=res)
19042 def set_at(arg0, arg1, arg2):
19044 if not arg0.__class__ is val_list:
19045 arg0 = val_list(arg0)
19049 if not arg2.__class__ is val:
19054 res = isl.isl_val_list_set_at(isl.isl_val_list_copy(arg0.ptr), arg1, isl.isl_val_copy(arg2.ptr))
19055 obj = val_list(ctx=ctx, ptr=res)
19059 if not arg0.__class__ is val_list:
19060 arg0 = val_list(arg0)
19064 res = isl.isl_val_list_size(arg0.ptr)
19069 isl.isl_val_list_alloc.restype = c_void_p
19070 isl.isl_val_list_alloc.argtypes = [Context, c_int]
19071 isl.isl_val_list_from_val.restype = c_void_p
19072 isl.isl_val_list_from_val.argtypes = [c_void_p]
19073 isl.isl_val_list_read_from_str.restype = c_void_p
19074 isl.isl_val_list_read_from_str.argtypes = [Context, c_char_p]
19075 isl.isl_val_list_add.restype = c_void_p
19076 isl.isl_val_list_add.argtypes = [c_void_p, c_void_p]
19077 isl.isl_val_list_get_at.restype = c_void_p
19078 isl.isl_val_list_get_at.argtypes = [c_void_p, c_int]
19079 isl.isl_val_list_clear.restype = c_void_p
19080 isl.isl_val_list_clear.argtypes = [c_void_p]
19081 isl.isl_val_list_concat.restype = c_void_p
19082 isl.isl_val_list_concat.argtypes = [c_void_p, c_void_p]
19083 isl.isl_val_list_drop.restype = c_void_p
19084 isl.isl_val_list_drop.argtypes = [c_void_p, c_int, c_int]
19085 isl.isl_val_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
19086 isl.isl_val_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
19087 isl.isl_val_list_insert.restype = c_void_p
19088 isl.isl_val_list_insert.argtypes = [c_void_p, c_int, c_void_p]
19089 isl.isl_val_list_set_at.restype = c_void_p
19090 isl.isl_val_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
19091 isl.isl_val_list_size.argtypes = [c_void_p]
19092 isl.isl_val_list_copy.restype = c_void_p
19093 isl.isl_val_list_copy.argtypes = [c_void_p]
19094 isl.isl_val_list_free.restype = c_void_p
19095 isl.isl_val_list_free.argtypes = [c_void_p]
19096 isl.isl_val_list_to_str.restype = POINTER(c_char)
19097 isl.isl_val_list_to_str.argtypes = [c_void_p]