From CUDA 7.5 nvidia slides:
C++11 Supported features:
- auto
- lambdas
- std::initializer_list
- variadic templates
- static_asserts
- constexpr
- rvalue references
- range based for loops
C++ Not supported features
- thread_local
- Standard libraries: std::*
std::cout
is defined in the C++ standard library which is not supported by CUDA. Use C printf
From CUDA 6.5, the ‘compute_11′, ‘compute_12′, ‘compute_13′, ‘sm_11′, ‘sm_12′, and ‘sm_13′ architectures are deprecated. So nvcc
will compile by default to CC 2.0 enabling printf
support.
More info here and here