From 315282c3d1ba153026443bc14375308b0f684f5c Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Wed, 24 Jan 2018 19:07:22 -0600
Subject: [PATCH] Relax stride checks in handle_alloc()

---
 loopy/target/c/c_execution.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/loopy/target/c/c_execution.py b/loopy/target/c/c_execution.py
index c136a9f36..4fd248c87 100644
--- a/loopy/target/c/c_execution.py
+++ b/loopy/target/c/c_execution.py
@@ -107,7 +107,8 @@ class CExecutionWrapperGenerator(ExecutionWrapperGeneratorBase):
 
         #check strides
         if not skip_arg_checks:
-            gen("assert %(strides)s == %(name)s.strides, "
+            gen("assert _lpy_filter_stride(%(name)s.shape, %(strides)s) "
+                    "== _lpy_filter_stride(%(name)s.shape, %(name)s.strides), "
                     "'Strides of loopy created array %(name)s, "
                     "do not match expected.'" %
                     dict(name=arg.name,
-- 
GitLab