[libcxx-commits] [PATCH] D79555: [libc++] [C++20] [P0415] Constexpr for std::complex.
Artem Belevich via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 11 17:24:56 PST 2023
tra added a comment.
Something like https://reviews.llvm.org/D141555 should unbreak CUDA. It can probably get reduced a bit, as we may not have sufficiently functional builtins on the GPU, so it's still a WIP.
I can't say that I like copy/pasting libc++ code into clang headers. I think it would be great if we could directly add necessary attributes to specific functions when libc++ headers are compiled as CUDA.
================
Comment at: libcxx/include/cmath:740
+ }
+#endif // _LIBCPP_STD_VER > 17
+ return __builtin_logb(__x);
----------------
Nit: this should be `// !__has_constexpr_builtin(__builtin_logb)`
================
Comment at: libcxx/include/cmath:781
+ }
+#endif // _LIBCPP_STD_VER > 17
+ return __builtin_scalbn(__x, __exp);
----------------
Nit: // !__has_constexpr_builtin(__builtin_scalbln)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79555/new/
https://reviews.llvm.org/D79555
More information about the libcxx-commits
mailing list