[PATCH] D102507: [HIP] Support <functional> in device code

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 14 09:11:00 PDT 2021


yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a subscriber: mgorny.
yaxunl requested review of this revision.

This patch adds wrapper headers for `<functional>`
and a few others which is required to support
`<functional>`.

The basic idea is to make template functions
defined in these headers host device by pragmas.

Since this only works for libc++. The code is conditioned
for libc++ only. For libstdc++ it is NFC.


https://reviews.llvm.org/D102507

Files:
  clang/docs/HIPSupport.rst
  clang/lib/Headers/CMakeLists.txt
  clang/lib/Headers/__clang_hip_runtime_wrapper.h
  clang/lib/Headers/cuda_wrappers/__tuple
  clang/lib/Headers/cuda_wrappers/array
  clang/lib/Headers/cuda_wrappers/functional
  clang/lib/Headers/cuda_wrappers/tuple
  clang/lib/Headers/cuda_wrappers/type_traits
  clang/lib/Headers/cuda_wrappers/utility

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102507.345456.patch
Type: text/x-patch
Size: 7854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210514/8c84f4ee/attachment-0001.bin>


More information about the cfe-commits mailing list