From 63017f26d73f7b05b716c320c4147ca6f1c0a145 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 18 Feb 2025 13:41:33 -0600 Subject: [PATCH] VectorizabilityChecker: allow comparisons --- loopy/expression.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/loopy/expression.py b/loopy/expression.py index 9d48a8f0..5873e8ea 100644 --- a/loopy/expression.py +++ b/loopy/expression.py @@ -176,11 +176,8 @@ class VectorizabilityChecker(Mapper[bool, []]): return False - def map_comparison(self, expr): - # FIXME: These actually can be vectorized: - # https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/relationalFunctions.html - - raise UnvectorizableError() + def map_comparison(self, expr: p.Comparison) -> bool: + return any(self.rec(child) for child in [expr.left, expr.right]) def map_logical_not(self, expr: object) -> bool: raise UnvectorizableError() -- GitLab