aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-03 18:18:35 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:17 +0100
commit9515f8664c5194caacb2308d62d92a8b4430507b (patch)
tree5956cc669a83ad8d932a1959459225cd6a225207 /data
parent9ae75d4f001f902b93dc6006aa3654b879f353ed (diff)
Fix array offset
Diffstat (limited to 'data')
-rw-r--r--data/diffraction.cl3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/diffraction.cl b/data/diffraction.cl
index 85080c58..feeae740 100644
--- a/data/diffraction.cl
+++ b/data/diffraction.cl
@@ -242,7 +242,8 @@ kernel void diffraction(global float *diff, global float *tt, float klow,
float val;
int idx;
- idx = convert_int_rtz(fs)+w*convert_int_rtz(ss);
+ idx = (min_fs + convert_int_rtz(fs))
+ + w*(min_ss + convert_int_rtz(ss));
for ( i=0; i<sampling*sampling*get_local_size(2); i++ )
sum += tmp[i];