I'm new to Thrust. I'm trying to copy from a thrust::host_vector
to a thrust::device_vector
, both of type Sequence
which is a class I already implemented.
I do however get an error "Invalid Device Function". I'm using CUDA 4.0 VS2010 on a GeForce GT 540.
thrust::host_vector <Sequence> Ind_Tabel_V;
void Ind_Table_Filling()
{
//some Code
Sequence s;
// some code
Ind_Tabel_V.push_back(s);
try
{
thrust::device_vector<Sequence> d_vec=Ind_Tabel_V;
}
catch (thrust::system_error &e)
{
std::cerr << "Error accessing vector element: " << e.what() << std::endl;
}
}
Can anyone help please?