Grid
Grid copied to clipboard
use accelerator for setCheckerboard in RHMC
This goes some way towards #378. One-flavour RHMC is 10–20% faster with this, and gives identical results (i.e. generated configurations, excluding the header, are bitwise identical).
Things that could potentially be improved:
- I don't understand what the optional
checker_dim_half
parameter toacceleratorSetCheckerboard
does, so I have left it at the default value. - In principle I imagine that all calls to
setCheckerboard
could behave the same way; adding a dispatcher function inLattice_transfer.h
that implements the code in this PR in a single place, and then replacing all calls tosetCheckerboard
with calls to this new function would achieve this. However, I'm not set up to verify that the other calls tosetCheckerboard
still give correct results after this change, so I took the more conservative approach of just changing what I can confidently claim works.