From 9b8de2d687e93c42b6e35626ea17e2de4b0a2788 Mon Sep 17 00:00:00 2001 From: Tim Warburton <timwar@caam.rice.edu> Date: Tue, 25 Oct 2011 21:41:23 -0500 Subject: [PATCH] Only test that reduction depends on *one* of its inames, not all of them. --- loopy/symbolic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/symbolic.py b/loopy/symbolic.py index 25667eaa1..bb4fd83fb 100644 --- a/loopy/symbolic.py +++ b/loopy/symbolic.py @@ -512,7 +512,7 @@ class IndexVariableFinder(CombineMapper): def map_reduction(self, expr): result = self.rec(expr.expr) - if not set(expr.inames) <= result: + if not (set(expr.inames) & result): raise RuntimeError("reduction '%s' does not depend on " "reduction inames" % expr) if self.include_reduction_inames: -- GitLab