From 3a86e3957e4e970e468c3edc2dbd359a95e185fb Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 11 Nov 2011 10:28:44 -0500 Subject: [PATCH] Attempt simple hull if outcome of get_footprint is not convex. --- loopy/cse.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loopy/cse.py b/loopy/cse.py index 1db1ac2d5..f2086b2c2 100644 --- a/loopy/cse.py +++ b/loopy/cse.py @@ -361,6 +361,12 @@ def precompute(kernel, subst_name, dtype, sweep_inames=[], sweep_inames, invocation_descriptors) new_domain = new_domain.coalesce() + + if len(new_domain.get_basic_sets()) > 1: + hull_new_domain = new_domain.simple_hull() + if hull_new_domain <= new_domain: + new_domain = hull_new_domain + if isinstance(new_domain, isl.Set): dom_bsets = new_domain.get_basic_sets() if len(dom_bsets) > 1: -- GitLab