Make DeviceStream into a class
[alexxy/gromacs.git] / src / gromacs / nbnxm / gpu_common.h
index 65f38daea2b4902e243ccca4a372418f495cb493..f5b3d813da09e7043e864a497d17994730aaa2cb 100644 (file)
@@ -399,7 +399,7 @@ bool gpu_try_finish_task(NbnxmGpu*                nb,
             // GpuTaskCompletion::Wait mode the timing is expected to be done in the caller.
             wallcycle_start_nocount(wcycle, ewcWAIT_GPU_NB_L);
 
-            if (!haveStreamTasksCompleted(nb->stream[iLocality]))
+            if (!haveStreamTasksCompleted(nb->deviceStreams[iLocality]))
             {
                 wallcycle_stop(wcycle, ewcWAIT_GPU_NB_L);
 
@@ -412,7 +412,7 @@ bool gpu_try_finish_task(NbnxmGpu*                nb,
         }
         else if (haveResultToWaitFor)
         {
-            gpuStreamSynchronize(nb->stream[iLocality]);
+            nb->deviceStreams[iLocality].synchronize();
         }
 
         // TODO: this needs to be moved later because conditional wait could brake timing