diff options
-rw-r--r-- | boltzgen/kernel/template/collect_moments.cl.mako | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/boltzgen/kernel/template/collect_moments.cl.mako b/boltzgen/kernel/template/collect_moments.cl.mako index 06b92c9..ddf5102 100644 --- a/boltzgen/kernel/template/collect_moments.cl.mako +++ b/boltzgen/kernel/template/collect_moments.cl.mako @@ -1,8 +1,9 @@ __kernel void collect_moments_gid(__global ${float_type}* f, - __global ${float_type}* moments, + __global ${float_type}* m, unsigned int gid) { __global ${float_type}* preshifted_f = f + ${layout.cell_preshift('gid')}; + __global ${float_type}* preshifted_m = m + gid*${descriptor.d+1}; % for i in range(0,descriptor.q): const ${float_type} f_curr_${i} = preshifted_f[${layout.pop_offset(i)}]; @@ -13,7 +14,7 @@ __kernel void collect_moments_gid(__global ${float_type}* f, % endfor % for i, expr in enumerate(moments_assignment): - moments[${layout.pop_offset(i)} + gid] = ${ccode(expr.rhs)}; + preshifted_m[${i}] = ${ccode(expr.rhs)}; % endfor } |