Balance event consumption for GPU update code path
[alexxy/gromacs.git] / src / gromacs / mdtypes / state_propagator_data_gpu.h
index ad07df2c132236c3763e2b7ce22d14f76506e454..4cf4c7998d28a915907fbc4d1f65c596db643d1e 100644 (file)
@@ -208,6 +208,22 @@ public:
      */
     void waitCoordinatesCopiedToDevice(AtomLocality atomLocality);
 
+    /*! \brief Consume the event for copying coordinates to the device.
+     *
+     * Used for manual event consumption. Does nothing except changing the internal event counter.
+     *
+     *  \param[in] atomLocality  Locality of the particles.
+     */
+    void consumeCoordinatesCopiedToDeviceEvent(AtomLocality atomLocality);
+
+    /*! \brief Reset the event for copying coordinates to the device.
+     *
+     * Used for manual event consumption. Does nothing except resetting the event.
+     *
+     *  \param[in] atomLocality  Locality of the particles.
+     */
+    void resetCoordinatesCopiedToDeviceEvent(AtomLocality atomLocality);
+
     /*! \brief Setter for the event synchronizer for the update is done on th GPU
      *
      *  \param[in] xUpdatedOnDeviceEvent  The event to synchronize the stream coordinates wre updated on device.
@@ -302,6 +318,12 @@ public:
      */
     GpuEventSynchronizer* fReducedOnDevice(AtomLocality atomLocality);
 
+    /*! \brief Consume the event for when the forces are reduced on the GPU.
+     *
+     *  \param[in] atomLocality      Locality of the particles to wait for.
+     */
+    void consumeForcesReducedOnDeviceEvent(AtomLocality atomLocality);
+
     /*! \brief Getter for the event synchronizer for the forces are ready on the GPU.
      *
      *  \param[in] atomLocality      Locality of the particles to wait for.