[libcxx-commits] [libcxx] [libcxx] Make terminal check always false for `print` on GPU (PR #99259)
Joseph Huber via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 31 07:16:10 PDT 2024
================
@@ -1223,6 +1223,11 @@ typedef __char32_t char32_t;
# define _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# endif
+// Clang supports targeting GPU architectures.
+# if (defined(__AMDGPU__) || defined(__NVPTX__)) && defined(_LIBCPP_COMPILER_CLANG_BASED)
+# define _LIBCPP_TARGETING_GPU
+#endif
----------------
jhuber6 wrote:
Okay, I made this on @philnik777's suggestion but can just hard-code the architecture (other compilers use `__NVPTX__` macros but there's a 0% chance anyone but clang is successfully compiling this for the near future.)
https://github.com/llvm/llvm-project/pull/99259
More information about the libcxx-commits
mailing list