You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, encoder kernels are simple while loops that are inserted into a switch statement by an #include directive. Turn these loops into full static inline functions.
Makes early returning possible.
Makes it possible to do pre-loop and post-loop computations, such as calculating the number of rounds in advance. This could be done now, but not in a straightforward way.
Will later make it possible to unroll loops by inlining multiple copies of the inner loop.
Communicates additional constraints to the compiler, potentially allowing it to optimize better.
This change should have no adverse effects, because the compiler will inline the function at its only callsite. On the contrary, this change will be beneficial for maintenance and performance.
The text was updated successfully, but these errors were encountered:
aklomp
changed the title
Factor encoder kernels into inline functions
Encoders: turn into proper inline functions
Nov 23, 2019
Currently, encoder kernels are simple while loops that are inserted into
a switch statement by an #include directive. Turn these loops into full
static inline functions.
- Makes early returning possible.
- Makes it possible to do pre-loop and post-loop computations, such as
calculating the number of rounds in advance. This could be done now,
but not in a straightforward way.
- Will later make it possible to unroll loops by inlining multiple
copies of the inner loop.
- Communicates additional constraints to the compiler, potentially
allowing it to optimize better.
This change should have no adverse effects, because the compiler will
inline the function at its only callsite. On the contrary, this change
should be beneficial for maintenance and performance.
Currently, decoder kernels are simple while loops that are inserted into
a switch statement by an #include directive. Turn these loops into full
static inline functions.
See the merge commit for #58 for more background.
The transformation of encoder kernels to inline functions (#58) allows
us to move the inner encoding loop into separate inline functions.
Because the number of remaining loop iterations is known, we can split
calls to the inner loop into long unrolled stretches. Tests show that
this can result in significant speedups.
Currently, encoder kernels are simple
while
loops that are inserted into a switch statement by an#include
directive. Turn these loops into fullstatic inline
functions.This change should have no adverse effects, because the compiler will inline the function at its only callsite. On the contrary, this change will be beneficial for maintenance and performance.
The text was updated successfully, but these errors were encountered: