aboutsummaryrefslogtreecommitdiff
path: root/boltzgen/kernel/template/equilibrilize.cpp.mako
blob: 9f082a1f175938d1e9ad0209f69cfe0311e6188b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
void equilibrilize(${float_type}* f_next,
                   ${float_type}* f_prev,
                   std::size_t gid)
{
    ${float_type}* preshifted_f_next = f_next + gid*${layout.gid_offset()};
    ${float_type}* preshifted_f_prev = f_prev + gid*${layout.gid_offset()};

% for i, w_i in enumerate(descriptor.w):
    preshifted_f_next[${layout.pop_offset(i)}] = ${w_i.evalf()};
    preshifted_f_prev[${layout.pop_offset(i)}] = ${w_i.evalf()};
% endfor
}