From 3defbe2703172995ef613712899ff4b6deea2cb2 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 20 Apr 2017 19:08:52 -0500 Subject: [PATCH] Throw error on empty domains in min/max --- loopy/kernel/tools.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loopy/kernel/tools.py b/loopy/kernel/tools.py index 203342523..51dd472d6 100644 --- a/loopy/kernel/tools.py +++ b/loopy/kernel/tools.py @@ -316,10 +316,16 @@ class SetOperationCacheManager: return result def dim_min(self, set, *args): + if set.plain_is_empty(): + raise LoopyError("domain '%s' is empty" % set) + from loopy.isl_helpers import dim_min_with_elimination return self.op(set, "dim_min", dim_min_with_elimination, args) def dim_max(self, set, *args): + if set.plain_is_empty(): + raise LoopyError("domain '%s' is empty" % set) + from loopy.isl_helpers import dim_max_with_elimination return self.op(set, "dim_max", dim_max_with_elimination, args) -- GitLab