From 0ccec37b8c836c1409b4b282cf3bc6febefe3021 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 Mar 2011 18:15:15 +0100 Subject: Check errors properly --- src/diffraction-gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/diffraction-gpu.c') diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index 176e2e7b..9b96f112 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -205,14 +205,14 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, if ( set_arg_mem(gctx, 18, gctx->flags) ) return; /* Unit cell */ - clSetKernelArg(gctx->kern, 8, sizeof(cl_float16), &cell); + err = clSetKernelArg(gctx->kern, 8, sizeof(cl_float16), &cell); if ( err != CL_SUCCESS ) { ERROR("Couldn't set unit cell: %s\n", clError(err)); return; } /* Local memory for reduction */ - clSetKernelArg(gctx->kern, 13, + err = clSetKernelArg(gctx->kern, 13, BWSAMPLING*SAMPLING*SAMPLING*sizeof(cl_float), NULL); if ( err != CL_SUCCESS ) { ERROR("Couldn't set local memory: %s\n", clError(err)); -- cgit v1.2.3