c++ version supported by cuda 5.0

后端 未结 4 1658
遇见更好的自我
遇见更好的自我 2020-12-16 04:00

I can\'t find which version/which concepts of c++ is/are supported by CUDA 5.0. I could not find any information in the Programming Guide or Reference Guide delivered with t

4条回答
  •  借酒劲吻你
    2020-12-16 04:52

    Apperently no C++11 features are available in 5.0 RC. nvcc still does not understand C++11 syntax used in the standard includes of gcc 4.6 (see Error while using CUDA and 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
    

    $ 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
    

    ...

提交回复
热议问题