我想排序字符串與cuda推力。Cuda推力字符串或字符排序
我發現了一個樣本此鏈接
https://github.com/bzip2-cuda/bzip2-cuda/blob/master/tst/string_sort_try0.cu
,當我嘗試編譯我收到以下錯誤消息。我能做些什麼來解決它?
"Error 1 error : **no instance of overloaded function "thrust::pointer<Element, Tag, Reference, Derived>::operator= [with Element=char, Tag=thrust::device_system_tag, Reference=thrust::device_reference<char>, Derived=thrust::device_ptr<char>]" matches the argument list** C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\thrust\device_ptr.h 109 1 CharSort "
代碼塊的一部分是
class device_string
{
public:
int cstr_len;
char* raw;
thrust::device_ptr<char> cstr;
static char* pool_raw;
static thrust::device_ptr<char> pool_cstr;
static thrust::device_ptr<char> pool_top;
// Sets the variables up the first time its used.
__host__ static void init()
{
static bool v = true;
if(v)
{
v = false;
pool_cstr = thrust::device_malloc(POOL_SZ);
pool_raw = (char*)raw_pointer_cast(pool_cstr);
pool_top = pool_cstr;
}
}
// Destructor for device variables used.
自2年前**以來,推力發生了很大變化** – kangshiyin