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 | |
parent | ed81cc8d9811aeb93c286266a464fea25554a083 (diff) |
Tidy up, fix definition of get_q() in CL kernel
-rw-r--r-- | data/diffraction.cl | 2 | ||||
-rw-r--r-- | src/diffraction-gpu.c | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/data/diffraction.cl b/data/diffraction.cl index dbbad265..5efd65d1 100644 --- a/data/diffraction.cl +++ b/data/diffraction.cl @@ -24,7 +24,7 @@ const sampler_t sampler_c = CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_REPEAT | CLK_FILTER_LINEAR; -float4 get_q(int fs, int ss, float res, float clen, float k, +float4 get_q(float fs, float ss, float res, float clen, float k, float *ttp, float corner_x, float corner_y, float fsx, float fsy, float ssx, float ssy) { 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++ ) { |