OpenMP offload macro definition


Is there some defined macro from compiler when I compile with OMP offload support? Like “_CUDA”. I would to do a check like:


At the moment, when compiling with OMP offload, _CUDA is enabled , but I don’t see the analogue of OMP offload, if exist. Thanks.

The only macro that I’m aware of that’s defined by the OpenMP standard is “_OPENMP” which is set to the standard version the compiler supports. Not something that would be helpful here. You’re probably better off just using your own macro.