How should I pass a stl vector to device. Maybe not pass but share. I want to map given vector to device that I could access to this vector from kernel. I was trying sth like this:
int * wskvec=&image;
cudaHostAlloc((void**)&wskvec,imgbyte,cudaHostAllocMapped | cudaHostAllocWriteCombined | cudaHostAllocPortable);
err=cudaHostGetDevicePointer ((void**)&in,wskvec, 0);
But this code provides to run-time error that “vector is out of range” while accessing to vector.
err has value of 5.
thanks for answer.