diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index e4df428881..26ecd0dd36 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -299,10 +299,10 @@ void PairSNAPKokkos::compute(int eflag_in, int Kokkos::DefaultExecutionSpace::scratch_memory_space, Kokkos::MemoryTraits > ScratchViewType; - int scratch_size = ScratchViewType::shmem_size( team_size * max_neighs ); + int scratch_size = ScratchViewType::shmem_size(team_size * max_neighs); typename Kokkos::TeamPolicy policy_neigh(chunk_size,team_size,vector_length); - policy_neigh = policy_neigh.set_scratch_size(0, Kokkos::PerTeam( scratch_size )); + policy_neigh = policy_neigh.set_scratch_size(0, Kokkos::PerTeam(scratch_size)); Kokkos::parallel_for("ComputeNeigh",policy_neigh,*this); } @@ -334,7 +334,7 @@ void PairSNAPKokkos::compute(int eflag_in, int Kokkos::DefaultExecutionSpace::scratch_memory_space, Kokkos::MemoryTraits > ScratchViewType; - int scratch_size = ScratchViewType::shmem_size( team_size * tile_size ); + int scratch_size = ScratchViewType::shmem_size(team_size * tile_size); // total number of teams needed int chunk_size_div = (chunk_size + vector_length - 1) / vector_length; @@ -344,7 +344,7 @@ void PairSNAPKokkos::compute(int eflag_in, int int n_teams_div = (n_teams + team_size - 1) / team_size; typename Kokkos::TeamPolicy policy_ui(n_teams_div, team_size, vector_length); - policy_ui = policy_ui.set_scratch_size(0, Kokkos::PerTeam( scratch_size )); + policy_ui = policy_ui.set_scratch_size(0, Kokkos::PerTeam(scratch_size)); Kokkos::parallel_for("ComputeUi",policy_ui,*this); @@ -401,7 +401,7 @@ void PairSNAPKokkos::compute(int eflag_in, int Kokkos::DefaultExecutionSpace::scratch_memory_space, Kokkos::MemoryTraits > ScratchViewType; - int scratch_size = ScratchViewType::shmem_size( 2 * team_size * tile_size ); + int scratch_size = ScratchViewType::shmem_size(2 * team_size * tile_size); // total number of teams needed int chunk_size_div = (chunk_size + vector_length - 1) / vector_length; @@ -411,7 +411,7 @@ void PairSNAPKokkos::compute(int eflag_in, int int n_teams_div = (n_teams + team_size - 1) / team_size; typename Kokkos::TeamPolicy policy_fused_deidrj(n_teams_div,team_size,vector_length); - policy_fused_deidrj = policy_fused_deidrj.set_scratch_size(0, Kokkos::PerTeam( scratch_size )); + policy_fused_deidrj = policy_fused_deidrj.set_scratch_size(0, Kokkos::PerTeam(scratch_size)); for (int k = 0; k < 3; k++) { snaKK.set_dir(k); @@ -631,7 +631,7 @@ void PairSNAPKokkos::operator() (TagPairSNAPCom const int tile_size = max_neighs; // number of elements per thread const int team_rank = team.team_rank(); const int scratch_shift = team_rank * tile_size; // offset into pointer for entire team - int* type_cache = (int*)team.team_shmem( ).get_shmem(team.team_size() * tile_size * sizeof(int), 0) + scratch_shift; + int* type_cache = (int*)team.team_shmem().get_shmem(team.team_size() * tile_size * sizeof(int), 0) + scratch_shift; // Load various info about myself up front const int i = d_ilist[ii + chunk_offset]; @@ -668,7 +668,7 @@ void PairSNAPKokkos::operator() (TagPairSNAPCom type_cache[jj] = jtype; - if ( jtype >= 0 ) + if (jtype >= 0) count++; }, ninside); @@ -679,7 +679,7 @@ void PairSNAPKokkos::operator() (TagPairSNAPCom const int jtype = type_cache[jj]; - if ( jtype >= 0 ) { + if (jtype >= 0) { if (final) { T_INT j = d_neighbors(i,jj); const F_FLOAT dx = x(j,0) - xtmp; @@ -778,7 +778,7 @@ void PairSNAPKokkos::operator() (TagPairSNAPTra if (mapper.flip_sign == 1) { utot_im = -utot_im; - } else if (mapper.flip_sign == -1 ) { + } else if (mapper.flip_sign == -1) { utot_re = -utot_re; } @@ -957,7 +957,7 @@ void PairSNAPKokkos::operator() (TagPairSNAPCom const int jtype = type(j); const F_FLOAT rsq = dx*dx + dy*dy + dz*dz; - if ( rsq < rnd_cutsq(itype,jtype) ) + if (rsq < rnd_cutsq(itype,jtype)) count++; }); },ninside); @@ -977,7 +977,7 @@ void PairSNAPKokkos::operator() (TagPairSNAPCom const F_FLOAT rsq = dx*dx + dy*dy + dz*dz; const int elem_j = d_map[jtype]; - if ( rsq < rnd_cutsq(itype,jtype) ) { + if (rsq < rnd_cutsq(itype,jtype)) { if (final) { my_sna.rij(ii,offset,0) = static_cast(dx); my_sna.rij(ii,offset,1) = static_cast(dy); diff --git a/src/KOKKOS/sna_kokkos_impl.h b/src/KOKKOS/sna_kokkos_impl.h index e88ae1f0b3..ed80647083 100644 --- a/src/KOKKOS/sna_kokkos_impl.h +++ b/src/KOKKOS/sna_kokkos_impl.h @@ -496,7 +496,7 @@ void SNAKokkos::compute_ui(const typename Kokko const int scratch_shift = team_rank * tile_size; // extract and wrap - WignerWrapper ulist_wrapper((complex*)team.team_shmem( ).get_shmem(team.team_size() * tile_size * sizeof(complex), 0) + scratch_shift, iatom_mod); + WignerWrapper ulist_wrapper((complex*)team.team_shmem().get_shmem(team.team_size() * tile_size * sizeof(complex), 0) + scratch_shift, iatom_mod); // load parameters @@ -900,8 +900,8 @@ void SNAKokkos::compute_fused_deidrj(const type const int scratch_shift = team_rank * tile_size; // extract, wrap shared memory buffer - WignerWrapper ulist_wrapper((complex*)team.team_shmem( ).get_shmem(team.team_size() * tile_size * sizeof(complex), 0) + scratch_shift, iatom_mod); - WignerWrapper dulist_wrapper((complex*)team.team_shmem( ).get_shmem(team.team_size() * tile_size * sizeof(complex), 0) + scratch_shift, iatom_mod); + WignerWrapper ulist_wrapper((complex*)team.team_shmem().get_shmem(team.team_size() * tile_size * sizeof(complex), 0) + scratch_shift, iatom_mod); + WignerWrapper dulist_wrapper((complex*)team.team_shmem().get_shmem(team.team_size() * tile_size * sizeof(complex), 0) + scratch_shift, iatom_mod); // load parameters const auto a = a_pack(iatom_mod, jnbor, iatom_div); @@ -1335,7 +1335,7 @@ void SNAKokkos::compute_yi_cpu(int iter, int jju1 = idxu_block[j1] + (j1 + 1) * mb1min; int jju2 = idxu_block[j2] + (j2 + 1) * mb2max; - int icgb = mb1min * (j2 +1 ) + mb2max; + int icgb = mb1min * (j2 +1) + mb2max; for (int ib = 0; ib < nb; ib++) {