diff options
author | Thomas White <taw@physics.org> | 2011-03-02 19:10:06 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:16 +0100 |
commit | a4e80d2ae288579b6f0d6967fee90aa57c0c25c3 (patch) | |
tree | e2d0c5608aa10fa04283325d6d9214f55dd3762c /src | |
parent | ed81cc8d9811aeb93c286266a464fea25554a083 (diff) |
Tidy up, fix definition of get_q() in CL kernel
Diffstat (limited to 'src')
-rw-r--r-- | src/diffraction-gpu.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index 2f4fee77..54c01d5f 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -180,7 +180,6 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, int n_neg = 0; int n_nan = 0; - if ( gctx == NULL ) { ERROR("GPU setup failed.\n"); return; @@ -208,7 +207,11 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, if ( setmem(gctx, 0, gctx->diff) ) return; if ( setmem(gctx, 1, gctx->tt) ) return; + if ( sfloat(gctx, 2, klow) ) return; + if ( setint(gctx, 3, image->width) ) return; if ( setmem(gctx, 9, gctx->intensities) ) return; + if ( setint(gctx, 12, sampling) ) return; + if ( sfloat(gctx, 14, bwstep) ) return; if ( setmem(gctx, 15, gctx->sinc_luts[na-1]) ) return; if ( setmem(gctx, 16, gctx->sinc_luts[nb-1]) ) return; if ( setmem(gctx, 17, gctx->sinc_luts[nc-1]) ) return; @@ -229,12 +232,6 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, return; } - - if ( sfloat(gctx, 2, klow) ) return; - if ( setint(gctx, 3, image->width) ) return; - if ( setint(gctx, 12, sampling) ) return; - if ( sfloat(gctx, 14, bwstep) ) return; - /* Iterate over panels */ event = malloc(image->det->n_panels * sizeof(cl_event)); for ( p=0; p<image->det->n_panels; p++ ) { |