From c9ac8ad30d2e9b1ba286175d08330674e8a5c2e5 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 11 Jul 2015 14:46:01 -0500
Subject: [PATCH] Disable overly conservative reshape contiguity test

---
 pyopencl/array.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/pyopencl/array.py b/pyopencl/array.py
index 9fa3c84f..070f2bb3 100644
--- a/pyopencl/array.py
+++ b/pyopencl/array.py
@@ -1290,9 +1290,13 @@ class Array(object):
             raise ValueError("order must be either 'C' or 'F'")
 
         # TODO: add more error-checking, perhaps
-        if not self.flags.forc:
-            raise RuntimeError("only contiguous arrays may "
-                    "be used as arguments to this operation")
+
+        # FIXME: The following is overly conservative. As long as we don't change
+        # our memory footprint, we're good.
+
+        # if not self.flags.forc:
+        #     raise RuntimeError("only contiguous arrays may "
+        #             "be used as arguments to this operation")
 
         if isinstance(shape[0], tuple) or isinstance(shape[0], list):
             shape = tuple(shape[0])
-- 
GitLab