From 07baa642d688b5d70df61615c7c3585733995f85 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 15 Nov 2010 16:37:40 +0100 Subject: Fix previous commit --- src/diffraction-gpu.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index 6e73a52c..c210cab9 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -120,7 +120,6 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, int x, y; cl_float16 cell; float *diff_ptr; - cl_float4 orientation; cl_int4 ncells; const int sampling = SAMPLING; cl_float bwstep; @@ -180,48 +179,43 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, ERROR("Couldn't set arg 9: %s\n", clError(err)); return; } - clSetKernelArg(gctx->kern, 10, sizeof(cl_float4), &orientation); + clSetKernelArg(gctx->kern, 12, sizeof(cl_int), &sampling); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 10: %s\n", clError(err)); - return; - } - clSetKernelArg(gctx->kern, 13, sizeof(cl_int), &sampling); - if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 13: %s\n", clError(err)); + ERROR("Couldn't set arg 12: %s\n", clError(err)); return; } /* Local memory for reduction */ - clSetKernelArg(gctx->kern, 14, + clSetKernelArg(gctx->kern, 13, BWSAMPLING*SAMPLING*SAMPLING*sizeof(cl_float), NULL); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 14: %s\n", clError(err)); + ERROR("Couldn't set arg 13: %s\n", clError(err)); return; } /* Bandwidth sampling step */ - clSetKernelArg(gctx->kern, 15, sizeof(cl_float), &bwstep); + clSetKernelArg(gctx->kern, 14, sizeof(cl_float), &bwstep); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 15: %s\n", clError(err)); + ERROR("Couldn't set arg 14: %s\n", clError(err)); return; } /* LUT in 'a' direction */ - clSetKernelArg(gctx->kern, 16, sizeof(cl_mem), &gctx->sinc_luts[na-1]); + clSetKernelArg(gctx->kern, 15, sizeof(cl_mem), &gctx->sinc_luts[na-1]); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 16: %s\n", clError(err)); + ERROR("Couldn't set arg 15: %s\n", clError(err)); return; } /* LUT in 'b' direction */ - clSetKernelArg(gctx->kern, 17, sizeof(cl_mem), &gctx->sinc_luts[nb-1]); + clSetKernelArg(gctx->kern, 16, sizeof(cl_mem), &gctx->sinc_luts[nb-1]); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 17: %s\n", clError(err)); + ERROR("Couldn't set arg 16: %s\n", clError(err)); return; } /* LUT in 'c' direction */ - clSetKernelArg(gctx->kern, 18, sizeof(cl_mem), &gctx->sinc_luts[nc-1]); + clSetKernelArg(gctx->kern, 17, sizeof(cl_mem), &gctx->sinc_luts[nc-1]); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 18: %s\n", clError(err)); + ERROR("Couldn't set arg 17: %s\n", clError(err)); return; } @@ -264,16 +258,16 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, ERROR("Couldn't set arg 7: %s\n", clError(err)); return; } - clSetKernelArg(gctx->kern, 11, sizeof(cl_int), + clSetKernelArg(gctx->kern, 10, sizeof(cl_int), &image->det->panels[p].min_x); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 11: %s\n", clError(err)); + ERROR("Couldn't set arg 10: %s\n", clError(err)); return; } - clSetKernelArg(gctx->kern, 12, sizeof(cl_int), + clSetKernelArg(gctx->kern, 11, sizeof(cl_int), &image->det->panels[p].min_y); if ( err != CL_SUCCESS ) { - ERROR("Couldn't set arg 12: %s\n", clError(err)); + ERROR("Couldn't set arg 11: %s\n", clError(err)); return; } -- cgit v1.2.3