Ошибка при использовании CUDA и C++11

Я использую CUDA 4.1 и GCC 4.5 ... (ФИНАЛЬНО! CUDA поддерживает GCC 4.5, но все еще жду GCC 4.6). В любом случае, возможно ли использовать C++11 с CUDA 4.1?

Я пробовал передать:

--compiler-options "-std=c++0x"

в nvcc и он выдает кучу ошибок:

/usr/include/c++/4.5/exception_ptr.h(100): error: copy constructor for class "std::__exception_ptr::exception_ptr" may not have a parameter of type "std::__exception_ptr::exception_ptr"

/usr/include/c++/4.5/exception_ptr.h(100): error: expected a ")"

/usr/include/c++/4.5/exception_ptr.h(110): error: expected a ")"

/usr/include/c++/4.5/exception_ptr.h(132): error: identifier "type_info" is undefined

/usr/include/c++/4.5/exception_ptr.h(101): error: identifier "__o" is undefined

/usr/include/c++/4.5/exception_ptr.h(112): error: expected a ">"

/usr/include/c++/4.5/exception_ptr.h(112): error: identifier "__o" is undefined

/usr/include/c++/4.5/nested_exception.h(62): error: expected a ";"

/usr/include/c++/4.5/nested_exception.h(64): error: expected a ";"

/usr/include/c++/4.5/nested_exception.h(77): error: member function "std::nested_exception::~nested_exception" may not be redeclared outside its class

/usr/include/c++/4.5/nested_exception.h(77): error: function "std::<error>" may not be initialized

/usr/include/c++/4.5/nested_exception.h(77): error: expected an expression

/usr/include/c++/4.5/nested_exception.h(82): error: expected a ")"

/usr/include/c++/4.5/nested_exception.h(110): error: expected a ")"

/usr/include/c++/4.5/nested_exception.h(115): error: expected a ")"

/usr/include/c++/4.5/nested_exception.h(122): error: expected a ")"

/usr/include/c++/4.5/nested_exception.h(127): error: expected a ")"

/usr/include/c++/4.5/nested_exception.h(127): error: function template "std::__throw_with_nested" has already been defined

/usr/include/c++/4.5/bits/cpp_type_traits.h(180): error: identifier "char16_t" is undefined

/usr/include/c++/4.5/bits/cpp_type_traits.h(187): error: identifier "char32_t" is undefined

/usr/include/c++/4.5/bits/cpp_type_traits.h(187): error: class "std::__is_integer<<error-type>>" has already been defined

21 errors detected in the compilation of "/tmp/tmpxft_00000ef2_00000000-4_test_cuda.cpp1.ii".

Пример test.cu

#include <cuda.h>

__host__ void test() {
  // nothing in method
}

Компилируется нормально с:

nvcc -c -o test.o test.cu

Но не с C++0x

nvcc -c -o test.o test.cu --compiler-options "-std=c++0x"
24
задан user988098 30 January 2012 в 00:30
поделиться