From 4d35f63caf53c28ca73969c8bcacef06580003f4 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 14 Mar 2011 19:18:39 -0400 Subject: [PATCH] Fix support for vector types. --- pyopencl/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 76470a61..41b355e9 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE. import numpy as np from decorator import decorator import pyopencl as cl -import pyopencl.array as cl_array @@ -138,6 +137,7 @@ def dtype_to_ctype(dtype): elif dtype == np.complex128: return "complex double" else: + import pyopencl.array as cl_array try: return cl_array.vec._dtype_to_c_name[dtype] except KeyError: @@ -236,6 +236,7 @@ def parse_c_arg(c_arg): elif tp in ["unsigned char"]: dtype = np.uint8 elif tp in ["bool"]: dtype = np.bool else: + import pyopencl.array as cl_array try: return cl_array.vec._c_name_to_dtype[tp] except KeyError: -- GitLab