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