CUDA atomics apply to types of size at most 8 and which are trivially copyable. There is no benefit, therefore, from their wrappers taking constant references rather than actual value. In fact, this will mostly serve to cause problems if we try to pass rvalues.
So, let's just drop all that use of const &T in favor of Ts.
Also, this will mean most atomic wrappers only take a single address (pointer/reference), so we no longer need to mark them with __restrict__ (!).
CUDA atomics apply to types of size at most 8 and which are trivially copyable. There is no benefit, therefore, from their wrappers taking constant references rather than actual value. In fact, this will mostly serve to cause problems if we try to pass rvalues.
So, let's just drop all that use of
const &T
in favor ofT
s.Also, this will mean most atomic wrappers only take a single address (pointer/reference), so we no longer need to mark them with
__restrict__
(!).