Boost的小矢量是否与NVCC 8兼容?

时间:2017-02-17 22:13:12

标签: c++ boost cuda

我在用nvcc构建这个单行程序时遇到了麻烦:

#include <boost/container/small_vector.hpp>

错误日志我看起来如下,对我来说它暗示可能存在一些marco定义冲突,但我对C ++的解释不够好:

C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(484): error C2332: 'struct': missing tag name
C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(608): note: see reference to class template instantiation 'boost::container::small_vector<T,N,Allocator>' being compiled
C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(484): warning C4346: 'boost::container::vector<T,boost::container::small_vector_allocator<Allocator>>::initial_capacity_t': dependent name is not a type
C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(484): note: prefix with 'typename' to indicate a type
C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(484): error C3646: 'initial_capacity_t': unknown override specifier
C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(484): error C3254: 'boost::container::small_vector<T,N,Allocator>': class contains explicit override 'initial_capacity_t' but does not derive from an interface that contains the function declaration
C:\Boost\include\boost-1_62\boost/container/small_vector.hpp(484): error C2838: 'initial_capacity_t': illegal qualified name in member declaration
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 8.0.targets(687,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env --cl-version 2015 -Xcompiler /FS -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64"  -I.\GeneratedFiles -I. -IC:\Qt\5.8\msvc2015_64\include -I.\GeneratedFiles\Debug -IC:\Qt\5.8\msvc2015_64\include\QtCore -IC:\Qt\5.8\msvc2015_64\include\QtGui -IC:\Qt\5.8\msvc2015_64\include\QtOpenGL -IC:\Qt\5.8\msvc2015_64\include\QtWidgets -IC:\Qt\5.8\msvc2015_64\include\QtMultimedia -IC:\Qt\5.8\msvc2015_64\include\QtNetwork -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" --source-in-ptx -G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static --gpu-architecture=compute_30 --gpu-code=compute_30,sm_30,sm_35,sm_52,sm_61 -g  -use_fast_math -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -D_UNICODE -DUNICODE -D_AFXDLL -Xcompiler "/EHsc /W1 /nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\test.cu.obj "C:\fslim2\Slim5\test.cu"" exited with code 2.

以下是我正在使用的small_vector.hpp版本 http://pastebin.com/v3hh5r5q

Boost的small_vector是否与NVCC兼容?

还有失败线的截图: enter image description here

还尝试了Boost 1.63,仍然没有骰子。

0 个答案:

没有答案