aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-04 18:15:15 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:17 +0100
commit0ccec37b8c836c1409b4b282cf3bc6febefe3021 (patch)
treea29c4a45b8a0736401672e4b964de3b2343f9318
parent9357d8f186760fda060fe3324d88480c877c21f3 (diff)
Check errors properly
-rw-r--r--src/diffraction-gpu.c4
1 files changed, 2 insertions, 2 deletions
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));