Avoid GPU data race also with OpenCL
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_ocl / nbnxn_ocl_types.h
index 2f3396416d0ee1b18b6c8b9930acf9450e6b8a81..f6ee45829229e765c638bc25ddce8074884db7bb 100644 (file)
@@ -297,10 +297,12 @@ struct gmx_nbnxn_ocl_t
     cl_command_queue    stream[2];      /**< local and non-local GPU queues                             */
 
     /** events used for synchronization */
-    cl_event    nonlocal_done;           /**< event triggered when the non-local non-bonded kernel
-                                              is done (and the local transfer can proceed)               */
-    cl_event    misc_ops_done;           /**< event triggered when the operations that precede the
-                                              main force calculations are done (e.g. buffer 0-ing)       */
+    cl_event nonlocal_done;              /**< event triggered when the non-local non-bonded kernel
+                                            is done (and the local transfer can proceed) */
+    cl_event isc_ops_and_local_H2D_done; /**< event triggered when the tasks issued in
+                                            the local stream that need to precede the
+                                            non-local force calculations are done
+                                            (e.g. f buffer 0-ing, local x/q H2D) */
 
     cl_bool                     bDoTime; /**< True if event-based timing is enabled.                     */
     cl_timers_t                *timers;  /**< OpenCL event-based timers.                                 */