[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 15:30:09 PST 2023


tra added a comment.

In D79555#4040527 <https://reviews.llvm.org/D79555#4040527>, @ldionne wrote:

> Thanks for the heads up @jdoerfert.
>
> It looks like Clang-cuda is re-defining `<complex>` in `clang/lib/Headers/cuda_wrappers/complex`. I'm not sure how that works but that is likely the issue. I'd wait to hear back from the Clang-cuda folks what they think the exact issue is before considering a revert, since it really seems to me like libc++ isn't doing anything wrong.

I'm aware of the broken bots, just didn't get a chance to deal with them yet.

It's not a libc++ problem, so I don't think we need to revert.

CUDA headers need to grow additional magic to make new libc++ code work on the GPU side. It's unfortunate that we need to play catch up here, but short of introducing CUDA support to libc++ itself, there's not much else we can do.

I'm a bit puzzled why things didn't work, though, as normally CUDA compilation should've treated `constexpr` functions as `__host__ __device__`,  and should've allowed `__constexpr_fmax()` etc... It's possible that we may have triggered yet another new corner case.


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