/*! \brief Launch asynchronously the xq buffer host to device copy. */
void gpu_copy_xq_to_gpu(gmx_nbnxn_ocl_t *nb,
const nbnxn_atomdata_t *nbatom,
- const AtomLocality atomLocality,
- const bool haveOtherWork)
+ const AtomLocality atomLocality)
{
+ GMX_ASSERT(nb, "Need a valid nbnxn_gpu object");
+
const InteractionLocality iloc = gpuAtomToInteractionLocality(atomLocality);
/* local/nonlocal offset and length used for xq and f */
we always call the local local x+q copy (and the rest of the local
work in nbnxn_gpu_launch_kernel().
*/
- if (!haveOtherWork && canSkipWork(*nb, iloc))
+ if ((iloc == InteractionLocality::NonLocal) && !haveGpuShortRangeWork(*nb, iloc))
{
plist->haveFreshList = false;
clearing. All these operations, except for the local interaction kernel,
are needed for the non-local interactions. The skip of the local kernel
call is taken care of later in this function. */
- if (canSkipWork(*nb, iloc))
+ if (canSkipNonbondedWork(*nb, iloc))
{
plist->haveFreshList = false;
void gpu_launch_cpyback(gmx_nbnxn_ocl_t *nb,
struct nbnxn_atomdata_t *nbatom,
const int flags,
- const AtomLocality aloc,
- const bool haveOtherWork)
+ const AtomLocality aloc)
{
+ GMX_ASSERT(nb, "Need a valid nbnxn_gpu object");
+
cl_int gmx_unused cl_error;
int adat_begin, adat_len; /* local/nonlocal offset and length used for xq and f */
/* don't launch non-local copy-back if there was no non-local work to do */
- if (!haveOtherWork && canSkipWork(*nb, iloc))
+ if ((iloc == InteractionLocality::NonLocal) && !haveGpuShortRangeWork(*nb, iloc))
{
/* TODO An alternative way to signal that non-local work is
complete is to use a clEnqueueMarker+clEnqueueBarrier