Skip to content
Snippets Groups Projects
Commit dfb03bb6 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Be a bit laxer about PwAffs and Affs.

parent f868f6f4
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,9 @@ def make_index_map(set, index_expr):
def pw_aff_to_aff(pw_aff):
if isinstance(pw_aff, isl.Aff):
return pw_aff
assert isinstance(pw_aff, isl.PwAff)
pieces = pw_aff.get_pieces()
......@@ -103,9 +106,9 @@ def make_slab(space, iname, start, stop):
zero = isl.Aff.zero_on_domain(space)
from islpy import align_spaces
if isinstance(start, isl.PwAff):
if isinstance(start, (isl.Aff, isl.PwAff)):
start = align_spaces(pw_aff_to_aff(start), zero)
if isinstance(stop, isl.PwAff):
if isinstance(stop, (isl.Aff, isl.PwAff)):
stop = align_spaces(pw_aff_to_aff(stop), zero)
if isinstance(start, int): start = zero + start
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment