From 26a50987c56ed8e0d78613798aaf03801b891b6f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 16 Jan 2012 02:31:03 -0500 Subject: [PATCH] Test float4 functionality. --- test/test_linalg.py | 164 +++++++++++++++++++------------------------- 1 file changed, 72 insertions(+), 92 deletions(-) diff --git a/test/test_linalg.py b/test/test_linalg.py index ef0e627bd..96cbb869c 100644 --- a/test/test_linalg.py +++ b/test/test_linalg.py @@ -87,71 +87,60 @@ def get_suitable_size(ctx): +def check_float4(result, ref_result): + for comp in ["x", "y", "z", "w"]: + return np.allclose(ref_result[comp], result[comp], rtol=1e-3, atol=1e-3) + def test_axpy(ctx_factory): - dtype = np.float32 ctx = ctx_factory() - order = "C" - queue = cl.CommandQueue(ctx, - properties=cl.command_queue_properties.PROFILING_ENABLE) n = 20*1024**2 - knl = lp.make_kernel(ctx.devices[0], - "[n] -> {[i]: 0<=i {[i]: 0<=i