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

Tweak loop bound generation

parent 7ea3ad93
No related branches found
No related tags found
No related merge requests found
......@@ -204,10 +204,11 @@ def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context)
% (what, pw_aff))
return result
# put constant bounds first
# Put constant bounds last, they're usually too restrictive.
pieces = (
[(set, aff) for set, aff in pieces if aff.is_cst()]
+ [(set, aff) for set, aff in pieces if not aff.is_cst()])
[(set, aff) for set, aff in pieces if not aff.is_cst()]
+ [(set, aff) for set, aff in pieces if aff.is_cst()]
)
reference = pw_aff.get_aggregate_domain()
if context is not None:
......
......@@ -1620,7 +1620,8 @@ def test_slab_decomposition_does_not_double_execute(ctx_factory):
knl = lp.make_kernel(ctx.devices[0],
"{ [i]: 0<=i<n }",
"a[i] = 2*a[i]")
"a[i] = 2*a[i]",
assumptions="n>=1")
ref_knl = knl
......
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