| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | // to work with CUDA and OpenMP target offloading [in C and C++ mode].) |
| 17 | 17 | |
| 18 | 18 | #pragma push_macro("__DEVICE__") |
| 19 | | #ifdef _OPENMP |
| 19 | #ifdef __OPENMP_NVPTX__ |
| 20 | 20 | #pragma omp declare target |
| 21 | 21 | #define __DEVICE__ __attribute__((noinline, nothrow, cold, weak)) |
| 22 | 22 | #else |
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | // To make the algorithms available for C and C++ in CUDA and OpenMP we select |
| 27 | 27 | // different but equivalent function versions. TODO: For OpenMP we currently |
| 28 | 28 | // select the native builtins as the overload support for templates is lacking. |
| 29 | | #if !defined(_OPENMP) |
| 29 | #if !defined(__OPENMP_NVPTX__) |
| 30 | 30 | #define _ISNANd std::isnan |
| 31 | 31 | #define _ISNANf std::isnan |
| 32 | 32 | #define _ISINFd std::isinf |
| ... | ... | @@ -250,7 +250,7 @@ __DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) { |
| 250 | 250 | #undef _LOGBd |
| 251 | 251 | #undef _LOGBf |
| 252 | 252 | |
| 253 | | #ifdef _OPENMP |
| 253 | #ifdef __OPENMP_NVPTX__ |
| 254 | 254 | #pragma omp end declare target |
| 255 | 255 | #endif |
| 256 | 256 | |