开发者

Using vectors in CUDA

开发者 https://www.devze.com 2023-03-12 06:06 出处:网络
How to use cudamemc开发者_JS百科py for vectors in C++ ? my code works fine for arrays but vectors it doesnt seem to support. Any idea how to support vectors in CUDA?The short answer is that you can\'t

How to use cudamemc开发者_JS百科py for vectors in C++ ? my code works fine for arrays but vectors it doesnt seem to support. Any idea how to support vectors in CUDA?


The short answer is that you can't just using the basic CUDA APIs.

If you want to use STL containers with CUDA, you should look at the thrust template library, which provides and STL like interface to the GPU and a number of useful GPU algorithms to operate on data within container types.

0

精彩评论

暂无评论...
验证码 换一张
取 消