cuda 5.0支持的c ++版本

sor*_*iak 8 c++ cuda c++11

我找不到CUDA 5.0支持哪个版本/哪个c ++概念.我在CUDA 5.0 RC随附的"编程指南"或"参考指南"中找不到任何信息.特别是我想知道CUDA 5.0是否支持C++ 11.有人能指点我到一个地方寻找这些信息吗?

小智 7

显然,5.0 RC中没有C++ 11功能.nvcc仍然不理解标准包含gcc 4.6中使用的C++ 11语法(请参阅使用CUDA和C++ 11时的错误):

$ nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Tue_Jul_31_17:46:14_PDT_2012
Cuda compilation tools, release 5.0, V0.2.1221
Run Code Online (Sandbox Code Playgroud)

$ cat test.cu

int main()
{
}
Run Code Online (Sandbox Code Playgroud)

$ nvcc -Xcompiler"-std = c ++ 0x"test.cu

/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h(159): error: identifier "nullptr" is undefined

/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h(159): error: expected a ";"

/usr/include/c++/4.6/bits/exception_ptr.h(93): error: incomplete type is not allowed
Run Code Online (Sandbox Code Playgroud)

...


per*_*eal 1

它不支持 gcc 4.7,因此某些 c++11 功能不可用:

- Non-static data member initializers
- Template aliases :(
- Delegating constructors
- User-defined literals
- Extended friend declarations
- Explicit virtual overrides
Run Code Online (Sandbox Code Playgroud)