aboutsummaryrefslogtreecommitdiff
path: root/src/diffraction-gpu.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-11-15 16:37:40 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:05 +0100
commit07baa642d688b5d70df61615c7c3585733995f85 (patch)
treedb34e5dc728dcca2a9a474bf23c7853c5ff3a776 /src/diffraction-gpu.c
parent1b4fa114decd9c36324feed00296cb40088a9062 (diff)
Fix previous commit
Diffstat (limited to 'src/diffraction-gpu.c')
-rw-r--r--src/diffraction-gpu.c38
1 files changed, 16 insertions, 22 deletions
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;
}