#include "gmxpre.h"
+#include "config.h"
+
+#include "gromacs/gpu_utils/gpueventsynchronizer.h"
#include "gromacs/mdlib/leapfrog_gpu.h"
#include "gromacs/mdlib/lincs_gpu.h"
#include "gromacs/mdlib/settle_gpu.h"
/*! \brief Create Update-Constrain object.
*
* The constructor is given a non-nullptr \p deviceStream, in which all the update and constrain
- * routines are executed. \p xUpdatedOnDevice should mark the completion of all kernels that
- * modify coordinates. The event is maintained outside this class and also passed to all (if
- * any) consumers of the updated coordinates. The \p xUpdatedOnDevice also can not be a nullptr
- * because the markEvent(...) method is called unconditionally.
+ * routines are executed.
*
* \param[in] ir Input record data: LINCS takes number of iterations and order of
* projection from it.
* \param[in] numTempScaleValues Number of temperature scaling groups. Set zero for no temperature coupling.
* \param[in] deviceContext GPU device context.
* \param[in] deviceStream GPU stream to use.
- * \param[in] xUpdatedOnDevice The event synchronizer to use to mark that
- * update is done on the GPU.
* \param[in] wcycle The wallclock counter
*/
- Impl(const t_inputrec& ir,
- const gmx_mtop_t& mtop,
- int numTempScaleValues,
- const DeviceContext& deviceContext,
- const DeviceStream& deviceStream,
- GpuEventSynchronizer* xUpdatedOnDevice,
- gmx_wallcycle* wcycle);
+ Impl(const t_inputrec& ir,
+ const gmx_mtop_t& mtop,
+ int numTempScaleValues,
+ const DeviceContext& deviceContext,
+ const DeviceStream& deviceStream,
+ gmx_wallcycle* wcycle);
~Impl();
/*! \brief Return the synchronizer associated with the event indicated that the coordinates are ready on the device.
*/
- GpuEventSynchronizer* getCoordinatesReadySync();
+ GpuEventSynchronizer* xUpdatedOnDeviceEvent();
/*! \brief
* Returns whether the maximum number of coupled constraints is supported
//! SETTLE GPU object for water constrains
std::unique_ptr<SettleGpu> settleGpu_;
- //! An pointer to the event to indicate when the update of coordinates is complete
- GpuEventSynchronizer* coordinatesReady_;
+ //! The event to indicate when the update of coordinates is complete
+ GpuEventSynchronizer xUpdatedOnDeviceEvent_;
//! The wallclock counter
gmx_wallcycle* wcycle_ = nullptr;
};