Fused two if branches with the same conditional
authorPrashanth Kanduri <kanduri@cscs.ch>
Mon, 7 Oct 2019 15:19:13 +0000 (17:19 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 8 Oct 2019 06:36:44 +0000 (08:36 +0200)
Change-Id: I8a1fc90875982f2723d9b2f2ea2d847a33f5866b

src/gromacs/mdlib/sim_util.cpp

index a77e5751cff80ab82b91a1f749564ae24a09433a..b9663c8ea568932712ec2ccfa40cb0752ecd9df5 100644 (file)
@@ -1106,14 +1106,7 @@ void do_force(FILE                                     *fplog,
                                     *fcd,
                                     *mdatoms,
                                     stepWork);
-    }
-
-    const gmx::DomainLifetimeWorkload &domainWork = runScheduleWork->domainWork;
 
-    /* do local pair search */
-    if (stepWork.doNeighborSearch)
-    {
-        // TODO: fuse this branch with the above stepWork.doNeighborSearch block
         wallcycle_start_nocount(wcycle, ewcNS);
         wallcycle_sub_start(wcycle, ewcsNBS_SEARCH_LOCAL);
         /* Note that with a GPU the launch overhead of the list transfer is not timed separately */
@@ -1151,6 +1144,8 @@ void do_force(FILE                                     *fplog,
         }
     }
 
+    const gmx::DomainLifetimeWorkload &domainWork = runScheduleWork->domainWork;
+
     if (bUseGPU)
     {
         ddBalanceRegionHandler.openBeforeForceComputationGpu();