diff options
author | Adrian Kummerlaender | 2019-10-27 14:05:21 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2019-10-27 14:05:21 +0100 |
commit | 18c54d79699db7554faa851c87d7113db67a8a08 (patch) | |
tree | c89243b5796bb8f1e6a8cea241f3a5e1bf934ba1 /boltzgen/kernel/template/equilibrilize.cl.mako | |
parent | 7fa72d8718d96727bcfd60cc3bcb1609526d3c9b (diff) | |
download | boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.tar boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.tar.gz boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.tar.bz2 boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.tar.lz boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.tar.xz boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.tar.zst boltzgen-18c54d79699db7554faa851c87d7113db67a8a08.zip |
Separate functions into separate template files
Selection of the desired templates is possible via a new `functions` parameter.
Diffstat (limited to 'boltzgen/kernel/template/equilibrilize.cl.mako')
-rw-r--r-- | boltzgen/kernel/template/equilibrilize.cl.mako | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/boltzgen/kernel/template/equilibrilize.cl.mako b/boltzgen/kernel/template/equilibrilize.cl.mako new file mode 100644 index 0000000..aa2246c --- /dev/null +++ b/boltzgen/kernel/template/equilibrilize.cl.mako @@ -0,0 +1,13 @@ +__kernel void equilibrilize(__global ${float_type}* f_next, + __global ${float_type}* f_prev) +{ + const unsigned int gid = ${layout.gid()}; + + __global ${float_type}* preshifted_f_next = f_next + gid; + __global ${float_type}* preshifted_f_prev = f_prev + gid; + +% for i, w_i in enumerate(descriptor.w): + preshifted_f_next[${layout.pop_offset(i)}] = ${w_i}.f; + preshifted_f_prev[${layout.pop_offset(i)}] = ${w_i}.f; +% endfor +} |