*/
void waitCoordinatesCopiedToDevice(AtomLocality atomLocality);
- /*! \brief Getter for the event synchronizer for the update is done on th GPU
+ /*! \brief Setter for the event synchronizer for the update is done on th GPU
*
- * \returns The event to synchronize the stream coordinates wre updated on device.
+ * \param[in] xUpdatedOnDeviceEvent The event to synchronize the stream coordinates wre updated on device.
*/
- GpuEventSynchronizer* xUpdatedOnDevice();
+ void setXUpdatedOnDeviceEvent(GpuEventSynchronizer* xUpdatedOnDeviceEvent);
/*! \brief Copy positions from the GPU memory.
*
* \todo Reconsider naming. It should be xCopiedToDevice or xH2DCopyComplete, etc.
*/
EnumerationArray<AtomLocality, GpuEventSynchronizer> xReadyOnDevice_;
- //! An event that the coordinates are ready after update-constraints execution
- GpuEventSynchronizer xUpdatedOnDevice_;
+ //! A pointer to an event that the coordinates are ready after update-constraints execution
+ GpuEventSynchronizer* xUpdatedOnDeviceEvent_ = nullptr;
//! An array of events that indicate D2H copy of coordinates is complete (one event for each atom locality)
EnumerationArray<AtomLocality, GpuEventSynchronizer> xReadyOnHost_;