From e3c575ddf10bc27aa3620cb4bff630d420180ad9 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 29 Oct 2011 20:29:11 -0400
Subject: [PATCH] Some test shuffling.

---
 MEMO               |  4 ++--
 test/test_loopy.py | 19 +++----------------
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/MEMO b/MEMO
index 4bbf91776..751f9769d 100644
--- a/MEMO
+++ b/MEMO
@@ -42,6 +42,8 @@ Things to consider
 To-do
 ^^^^^
 
+- variable shuffle detection
+
 - Deal with equality constraints.
   (These arise, e.g., when partitioning a loop of length 16 into 16s.)
 
@@ -74,8 +76,6 @@ Future ideas
 
 - Try, fix indirect addressing
 
-- variable shuffle detection
-
 - Use gists (why do disjoint sets arise?)
 
 - Nested slab decomposition (in conjunction with conditional hoisting) could
diff --git a/test/test_loopy.py b/test/test_loopy.py
index 24446b0b9..f5eef7318 100644
--- a/test/test_loopy.py
+++ b/test/test_loopy.py
@@ -1,9 +1,6 @@
 from __future__ import division
 
 import numpy as np
-import pyopencl as cl
-import pyopencl.array as cl_array
-import pyopencl.clrandom as cl_random
 import loopy as lp
 
 from pyopencl.tools import pytest_generate_tests_for_pyopencl \
@@ -15,18 +12,14 @@ from pyopencl.tools import pytest_generate_tests_for_pyopencl \
 def test_owed_barriers(ctx_factory):
     dtype = np.float32
     ctx = ctx_factory()
-    order = "C"
-    queue = cl.CommandQueue(ctx,
-            properties=cl.command_queue_properties.PROFILING_ENABLE)
 
     knl = lp.make_kernel(ctx.devices[0],
             "{[i]: 0<=i<100}",
             [
                 "[i:l.0] <float32> z[i] = a[i]"
                 ],
-            [
-                lp.ArrayArg("a", dtype, shape=(100,)),
-                ])
+            [lp.ArrayArg("a", np.float32, shape=(100,))]
+            )
 
     kernel_gen = lp.generate_loop_schedules(knl)
     kernel_gen = lp.check_kernels(kernel_gen)
@@ -39,20 +32,14 @@ def test_owed_barriers(ctx_factory):
 
 
 def test_wg_too_small(ctx_factory):
-    dtype = np.float32
     ctx = ctx_factory()
-    order = "C"
-    queue = cl.CommandQueue(ctx,
-            properties=cl.command_queue_properties.PROFILING_ENABLE)
 
     knl = lp.make_kernel(ctx.devices[0],
             "{[i]: 0<=i<100}",
             [
                 "[i:l.0] <float32> z[i] = a[i]"
                 ],
-            [
-                lp.ArrayArg("a", dtype, shape=(100,)),
-                ],
+            [lp.ArrayArg("a", np.float32, shape=(100,))],
             local_sizes={0: 16})
 
     kernel_gen = lp.generate_loop_schedules(knl)
-- 
GitLab