From dbd9a340a7809a770d52d10154712278431acdc3 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 29 Oct 2019 10:56:41 +0100 Subject: Unify AOS, SOA specific cell preshift between targets SOA and AOS should not be target specific, neighbor offset calculation / bijection between gid and cell coordinates should be customizable. --- boltzgen/kernel/template/collect_moments.cpp.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boltzgen/kernel/template/collect_moments.cpp.mako') diff --git a/boltzgen/kernel/template/collect_moments.cpp.mako b/boltzgen/kernel/template/collect_moments.cpp.mako index 8c37db2..d72ff5d 100644 --- a/boltzgen/kernel/template/collect_moments.cpp.mako +++ b/boltzgen/kernel/template/collect_moments.cpp.mako @@ -3,7 +3,7 @@ void collect_moments(const ${float_type}* f, ${float_type}& rho, ${float_type} u[${descriptor.d}]) { - const ${float_type}* preshifted_f = f + gid*${layout.gid_offset()}; + const ${float_type}* preshifted_f = f + ${layout.cell_preshift('gid')}; % for i in range(0,descriptor.q): const ${float_type} f_curr_${i} = preshifted_f[${layout.pop_offset(i)}]; -- cgit v1.2.3