首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cuda 5.0支持的c++版本

cuda 5.0支持的c++版本
EN

Stack Overflow用户
提问于 2012-08-22 21:05:14
回答 4查看 5.6K关注 0票数 8

我找不到CUDA5.0支持哪些版本/哪些概念的c++。我在CUDA 5.0 RC附带的编程指南或参考指南中找不到任何信息。我特别想知道CUDA5.0是否支持C++11。有人能告诉我哪里可以找到这个信息吗?

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2012-08-22 21:16:51

不支持gcc 4.7,所以some of the c++11 features不可用:

代码语言:javascript
复制
- Non-static data member initializers
- Template aliases :(
- Delegating constructors
- User-defined literals
- Extended friend declarations
- Explicit virtual overrides
票数 1
EN

Stack Overflow用户

发布于 2012-09-26 17:45:21

显然,在5.0RC中没有可用的C++11功能。nvcc仍然不理解gcc 4.6 (见Error while using CUDA and C++11)标准中使用的C++11语法:

$ nvcc --版本

代码语言:javascript
复制
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

代码语言:javascript
复制
int main()
{
}

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

代码语言:javascript
复制
/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

..。

票数 7
EN

Stack Overflow用户

发布于 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

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12073828

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档