Fix cycle counters for "comm.coord" and "Wait + Comm. F" to support GPU halo exchange...
[alexxy/gromacs.git] / src / gromacs / domdec / gpuhaloexchange_impl.cuh
index 9a033ed54f96d88e38f06c0f2864f8a0a9b7029f..77aaf3f9bfe1e5f5713cc90bd565d060f745aa0f 100644 (file)
@@ -52,6 +52,8 @@
 #include "gromacs/gpu_utils/hostallocator.h"
 #include "gromacs/utility/gmxmpi.h"
 
+struct gmx_wallcycle;
+
 namespace gmx
 {
 
@@ -75,13 +77,15 @@ public:
      * \param [in]    localStream              local NB CUDA stream
      * \param [in]    nonLocalStream           non-local NB CUDA stream
      * \param [in]    pulse                    the communication pulse for this instance
+     * \param [in]    wcycle                   The wallclock counter
      */
     Impl(gmx_domdec_t*        dd,
          MPI_Comm             mpi_comm_mysim,
          const DeviceContext& deviceContext,
          const DeviceStream&  localStream,
          const DeviceStream&  nonLocalStream,
-         int                  pulse);
+         int                  pulse,
+         gmx_wallcycle*       wcycle);
     ~Impl();
 
     /*! \brief
@@ -198,6 +202,8 @@ private:
     int pulse_ = 0;
     //! Number of zones. Always 1 for 1-D case.
     const int nzone_ = 1;
+    //! The wallclock counter
+    gmx_wallcycle* wcycle_ = nullptr;
 };
 
 } // namespace gmx