From b16f4dc8527714b17920c03560118068cd475a8d Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sun, 12 Feb 2012 20:51:59 -0500
Subject: [PATCH] Parse "N" as a shape/stride spec in kernel input.

---
 loopy/kernel.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/loopy/kernel.py b/loopy/kernel.py
index 8702883db..4ca9b5540 100644
--- a/loopy/kernel.py
+++ b/loopy/kernel.py
@@ -128,13 +128,17 @@ class ArrayArg:
                 from pymbolic import parse
                 strides = parse(strides)
 
-            strides = tuple(strides)
+            if not isinstance(shape, tuple):
+                shape = (shape,)
 
         if shape is not None:
             if isinstance(shape, str):
                 from pymbolic import parse
                 shape = parse(shape)
 
+            if not isinstance(shape, tuple):
+                shape = (shape,)
+
             from pyopencl.compyte.array import (
                     f_contiguous_strides,
                     c_contiguous_strides)
-- 
GitLab