Using std::vector in CUDA device code

后端 未结 4 1333
我在风中等你
我在风中等你 2020-12-08 09:39

The question is that: is there a way to use the class \"vector\" in Cuda kernels? When I try I get the following error:

error : calling a host function(\"std         


        
4条回答
  •  自闭症患者
    2020-12-08 10:07

    You can't use the STL in CUDA, but you may be able to use the Thrust library to do what you want. Otherwise just copy the contents of the vector to the device and operate on it normally.

提交回复
热议问题