aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex')
-rw-r--r--contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex19
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex b/contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex
index 142e526b81b3..1ceecc1af8ae 100644
--- a/contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex
+++ b/contrib/llvm-project/clang/lib/Headers/openmp_wrappers/complex
@@ -17,18 +17,23 @@
// We require std::math functions in the complex builtins below.
#include <cmath>
-#define __CUDA__
+#ifdef __NVPTX__
#define __OPENMP_NVPTX__
#include <__clang_cuda_complex_builtins.h>
#undef __OPENMP_NVPTX__
+#endif // __NVPTX__
+
+#ifdef __AMDGCN__
+#define __OPENMP_AMDGCN__
+#include <__clang_cuda_complex_builtins.h>
+#undef __OPENMP_AMDGCN__
+#endif // __AMDGCN__
+
#endif
// Grab the host header too.
#include_next <complex>
-
-#ifdef __cplusplus
-
// If we are compiling against libc++, the macro _LIBCPP_STD_VER should be set
// after including <cmath> above. Since the complex header we use is a
// simplified version of the libc++, we don't need it in this case. If we
@@ -40,13 +45,11 @@
#ifndef _LIBCPP_STD_VER
#pragma omp begin declare variant match( \
- device = {arch(nvptx, nvptx64)}, \
+ device = {arch(amdgcn, nvptx, nvptx64)}, \
implementation = {extension(match_any, allow_templates)})
#include <complex_cmath.h>
#pragma omp end declare variant
-#endif
-
-#endif
+#endif // _LIBCPP_STD_VER