aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-06-13 21:45:49 +0200
committerAdrian Kummerlaender2019-06-13 21:55:18 +0200
commit3d355b66fe231837e0051cf289d8a0f72dec798c (patch)
treed7b41d4373e664a97feea8b8fe127fa8085207c7 /template
parent61cd3b6bc53c151863bd99fb2a03b29157a876ca (diff)
downloadsymlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.tar
symlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.tar.gz
symlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.tar.bz2
symlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.tar.lz
symlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.tar.xz
symlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.tar.zst
symlbm_playground-3d355b66fe231837e0051cf289d8a0f72dec798c.zip
Further the separation between descriptor and lattice
Diffstat (limited to 'template')
-rw-r--r--template/kernel.mako8
1 files changed, 4 insertions, 4 deletions
diff --git a/template/kernel.mako b/template/kernel.mako
index 6f82b20..24a6f64 100644
--- a/template/kernel.mako
+++ b/template/kernel.mako
@@ -7,7 +7,7 @@ __kernel void equilibrilize(__global __write_only float* f_a,
__global __write_only float* preshifted_f_b = f_b + gid;
% if pop_eq_src == '':
-% for i, w_i in enumerate(w):
+% for i, w_i in enumerate(descriptor.w):
preshifted_f_a[${i*nCells}] = ${w_i}.f;
preshifted_f_b[${i*nCells}] = ${w_i}.f;
% endfor
@@ -42,7 +42,7 @@ __kernel void collide_and_stream(__global __write_only float* f_a,
__global __write_only float* preshifted_f_a = f_a + gid;
__global __read_only float* preshifted_f_b = f_b + gid;
-% for i, c_i in enumerate(c):
+% for i, c_i in enumerate(descriptor.c):
const float f_curr_${i} = preshifted_f_b[${direction_index(c_i)*nCells + neighbor_offset(-c_i)}];
% endfor
@@ -64,7 +64,7 @@ __kernel void collide_and_stream(__global __write_only float* f_a,
const float ${ccode(expr)}
% endfor
-% for i in range(0,len(c)):
+% for i in range(0,descriptor.q):
preshifted_f_a[${i*nCells}] = f_next_${i};
% endfor
}
@@ -76,7 +76,7 @@ __kernel void collect_moments(__global __read_only float* f,
__global __read_only float* preshifted_f = f + gid;
-% for i in range(0,len(c)):
+% for i in range(0,descriptor.q):
const float f_curr_${i} = preshifted_f[${i*nCells}];
% endfor