[PATCH] CUDA host device code with two code paths

Jacques Pienaar jpienaar at google.com
Wed Dec 3 07:02:55 PST 2014


Creating CUDAIsDevice as language options (using fcuda-is-device frontend option). Using this flag instead of definition of __CUDA_ARCH__ to determine whether host/device compilation is occurring.

http://reviews.llvm.org/D6457

Files:
  include/clang/Basic/LangOptions.def
  lib/Basic/Targets.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Frontend/InitPreprocessor.cpp
  lib/Sema/SemaCUDA.cpp
  test/SemaCUDA/function-target.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6457.16862.patch
Type: text/x-patch
Size: 7570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141203/5a445e38/attachment.bin>


More information about the cfe-commits mailing list