lattice / quda

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

Reduce namespace pollution #97

Closed fwinter closed 10 years ago

fwinter commented 11 years ago

Hi guys,

while reviewing your code for a better integration of qdp-jit I notice that you define a bunch of preprocessor macros in 'quda_internal.h', e.g. 'InverterType' etc. Are these necessary? One should always minimize the number of macros that don't follow namespace lookup rules. This prevents any user code to use such names whenever 'quda.h' is included.

Frank

maddyscientist commented 11 years ago

While these macros in quda_internal.h are ugly (I had forgotten about them to be honest, I planned to kill them ages ago), these are defined in quda_internal.h, not in quda.h (which does not include quda_internal.h). External applications should only be including quda.h, where there shouldn't be any such pollution.

If there is something in quda_internal.h that you need, then we should expose that to the interface in quda.h.