From 3bbedb1cd92d0c26365e64903b832af64a1c3630 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Fri, 22 Jan 2021 08:55:20 -0700 Subject: [PATCH] whitespace --- src/KOKKOS/fix_dpd_energy_kokkos.cpp | 2 +- src/KOKKOS/fix_momentum_kokkos.cpp | 10 +++++----- src/KOKKOS/fix_shake_kokkos.cpp | 12 ++++++++---- src/KOKKOS/fix_shardlow_kokkos.cpp | 3 ++- src/KOKKOS/nbin_ssa_kokkos.cpp | 6 +++--- src/KOKKOS/npair_ssa_kokkos.cpp | 4 ++-- src/KOKKOS/pair_table_rx_kokkos.cpp | 6 +++--- 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/KOKKOS/fix_dpd_energy_kokkos.cpp b/src/KOKKOS/fix_dpd_energy_kokkos.cpp index 5c04fa5230..f5231cd24c 100644 --- a/src/KOKKOS/fix_dpd_energy_kokkos.cpp +++ b/src/KOKKOS/fix_dpd_energy_kokkos.cpp @@ -59,7 +59,7 @@ void FixDPDenergyKokkos::take_half_step() auto dt = update->dt; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), - LAMMPS_LAMBDA(int i) { + LAMMPS_LAMBDA(int i) { uCond(i) += 0.5*dt*duCond(i); uMech(i) += 0.5*dt*duMech(i); }); diff --git a/src/KOKKOS/fix_momentum_kokkos.cpp b/src/KOKKOS/fix_momentum_kokkos.cpp index 01c87a0332..25900e80c9 100644 --- a/src/KOKKOS/fix_momentum_kokkos.cpp +++ b/src/KOKKOS/fix_momentum_kokkos.cpp @@ -60,7 +60,7 @@ static double get_kinetic_energy( atomKK->sync(execution_space, RMASS_MASK); typename AT::t_float_1d_randomread rmass = atomKK->k_rmass.view(); Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal), - LAMMPS_LAMBDA(int i, double& update) { + LAMMPS_LAMBDA(int i, double& update) { if (mask(i) & groupbit) update += rmass(i) * (v(i,0)*v(i,0) + v(i,1)*v(i,1) + v(i,2)*v(i,2)); @@ -71,7 +71,7 @@ static double get_kinetic_energy( typename AT::t_int_1d_randomread type = atomKK->k_type.view(); typename AT::t_float_1d_randomread mass = atomKK->k_mass.view(); Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal), - LAMMPS_LAMBDA(int i, double& update) { + LAMMPS_LAMBDA(int i, double& update) { if (mask(i) & groupbit) update += mass(type(i)) * (v(i,0)*v(i,0) + v(i,1)*v(i,1) + v(i,2)*v(i,2)); @@ -124,7 +124,7 @@ void FixMomentumKokkos::end_of_step() auto zflag2 = zflag; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), - LAMMPS_LAMBDA(int i) { + LAMMPS_LAMBDA(int i) { if (mask(i) & groupbit2) { if (xflag2) v(i,0) -= vcm[0]; if (yflag2) v(i,1) -= vcm[1]; @@ -163,7 +163,7 @@ void FixMomentumKokkos::end_of_step() auto h = Few(domain->h); auto triclinic = domain->triclinic; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), - LAMMPS_LAMBDA(int i) { + LAMMPS_LAMBDA(int i) { if (mask[i] & groupbit2) { Few x_i; x_i[0] = x(i,0); @@ -190,7 +190,7 @@ void FixMomentumKokkos::end_of_step() double factor = 1.0; if (ekin_new != 0.0) factor = sqrt(ekin_old/ekin_new); Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), - LAMMPS_LAMBDA(int i) { + LAMMPS_LAMBDA(int i) { if (mask(i) & groupbit2) { v(i,0) *= factor; v(i,1) *= factor; diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 0a3e1614db..b680f558fc 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -242,7 +242,8 @@ void FixShakeKokkos::pre_neighbor() auto d_nlist = this->d_nlist; auto map_array = this->map_array; - Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), LAMMPS_LAMBDA(const int& i) { + Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), + LAMMPS_LAMBDA(const int& i) { if (d_shake_flag[i]) { if (d_shake_flag[i] == 2) { const int atom1 = map_array(d_shake_atom(i,0)); @@ -480,7 +481,8 @@ int FixShakeKokkos::dof(int igroup) auto mask = this->d_mask; auto groupbit = group->bitmask[igroup]; - Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal), LAMMPS_LAMBDA(const int& i, int& n) { + Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nlocal), + LAMMPS_LAMBDA(const int& i, int& n) { if (!(mask[i] & groupbit)) return; if (d_shake_flag[i] == 0) return; if (d_shake_atom(i,0) != tag[i]) return; @@ -536,7 +538,8 @@ void FixShakeKokkos::unconstrained_update() auto rmass = this->d_rmass; - Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), LAMMPS_LAMBDA(const int& i) { + Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), + LAMMPS_LAMBDA(const int& i) { if (d_shake_flag[i]) { const double dtfmsq = dtfsq / rmass[i]; d_xshake(i,0) = x(i,0) + dtv*v(i,0) + dtfmsq*f(i,0); @@ -549,7 +552,8 @@ void FixShakeKokkos::unconstrained_update() auto mass = this->d_mass; auto type = this->d_type; - Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), LAMMPS_LAMBDA(const int& i) { + Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal), + LAMMPS_LAMBDA(const int& i) { if (d_shake_flag[i]) { const double dtfmsq = dtfsq / mass[type[i]]; d_xshake(i,0) = x(i,0) + dtv*v(i,0) + dtfmsq*f(i,0); diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index b685bc0089..029740a305 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -653,7 +653,8 @@ void FixShardlowKokkos::initial_integrate(int /*vflag*/) atomKK->sync(execution_space,UCOND_MASK | UMECH_MASK); auto l_uCond = uCond; auto l_uMech = uMech; - Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nlocal+nghost), LAMMPS_LAMBDA (const int i) { + Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nlocal+nghost), + LAMMPS_LAMBDA (const int i) { l_uCond(i) = 0.0; l_uMech(i) = 0.0; }); diff --git a/src/KOKKOS/nbin_ssa_kokkos.cpp b/src/KOKKOS/nbin_ssa_kokkos.cpp index f813b62ca3..81cc26581e 100644 --- a/src/KOKKOS/nbin_ssa_kokkos.cpp +++ b/src/KOKKOS/nbin_ssa_kokkos.cpp @@ -159,7 +159,7 @@ void NBinSSAKokkos::bin_atoms() auto gbins_ = gbins; Kokkos::parallel_for(Kokkos::RangePolicy(nlocal,nall), - LAMMPS_LAMBDA (const int i) { + LAMMPS_LAMBDA (const int i) { const int iAIR = binID_(i); if (iAIR > 0) { // include only ghost atoms in an AIR const int ac = Kokkos::atomic_fetch_add(&gbincount_[iAIR], (int)1); @@ -167,7 +167,7 @@ void NBinSSAKokkos::bin_atoms() } }); Kokkos::parallel_for(Kokkos::RangePolicy(1,8), - LAMMPS_LAMBDA (const int i) { + LAMMPS_LAMBDA (const int i) { sortBin(gbincount_, gbins_, i); }); } @@ -191,7 +191,7 @@ void NBinSSAKokkos::bin_atoms() Kokkos::parallel_for(nlocal, f); Kokkos::parallel_for(Kokkos::RangePolicy(0,mbins), - LAMMPS_LAMBDA (const int i) { + LAMMPS_LAMBDA (const int i) { sortBin(bincount_, bins_, i); }); } diff --git a/src/KOKKOS/npair_ssa_kokkos.cpp b/src/KOKKOS/npair_ssa_kokkos.cpp index 4a4b401214..34f0d501ce 100644 --- a/src/KOKKOS/npair_ssa_kokkos.cpp +++ b/src/KOKKOS/npair_ssa_kokkos.cpp @@ -461,7 +461,7 @@ fprintf(stdout, "tota%03d total %3d could use %6d inums, expected %6d inums. inu // loop over bins with local atoms, storing half of the neighbors Kokkos::parallel_for(Kokkos::RangePolicy(0,ssa_phaseCt), - LAMMPS_LAMBDA (const int workPhase) { + LAMMPS_LAMBDA (const int workPhase) { data.build_locals_onePhase(firstTry, comm->me, workPhase); }); k_ssa_itemLoc.modify(); @@ -475,7 +475,7 @@ fprintf(stdout, "tota%03d total %3d could use %6d inums, expected %6d inums. inu // loop over AIR ghost atoms, storing their local neighbors Kokkos::parallel_for(Kokkos::RangePolicy(0,ssa_gphaseCt), - LAMMPS_LAMBDA (const int workPhase) { + LAMMPS_LAMBDA (const int workPhase) { data.build_ghosts_onePhase(workPhase); }); k_ssa_gitemLoc.modify(); diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index 7f0bb90d62..c3e23b6e5e 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -573,7 +573,7 @@ static void compute_all_items( Kokkos::MemoryTraits::value> > v_eatom) { if (eflag || vflag) { Kokkos::parallel_reduce(Kokkos::RangePolicy(0,inum), - LAMMPS_LAMBDA(int i, EV_FLOAT& energy_virial) { + LAMMPS_LAMBDA(int i, EV_FLOAT& energy_virial) { energy_virial += compute_item( i, nlocal, d_ilist, d_neighbors, d_numneigh, x, type, @@ -584,7 +584,7 @@ static void compute_all_items( }, ev); } else { Kokkos::parallel_for(Kokkos::RangePolicy(0,inum), - LAMMPS_LAMBDA(int i) { + LAMMPS_LAMBDA(int i) { compute_item( i, nlocal, d_ilist, d_neighbors, d_numneigh, x, type, mixWtSite1old, mixWtSite2old, mixWtSite1, mixWtSite2, @@ -607,7 +607,7 @@ static void getAllMixingWeights( Kokkos::View const& mixWtSite1, Kokkos::View const& mixWtSite2) { Kokkos::parallel_for(Kokkos::RangePolicy(0,ntotal), - LAMMPS_LAMBDA(int i) { + LAMMPS_LAMBDA(int i) { getMixingWeights(dvector,nspecies,isite1,isite2,fractionalWeighting, i, mixWtSite1old(i), mixWtSite2old(i), mixWtSite1(i), mixWtSite2(i)); });