这里是我的代码: //initialize the device_vector
int size = N;
thrust::device_vector<glm::vec3> value(size);
thrust::device_vector<int> key(size);
//get the device pointer of the device_vector
//so than I
输入: BC BD BC BC BD CD 输出: 公元前3 BD 2 CD 1 ,如果我用char类型关键是available.But似乎推力不支持字符串作为密钥。 #include <thrust/device_vector.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/reduce.h>
#incl
我写使用类device_vector用于初始化向量CUDA内核分配()这些代码的。这个内核是通过一个类的成员函数推出作为解决这样的问题: CUDA kernel as member function of a class 和根据 https://devtalk.nvidia.com/default/topic/573289/mixing-c-and-cuda/。 我正在使用GTX650Ti GPU