Modernize wallcycle counting
[alexxy/gromacs.git] / src / gromacs / mdlib / gpuforcereduction_impl.cu
index 80aad0ed38b648eaa81dfe05bea0c7fc78de21a2..471cc1d5c7d3d30880e37b73bef4b9c889c7794c 100644 (file)
@@ -130,7 +130,7 @@ void GpuForceReduction::Impl::reinit(DeviceBuffer<Float3>  baseForcePtr,
     completionMarker_ = completionMarker;
     cellInfo_.cell    = cell.data();
 
-    wallcycle_start_nocount(wcycle_, ewcLAUNCH_GPU);
+    wallcycle_start_nocount(wcycle_, WallCycleCounter::LaunchGpu);
     reallocateDeviceBuffer(
             &cellInfo_.d_cell, numAtoms_, &cellInfo_.cellSize, &cellInfo_.cellSizeAlloc, deviceContext_);
     copyToDeviceBuffer(&cellInfo_.d_cell,
@@ -140,7 +140,7 @@ void GpuForceReduction::Impl::reinit(DeviceBuffer<Float3>  baseForcePtr,
                        deviceStream_,
                        GpuApiCallBehavior::Async,
                        nullptr);
-    wallcycle_stop(wcycle_, ewcLAUNCH_GPU);
+    wallcycle_stop(wcycle_, WallCycleCounter::LaunchGpu);
 
     dependencyList_.clear();
 };
@@ -164,8 +164,8 @@ void GpuForceReduction::Impl::addDependency(GpuEventSynchronizer* const dependen
 
 void GpuForceReduction::Impl::execute()
 {
-    wallcycle_start_nocount(wcycle_, ewcLAUNCH_GPU);
-    wallcycle_sub_start(wcycle_, ewcsLAUNCH_GPU_NB_F_BUF_OPS);
+    wallcycle_start_nocount(wcycle_, WallCycleCounter::LaunchGpu);
+    wallcycle_sub_start(wcycle_, WallCycleSubCounter::LaunchGpuNBFBufOps);
 
     if (numAtoms_ == 0)
     {
@@ -209,8 +209,8 @@ void GpuForceReduction::Impl::execute()
         completionMarker_->markEvent(deviceStream_);
     }
 
-    wallcycle_sub_stop(wcycle_, ewcsLAUNCH_GPU_NB_F_BUF_OPS);
-    wallcycle_stop(wcycle_, ewcLAUNCH_GPU);
+    wallcycle_sub_stop(wcycle_, WallCycleSubCounter::LaunchGpuNBFBufOps);
+    wallcycle_stop(wcycle_, WallCycleCounter::LaunchGpu);
 }
 
 GpuForceReduction::Impl::~Impl(){};