lattice / quda

QUDA is a library for performing calculations in lattice QCD on GPUs.
https://lattice.github.io/quda
Other
279 stars 94 forks source link

Use a macro to replace `__device__ __host__` for marking parallel functions #1177

Open maddyscientist opened 2 years ago

maddyscientist commented 2 years ago

This is something to do post GK merge. Some possible options include

quda_parallel
quda_offload
QUDA_PARALLEL
QUDA_OFFLOAD

For aesthetic reasons I prefer lower case, but understand the reasoning for all caps to designate a preprocessor definition. Any other suggestions @mathiaswagner, @weinbe2, @hummingtree?

weinbe2 commented 2 years ago

We should use all caps specifically to designate the preprocessor definition. I'd be receptive to something like quda::parallel as well but I don't think we can namespace defines like that?

As for the specific wording, I'm relatively indifferent. As an external example, Kokkos uses KOKKOS_FUNCTION (and KOKKOS_LAMBDA, KOKKOS_INLINE_FUNCTION, etc), but I don't see a specific need to copy them.