Skip to content
Snippets Groups Projects
Commit ccf7d71e authored by yaskovet's avatar yaskovet
Browse files

Add missing vector_dist methods for DCPSE on GPU

parent dbff3f2a
No related branches found
No related tags found
No related merge requests found
Pipeline #5703 passed
......@@ -167,6 +167,62 @@ public:
return v_pos.template get<0>(vec_key.getKey());
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
__device__ __host__ inline auto getPosOrig(int vec_key) -> decltype(v_pos.template get<0>(vec_key))
{
return v_pos.template get<0>(vec_key);
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
__device__ __host__ inline auto getPosOrig(const vect_dist_key_dx & vec_key) -> decltype(v_pos.template get<0>(vec_key.getKey()))
{
return v_pos.template get<0>(vec_key.getKey());
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
__device__ __host__ inline auto getPosOrig(int vec_key) const -> decltype(v_pos.template get<0>(vec_key))
{
return v_pos.template get<0>(vec_key);
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
__device__ __host__ inline auto getPosOrig(const vect_dist_key_dx & vec_key) const -> decltype(v_pos.template get<0>(vec_key.getKey()))
{
return v_pos.template get<0>(vec_key.getKey());
}
/*! \brief Get the property of an element
*
* see the vector_dist iterator usage to get an element key
......
......@@ -269,6 +269,27 @@ public:
return vd.getPos(vect_dist_key_dx(pid.template get<0>(vec_key.getKey())));
}
/*! \brief Move the memory from the device to host memory
*
* \tparam property to move use POS_PROP for position property
*
*/
template<unsigned int ... prp>
inline void hostToDeviceProp()
{
vd.template hostToDeviceProp<prp ...>();
}
/*! \brief Move the memory from the device to host memory
*
* \tparam property to move use POS_PROP for position property
*
*/
inline void hostToDevicePos()
{
vd.template hostToDevicePos<0>();
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment