我找不到CUDA5.0支持哪些版本/哪些概念的c++。我在CUDA 5.0 RC附带的编程指南或参考指南中找不到任何信息。我特别想知道CUDA5.0是否支持C++11。有人能告诉我哪里可以找到这个信息吗?
发布于 2012-08-22 21:16:51
不支持gcc 4.7,所以some of the c++11 features不可用:
- Non-static data member initializers
- Template aliases :(
- Delegating constructors
- User-defined literals
- Extended friend declarations
- Explicit virtual overrides发布于 2012-09-26 17:45:21
显然,在5.0RC中没有可用的C++11功能。nvcc仍然不理解gcc 4.6 (见Error while using CUDA and C++11)标准中使用的C++11语法:
$ nvcc --版本
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$ cat test.cu
int main()
{
}$ 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..。
发布于 2012-08-22 23:13:58
发行说明包含支持平台的列表,其中包括支持的GCC版本,5.0 Release Candidate release notes显示,对于某些发行版,最新支持的GCC版本是4.6 (对于其他发行版,支持的最新版本是4.6)。
一旦您知道支持哪个版本的GCC,请对比一下GCC的C++0x/C++11 feature list。
https://stackoverflow.com/questions/12073828
复制相似问题