#include "gromacs/gpu_utils/gmxsycl.h"
#include "gromacs/gpu_utils/devicebuffer.h"
#include "gromacs/gpu_utils/gpu_utils.h"
-#include "gromacs/gpu_utils/gpueventsynchronizer_sycl.h"
+#include "gromacs/gpu_utils/gpueventsynchronizer.h"
#include "gromacs/utility/template_mp.h"
//! \brief Class name for reduction kernel
using cl::sycl::access::mode;
+//! \brief Function returning the force reduction kernel lambda.
template<bool addRvecForce, bool accumulateForce>
static auto reduceKernel(cl::sycl::handler& cgh,
DeviceAccessor<Float3, mode::read> a_nbnxmForce,
DeviceAccessor<int, cl::sycl::access::mode::read> a_cell,
const int atomStart)
{
- cgh.require(a_nbnxmForce);
+ a_nbnxmForce.bind(cgh);
if constexpr (addRvecForce)
{
- cgh.require(a_rvecForceToAdd);
+ a_rvecForceToAdd.bind(cgh);
}
- cgh.require(a_forceTotal);
- cgh.require(a_cell);
+ a_forceTotal.bind(cgh);
+ a_cell.bind(cgh);
return [=](cl::sycl::id<1> itemIdx) {
// Set to nbnxnm force, then perhaps accumulate further to it
};
}
+//! \brief Force reduction SYCL kernel launch code.
template<bool addRvecForce, bool accumulateForce>
static void launchReductionKernel_(const int numAtoms,
const int atomStart,
});
}
-/*! \brief Select templated kernel and launch it. */
+/*! \brief Select templated Force reduction kernel and launch it. */
void launchForceReductionKernel(int numAtoms,
int atomStart,
bool addRvecForce,