From 9e2640d26d303ae549d3615cb5fce5a42759c131 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 17 Jan 2012 02:27:43 -0500 Subject: [PATCH] Fix prefill criterion. --- loopy/compiled.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loopy/compiled.py b/loopy/compiled.py index 3f553357c..c449d1850 100644 --- a/loopy/compiled.py +++ b/loopy/compiled.py @@ -176,7 +176,7 @@ def make_ref_args(kernel, queue, parameters, raise RuntimeError("write-mode images not supported in " "automatic testing") - if isinstance(arg.dtype, np.number): + if arg.dtype.isbuiltin: ary.fill(fill_value) else: from warnings import warn @@ -232,7 +232,7 @@ def make_args(queue, kernel, ref_input_arrays, parameters, shape = evaluate(arg.shape, parameters) ary = cl_array.empty(queue, shape, arg.dtype, order=arg.order) - if isinstance(arg.dtype, np.number): + if arg.dtype.isbuiltin: ary.fill(fill_value) else: from warnings import warn -- GitLab