Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / modularsimulator / pmeloadbalancehelper.cpp
index 75d92381035ea9eacbb76fea67371c3d6f05949c..718fc2ccbf1155e2f14f2acf6b1942190c3c28f7 100644 (file)
 
 namespace gmx
 {
-bool PmeLoadBalanceHelper::doPmeLoadBalancing(
-        const MdrunOptions &mdrunOptions,
-        const t_inputrec   *inputrec,
-        const t_forcerec   *fr)
+bool PmeLoadBalanceHelper::doPmeLoadBalancing(const MdrunOptions& mdrunOptions,
+                                              const t_inputrec*   inputrec,
+                                              const t_forcerec*   fr)
 {
-    return (mdrunOptions.tunePme && EEL_PME(fr->ic->eeltype) &&
-            !mdrunOptions.reproducible && inputrec->cutoff_scheme != ecutsGROUP);
+    return (mdrunOptions.tunePme && EEL_PME(fr->ic->eeltype) && !mdrunOptions.reproducible
+            && inputrec->cutoff_scheme != ecutsGROUP);
 }
 
-PmeLoadBalanceHelper::PmeLoadBalanceHelper(
-        bool                 isVerbose,
-        StatePropagatorData *statePropagatorData,
-        FILE                *fplog,
-        t_commrec           *cr,
-        const MDLogger      &mdlog,
-        const t_inputrec    *inputrec,
-        gmx_wallcycle       *wcycle,
-        t_forcerec          *fr) :
+PmeLoadBalanceHelper::PmeLoadBalanceHelper(bool                 isVerbose,
+                                           StatePropagatorData* statePropagatorData,
+                                           FILE*                fplog,
+                                           t_commrec*           cr,
+                                           const MDLogger&      mdlog,
+                                           const t_inputrec*    inputrec,
+                                           gmx_wallcycle*       wcycle,
+                                           t_forcerec*          fr) :
     pme_loadbal_(nullptr),
     nextNSStep_(-1),
     isVerbose_(isVerbose),
@@ -84,16 +82,16 @@ PmeLoadBalanceHelper::PmeLoadBalanceHelper(
     inputrec_(inputrec),
     wcycle_(wcycle),
     fr_(fr)
-{}
+{
+}
 
 void PmeLoadBalanceHelper::setup()
 {
     auto box = statePropagatorData_->constBox();
     GMX_RELEASE_ASSERT(box[0][0] != 0 && box[1][1] != 0 && box[2][2] != 0,
                        "PmeLoadBalanceHelper cannot be initialized with zero box.");
-    pme_loadbal_init(&pme_loadbal_, cr_, mdlog_, *inputrec_, box,
-                     *fr_->ic, *fr_->nbv, fr_->pmedata, fr_->nbv->useGpu(),
-                     &bPMETunePrinting_);
+    pme_loadbal_init(&pme_loadbal_, cr_, mdlog_, *inputrec_, box, *fr_->ic, *fr_->nbv, fr_->pmedata,
+                     fr_->nbv->useGpu(), &bPMETunePrinting_);
 }
 
 void PmeLoadBalanceHelper::run(gmx::Step step, gmx::Time gmx_unused time)
@@ -104,15 +102,10 @@ void PmeLoadBalanceHelper::run(gmx::Step step, gmx::Time gmx_unused time)
     }
 
     // PME grid + cut-off optimization with GPUs or PME nodes
-    pme_loadbal_do(pme_loadbal_, cr_,
-                   (isVerbose_ && MASTER(cr_)) ? stderr : nullptr,
-                   fplog_, mdlog_,
-                   *inputrec_, fr_,
-                   statePropagatorData_->constBox(),
-                   statePropagatorData_->constPositionsView().paddedArrayRef(),
-                   wcycle_,
-                   step, step - inputrec_->init_step,
-                   &bPMETunePrinting_);
+    pme_loadbal_do(pme_loadbal_, cr_, (isVerbose_ && MASTER(cr_)) ? stderr : nullptr, fplog_,
+                   mdlog_, *inputrec_, fr_, statePropagatorData_->constBox(),
+                   statePropagatorData_->constPositionsView().paddedArrayRef(), wcycle_, step,
+                   step - inputrec_->init_step, &bPMETunePrinting_);
 }
 
 void PmeLoadBalanceHelper::teardown()
@@ -133,8 +126,7 @@ const pme_load_balancing_t* PmeLoadBalanceHelper::loadBalancingObject()
 SignallerCallbackPtr PmeLoadBalanceHelper::registerNSCallback()
 {
     return std::make_unique<SignallerCallback>(
-            [this](Step step, Time gmx_unused time)
-            {nextNSStep_ = step; });
+            [this](Step step, Time gmx_unused time) { nextNSStep_ = step; });
 }
 
-}  // namespace gmx
+} // namespace gmx