[CUDA] added cmath wrappers to unbreak CUDA compilation after D79555
authorArtem Belevich <tra@google.com>
Thu, 12 Jan 2023 01:09:21 +0000 (17:09 -0800)
committerArtem Belevich <tra@google.com>
Thu, 12 Jan 2023 23:37:50 +0000 (15:37 -0800)
commit1ad5f6af816a439a84f7d8fe3dff87dd1f8a39ba
treebd8ff4c2da09bfa5a90f276af0b5ceb4442a848d
parent57e455e6d90238f73db2b0c25d563c56e5a523e6
[CUDA] added cmath wrappers to unbreak CUDA compilation after D79555

libc++ introduced a handful of internal functions that may or may not be
constexpr, depending on C++ version. For pre-constexpr variants we must declare
__device__ counterparts. Otherwise the code fails to compile on the GPU side.
See https://reviews.llvm.org/D79555

Differential Revision: https://reviews.llvm.org/D141555
clang/lib/Headers/CMakeLists.txt
clang/lib/Headers/cuda_wrappers/cmath [new file with mode: 0644]