aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-29 20:33:30 +0100
committerAdrian Kummerlaender2019-10-29 20:33:30 +0100
commit09f45c1d1da37bf4f6fa4094eb2d2ea18e8aaf21 (patch)
tree618589f18b753b17af62c7fb25624f897768c127
parent1ce3b58dabba59741343cbd9e7e4c9f58f10f91b (diff)
downloadboltzgen-09f45c1d1da37bf4f6fa4094eb2d2ea18e8aaf21.tar
boltzgen-09f45c1d1da37bf4f6fa4094eb2d2ea18e8aaf21.tar.gz
boltzgen-09f45c1d1da37bf4f6fa4094eb2d2ea18e8aaf21.tar.bz2
boltzgen-09f45c1d1da37bf4f6fa4094eb2d2ea18e8aaf21.tar.xz
boltzgen-09f45c1d1da37bf4f6fa4094eb2d2ea18e8aaf21.zip
Don't try to reuse population layout for moment array indexingv0.1.1
-rw-r--r--boltzgen/kernel/template/collect_moments.cl.mako5
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
}