Commit 4e31d622 authored by Stan Moore's avatar Stan Moore
Browse files

Whitespace and comment cleanup

parent cd61cfe8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ struct TagPairSNAPBeta{};
struct TagPairSNAPComputeNeigh{};
struct TagPairSNAPPreUi{};
struct TagPairSNAPComputeUi{};
struct TagPairSNAPComputeUiTot{}; // new --- accumulate ulist into ulisttot separately
struct TagPairSNAPComputeUiTot{}; // accumulate ulist into ulisttot separately
struct TagPairSNAPComputeUiCPU{}; 
struct TagPairSNAPComputeZi{};
struct TagPairSNAPComputeBi{};
+13 −20
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
#include "kokkos.h"
#include "sna.h"

#include <chrono>

#define MAXLINE 1024
#define MAXWORD 3
@@ -196,25 +195,19 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)

  if (beta_max < inum) {
    beta_max = inum;
    // changed data layout to reflect new threading pattern
    //d_beta = Kokkos::View<F_FLOAT**, DeviceType>("PairSNAPKokkos:beta",inum,ncoeff);
    d_beta = Kokkos::View<F_FLOAT**, DeviceType>("PairSNAPKokkos:beta",ncoeff,inum);
    d_ninside = Kokkos::View<int*, DeviceType>("PairSNAPKokkos:ninside",inum);
  }

  chunk_size = MIN(chunksize,inum);
  chunk_size = MIN(chunksize,inum); // "chunksize" variable is set by user
  chunk_offset = 0;

  snaKK.grow_rij(chunk_size,max_neighs);

  EV_FLOAT ev;

  // lazy design
  int idxu_max = snaKK.idxu_max;

  int world_rank;
  MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);

  while (chunk_offset < inum) { // chunk up loop to prevent running out of memory

    EV_FLOAT ev_tmp;
+20 −22
Original line number Diff line number Diff line
@@ -624,7 +624,6 @@ void SNAKokkos<DeviceType>::compute_deidrj_cpu(const typename Kokkos::TeamPolicy

/* ----------------------------------------------------------------------
   compute Bi by summing conj(Ui)*Zi
   not updated yet
------------------------------------------------------------------------- */

template<class DeviceType>
@@ -798,7 +797,7 @@ void SNAKokkos<DeviceType>::compute_uarray(const typename Kokkos::TeamPolicy<Dev
  // VMK Section 4.8.2

  // All writes go to global memory and shared memory
  // so we can avoid all global memory reads!
  // so we can avoid all global memory reads
  Kokkos::single(Kokkos::PerThread(team), [=]() {
    ulist(0,iatom,jnbor) = { 1.0, 0.0 };
    buf1[max_m_tile*team_rank] = {1.,0.};
@@ -884,7 +883,6 @@ void SNAKokkos<DeviceType>::compute_uarray(const typename Kokkos::TeamPolicy<Dev
    auto tmp = buf1; buf1 = buf2; buf2 = tmp;
    //std::swap(buf1, buf2); // throws warnings


  }
}