[PATCH] CUDA: mark implicit intrinsics properly

Eli Bendersky eliben at google.com
Tue Sep 30 09:35:42 PDT 2014


Hi pcc, rnk,

r218624 implemented target inference for implicit special members. However, other entities can be implicit - for example intrinsics. These can not have inference running on them, so they should be marked __host__ __device__ as before. This is the safest and most flexible setting, since by construction these functions don't invoke anything, and we'd like them to be invokable from both host and device code. LLVM's intrinsics definitions (where these intrinsics come from in the case of CUDA/NVPTX) have no notion of target, so both host and device intrinsics can be supported this way.

http://reviews.llvm.org/D5541

Files:
  lib/Sema/SemaCUDA.cpp
  test/SemaCUDA/implicit-intrinsic.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5541.14230.patch
Type: text/x-patch
Size: 1102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140930/c0bb597d/attachment.bin>


More information about the cfe-commits mailing list