From f3035c9d8d5a643ee7e9e86a58688c4b2f86319c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 5 Nov 2019 23:20:44 +0100 Subject: Fix OpenCL vector indexing --- boltzgen/kernel/template/momenta_boundary.cl.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boltzgen/kernel/template/momenta_boundary.cl.mako b/boltzgen/kernel/template/momenta_boundary.cl.mako index f22d950..9581a14 100644 --- a/boltzgen/kernel/template/momenta_boundary.cl.mako +++ b/boltzgen/kernel/template/momenta_boundary.cl.mako @@ -26,7 +26,7 @@ collision_subexpr, collision_assignment = model.collision(f_eq = model.equilibri <%call expr="momenta_boundary('velocity', [('%s%d' % (float_type, descriptor.d), 'velocity')])"> ${float_type} ${sympy.ccode(moments_assignment[0])} % for i, expr in enumerate(moments_assignment[1:]): - ${float_type} ${expr.lhs} = velocity[${i}]; + ${float_type} ${expr.lhs} = velocity.${['x','y','z'][i]}; % endfor -- cgit v1.2.3