Commit c46dc01e authored by incardon's avatar incardon

Small fix for tranfer host to device

parent a8b2bfa3
......@@ -50,7 +50,7 @@ struct call_recursive_host_device_if_vector
T_ker * ptr_tt = static_cast<T_ker *>(tmp.getPointer());
for(size_t i = start ; i < stop ; i++)
for(size_t i = start ; i <= stop ; i++)
{
ptr_tt[i] = ptr[i].toKernel();
}
......
......@@ -213,7 +213,7 @@ public:
*/
template<unsigned int ... prp> void hostToDevice(size_t start, size_t stop)
{
this->data_.mem->hostToDevice(start,stop);
this->data_.mem->hostToDevice(start*sizeof(T),(stop+1)*sizeof(T));
}
/*! \brief It return the properties arrays.
......
......@@ -1527,7 +1527,7 @@ namespace openfpm
*/
template<unsigned int ... prp> void hostToDevice()
{
base.template hostToDevice<prp ...>(0,v_size);
base.template hostToDevice<prp ...>(0,v_size-1);
}
/*! \brief Synchronize the memory buffer in the device with the memory in the host
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment