Bug fix for event passed to GPU comm features
[alexxy/gromacs.git] / src / gromacs / ewald / pme_pp_comm_gpu.h
index 7461dae9428414725cef3bbc5d25d0019e98ef97..b58125513e87caa3593aa30c1e5553bad5e706ab 100644 (file)
@@ -45,6 +45,8 @@
 #include "gromacs/utility/classhelpers.h"
 #include "gromacs/utility/gmxmpi.h"
 
+class GpuEventSynchronizer;
+
 namespace gmx
 {
 
@@ -59,9 +61,8 @@ class PmePpCommGpu
         /*! \brief Creates PME-PP GPU communication object
          * \param[in] comm            Communicator used for simulation
          * \param[in] pmeRank         Rank of PME task
-         * \param[in] coordinatesOnDeviceEvent Event recorded when coordinates are available on device
          */
-        PmePpCommGpu(MPI_Comm comm, int pmeRank, void* coordinatesOnDeviceEvent);
+        PmePpCommGpu(MPI_Comm comm, int pmeRank);
         ~PmePpCommGpu();
 
         /*! \brief Perform steps required when buffer size changes
@@ -81,8 +82,9 @@ class PmePpCommGpu
          * \param[in] sendPtr Buffer with coordinate data
          * \param[in] sendSize Number of elements to send
          * \param[in] sendPmeCoordinatesFromGpu Whether send is from GPU, otherwise CPU
+         * \param[in] coordinatesReadyOnDeviceEvent Event recorded when coordinates are available on device
          */
-        void sendCoordinatesToPmeCudaDirect(void *sendPtr, int sendSize, bool sendPmeCoordinatesFromGpu);
+        void sendCoordinatesToPmeCudaDirect(void *sendPtr, int sendSize, bool sendPmeCoordinatesFromGpu, GpuEventSynchronizer* coordinatesReadyOnDeviceEvent);
 
         /*! \brief
          * Return pointer to buffer used for staging PME force on GPU