Can C++17 be used together with CUDA using clang?

前端 未结 2 750
萌比男神i
萌比男神i 2021-02-19 08:06

As far as using nvcc, one needs to use the corresponding gcc (currently max. 5.4 I believe) in conjunction. This of course somewhat prevents one from u

2条回答
  •  Happy的楠姐
    2021-02-19 08:52

    Currently up to C++14 is supported in device code (Introduced in CUDA 9)

    --std {c++03|c++11|c++14}
    

    Options for Specifying Behavior of Compiler/Linker

    However, if your host is only using C++17, it should be possible to use separate compilation and link them with library. Separate Compilation and Linking of CUDA C++ Device Code

    Update: formatting and more info

提交回复
热议问题