diff options
author | Thomas White <taw@physics.org> | 2010-02-19 14:39:57 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-02-19 14:39:57 +0100 |
commit | fc02994d90af08bc4d0656dfb3b12566177a6ff1 (patch) | |
tree | f2ecb0d354e14be7e7c5e5858c2f5274d4687071 /src | |
parent | bea7274dc2523829d4091ed79c7db6cba4d63bfb (diff) |
Check error code when enqueueing kernel
Diffstat (limited to 'src')
-rw-r--r-- | src/diffraction-gpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index 2c7b6884..5ea7a646 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -49,6 +49,7 @@ static const char *clError(cl_int err) case CL_OUT_OF_HOST_MEMORY : return "out of host memory"; case CL_OUT_OF_RESOURCES : return "out of resources"; case CL_INVALID_KERNEL_NAME : return "invalid kernel name"; + case CL_INVALID_KERNEL_ARGS : return "invalid kernel arguments"; default : ERROR("Error code: %i\n", err); return "unknown error"; @@ -315,7 +316,7 @@ void get_diffraction_gpu(struct image *image, int na, int nb, int nc, err = clEnqueueNDRangeKernel(cq, kern, 2, NULL, dims, NULL, 0, NULL, &event_d); if ( err != CL_SUCCESS ) { - ERROR("Couldn't enqueue diffraction kernel\n"); + ERROR("Couldn't enqueue diffraction kernel: %s\n", clError(err)); return; } |