I have a problem with sorting by key using device ptr (thrust::device_ptr< int>).
This:
thrust::sort_by_key(dev_ptr_key,dev_ptr_key+noOfSelectedRows,dev_ptr_val,dev_ptr_val+noOfSelectedRows);
gives error:
Error 48 error : call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type
this error is from merging_sort.h and stable_merge_sort.incl.
Using begin():
thrust::sort_by_key(dev_ptr_key->begin(),dev_ptr_key->begin()+noOfSelectedRows,dev_ptr_val->begin(),dev_ptr_val->begin()+noOfSelectedRows);
gives error:
Error 28 error : loop in sequence of "operator->" functions starting at class "thrust::device_ptr<int>"
Anyone have idea how to make it working? Thanks in advance