From 5bc18931af694a5e0ad49795ac980f9f9e2ba521 Mon Sep 17 00:00:00 2001 From: "Aidan P. Thompson" Date: Wed, 11 Feb 2026 15:37:49 -0700 Subject: [PATCH 1/4] Added correct-functioning Kokkosized version of pair lj/cubic --- doc/src/pair_lj_cubic.rst | 3 +- src/EXTRA-PAIR/pair_lj_cubic.cpp | 4 +- src/EXTRA-PAIR/pair_lj_cubic.h | 2 +- src/KOKKOS/pair_lj_cubic_kokkos.cpp | 300 ++++++++++++++++++++++++++++ src/KOKKOS/pair_lj_cubic_kokkos.h | 130 ++++++++++++ 5 files changed, 436 insertions(+), 3 deletions(-) create mode 100644 src/KOKKOS/pair_lj_cubic_kokkos.cpp create mode 100644 src/KOKKOS/pair_lj_cubic_kokkos.h diff --git a/doc/src/pair_lj_cubic.rst b/doc/src/pair_lj_cubic.rst index d6470b26bee..6bf2c902008 100644 --- a/doc/src/pair_lj_cubic.rst +++ b/doc/src/pair_lj_cubic.rst @@ -1,11 +1,12 @@ .. index:: pair_style lj/cubic .. index:: pair_style lj/cubic/gpu +.. index:: pair_style lj/cubic/kk .. index:: pair_style lj/cubic/omp pair_style lj/cubic command =========================== -Accelerator Variants: *lj/cubic/gpu*, *lj/cubic/omp* +Accelerator Variants: *lj/cubic/gpu*, *lj/cubic/kk*, *lj/cubic/omp* Syntax """""" diff --git a/src/EXTRA-PAIR/pair_lj_cubic.cpp b/src/EXTRA-PAIR/pair_lj_cubic.cpp index 03406ca8dae..4390aa8ae9c 100644 --- a/src/EXTRA-PAIR/pair_lj_cubic.cpp +++ b/src/EXTRA-PAIR/pair_lj_cubic.cpp @@ -40,7 +40,9 @@ PairLJCubic::PairLJCubic(LAMMPS *_lmp) : Pair(_lmp) {} PairLJCubic::~PairLJCubic() { - if (allocated) { + if (copymode) return; + + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); diff --git a/src/EXTRA-PAIR/pair_lj_cubic.h b/src/EXTRA-PAIR/pair_lj_cubic.h index 02328d901d4..dac5cb0f505 100644 --- a/src/EXTRA-PAIR/pair_lj_cubic.h +++ b/src/EXTRA-PAIR/pair_lj_cubic.h @@ -45,7 +45,7 @@ class PairLJCubic : public Pair { double **epsilon, **sigma; double **lj1, **lj2, **lj3, **lj4; - void allocate(); + virtual void allocate(); }; } // namespace LAMMPS_NS diff --git a/src/KOKKOS/pair_lj_cubic_kokkos.cpp b/src/KOKKOS/pair_lj_cubic_kokkos.cpp new file mode 100644 index 00000000000..c219bd45d32 --- /dev/null +++ b/src/KOKKOS/pair_lj_cubic_kokkos.cpp @@ -0,0 +1,300 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Ray Shan (SNL) +------------------------------------------------------------------------- */ + +#include "pair_lj_cubic_kokkos.h" + +#include "atom_kokkos.h" +#include "atom_masks.h" +#include "error.h" +#include "force.h" +#include "kokkos.h" +#include "memory_kokkos.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "respa.h" +#include "update.h" + +#include +#include + +#include "pair_lj_cubic_const.h" + +using namespace LAMMPS_NS; +using namespace PairLJCubicConstants; + +/* ---------------------------------------------------------------------- */ + +template +PairLJCubicKokkos::PairLJCubicKokkos(LAMMPS *lmp):PairLJCubic(lmp) +{ + respa_enable = 0; + + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + datamask_read = X_MASK | F_MASK | TYPE_MASK | Q_MASK | ENERGY_MASK | VIRIAL_MASK; + datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairLJCubicKokkos::~PairLJCubicKokkos() +{ + if (copymode) return; + + if (allocated) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->destroy_kokkos(k_cutsq,cutsq); + memoryKK->destroy_kokkos(k_cut_inner,cut_inner); + memoryKK->destroy_kokkos(k_cut_inner_sq,cut_inner_sq); + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairLJCubicKokkos::compute(int eflag_in, int vflag_in) +{ + eflag = eflag_in; + vflag = vflag_in; + + if (neighflag == FULL) no_virial_fdotr_compute = 1; + + ev_init(eflag,vflag,0); + + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.view(); + } + + atomKK->sync(execution_space,datamask_read); + k_cutsq.template sync(); + k_cut_inner.template sync(); + k_cut_inner_sq.template sync(); + k_params.template sync(); + if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); + else atomKK->modified(execution_space,F_MASK); + + x = atomKK->k_x.view(); + c_x = atomKK->k_x.view(); + f = atomKK->k_f.view(); + q = atomKK->k_q.view(); + type = atomKK->k_type.view(); + nlocal = atom->nlocal; + nall = atom->nlocal + atom->nghost; + special_lj[0] = static_cast(force->special_lj[0]); + special_lj[1] = static_cast(force->special_lj[1]); + special_lj[2] = static_cast(force->special_lj[2]); + special_lj[3] = static_cast(force->special_lj[3]); + newton_pair = force->newton_pair; + + // loop over neighbors of my atoms + + copymode = 1; + + EV_FLOAT ev = pair_compute,void >(this,(NeighListKokkos*)list); + + if (eflag_global) eng_vdwl += static_cast(ev.evdwl); + if (vflag_global) { + virial[0] += static_cast(ev.v[0]); + virial[1] += static_cast(ev.v[1]); + virial[2] += static_cast(ev.v[2]); + virial[3] += static_cast(ev.v[3]); + virial[4] += static_cast(ev.v[4]); + virial[5] += static_cast(ev.v[5]); + } + + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.sync_host(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.sync_host(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + copymode = 0; +} + +/* ---------------------------------------------------------------------- + compute LJ cubic pair force between atoms i and j + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +KK_FLOAT PairLJCubicKokkos:: +compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, + const int& itype, const int& jtype) const { + KK_FLOAT forcelj; + const KK_FLOAT r2inv = static_cast(1.0) / rsq; + + if (rsq <= (STACKPARAMS?m_params[itype][jtype].cut_inner_sq:params(itype,jtype).cut_inner_sq)) { + const KK_FLOAT r6inv = r2inv*r2inv*r2inv; + forcelj = r6inv * + ((STACKPARAMS?m_params[itype][jtype].lj1:params(itype,jtype).lj1)*r6inv - + (STACKPARAMS?m_params[itype][jtype].lj2:params(itype,jtype).lj2)); + } else { + const KK_FLOAT r = sqrt(rsq); + const KK_FLOAT rmin = (STACKPARAMS?m_params[itype][jtype].sigma:params(itype,jtype).sigma) * RT6TWO; + const KK_FLOAT t = (r - (STACKPARAMS?m_params[itype][jtype].cut_inner:params(itype,jtype).cut_inner)) / rmin; + forcelj = (STACKPARAMS?m_params[itype][jtype].epsilon:params(itype,jtype).epsilon) * + (static_cast(-DPHIDS) + static_cast(A3) * t * t / static_cast(2.0)) * r / rmin; + } + return forcelj*r2inv; +} + +/* ---------------------------------------------------------------------- + compute LJ cubic pair potential energy between atoms i and j + ---------------------------------------------------------------------- */ +template +template +KOKKOS_INLINE_FUNCTION +KK_FLOAT PairLJCubicKokkos:: +compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, + const int& itype, const int& jtype) const { + KK_FLOAT englj; + + const KK_FLOAT r2inv = 1.0/rsq; + + if (rsq <= (STACKPARAMS?m_params[itype][jtype].cut_inner_sq:params(itype,jtype).cut_inner_sq)) { + const KK_FLOAT r6inv = r2inv*r2inv*r2inv; + englj = r6inv * + ((STACKPARAMS?m_params[itype][jtype].lj3:params(itype,jtype).lj3)*r6inv - + (STACKPARAMS?m_params[itype][jtype].lj4:params(itype,jtype).lj4)); + } else { + const KK_FLOAT r = sqrt(rsq); + const KK_FLOAT rmin = (STACKPARAMS?m_params[itype][jtype].sigma:params(itype,jtype).sigma) * RT6TWO; + const KK_FLOAT t = (r - (STACKPARAMS?m_params[itype][jtype].cut_inner:params(itype,jtype).cut_inner)) / rmin; + englj = (STACKPARAMS?m_params[itype][jtype].epsilon:params(itype,jtype).epsilon) * + (static_cast(PHIS) + static_cast(DPHIDS) * t - static_cast(A3) * t * t * t/ static_cast(6.0)); + } + return englj; +} + +/* ---------------------------------------------------------------------- + allocate all arrays +------------------------------------------------------------------------- */ + +template +void PairLJCubicKokkos::allocate() +{ + PairLJCubic::allocate(); + + int n = atom->ntypes; + + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + + memory->destroy(cut_inner); + memoryKK->create_kokkos(k_cut_inner,cut_inner,n+1,n+1,"pair:cut_inner"); + d_cut_inner = k_cut_inner.template view(); + + memory->destroy(cut_inner_sq); + memoryKK->create_kokkos(k_cut_inner_sq,cut_inner_sq,n+1,n+1,"pair:cut_inner_sq"); + d_cut_inner_sq = k_cut_inner_sq.template view(); + + k_params = Kokkos::DualView("PairLJCubic::params",n+1,n+1); + params = k_params.template view(); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +template +void PairLJCubicKokkos::init_style() +{ + PairLJCubic::init_style(); + + // error if rRESPA with inner levels + + if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) { + int respa = 0; + if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; + if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; + if (respa) + error->all(FLERR,"Cannot use Kokkos pair style with rRESPA inner/middle"); + } + + // adjust neighbor list request for KOKKOS + + neighflag = lmp->kokkos->neighflag; + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same_v && + !std::is_same_v); + request->set_kokkos_device(std::is_same_v); + if (neighflag == FULL) request->enable_full(); +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairLJCubicKokkos::init_one(int i, int j) +{ + double cutone = PairLJCubic::init_one(i,j); + double cut_inner_sqm = cut_inner_sq[i][j]; + + k_params.view_host()(i,j).lj1 = static_cast(lj1[i][j]); + k_params.view_host()(i,j).lj2 = static_cast(lj2[i][j]); + k_params.view_host()(i,j).lj3 = static_cast(lj3[i][j]); + k_params.view_host()(i,j).lj4 = static_cast(lj4[i][j]); + k_params.view_host()(i,j).cut_inner_sq = cut_inner_sqm; + k_params.view_host()(i,j).cut_inner = static_cast(cut_inner[i][j]); + k_params.view_host()(i,j).epsilon = static_cast(epsilon[i][j]); +k_params.view_host()(i,j).sigma = static_cast(sigma[i][j]); + + k_params.view_host()(j,i) = k_params.view_host()(i,j); + if (i(cutone*cutone); + m_cut_inner_sq[j][i] = m_cut_inner_sq[i][j] = cut_inner_sqm; + } + + k_cutsq.view_host()(i,j) = k_cutsq.view_host()(j,i) = static_cast(cutone*cutone); + k_cutsq.modify_host(); + k_cut_inner_sq.view_host()(i,j) = k_cut_inner_sq.view_host()(j,i) = cut_inner_sqm; + k_cut_inner_sq.modify_host(); + k_params.modify_host(); + + return cutone; +} + +namespace LAMMPS_NS { +template class PairLJCubicKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairLJCubicKokkos; +#endif +} + diff --git a/src/KOKKOS/pair_lj_cubic_kokkos.h b/src/KOKKOS/pair_lj_cubic_kokkos.h new file mode 100644 index 00000000000..cc8f3942525 --- /dev/null +++ b/src/KOKKOS/pair_lj_cubic_kokkos.h @@ -0,0 +1,130 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(lj/cubic/kk,PairLJCubicKokkos); +PairStyle(lj/cubic/kk/device,PairLJCubicKokkos); +PairStyle(lj/cubic/kk/host,PairLJCubicKokkos); +// clang-format on +#else + +// clang-format off +#ifndef LMP_PAIR_LJ_CUBIC_KOKKOS_H +#define LMP_PAIR_LJ_CUBIC_KOKKOS_H + +#include "pair_kokkos.h" +#include "pair_lj_cubic.h" +#include "neigh_list_kokkos.h" + +namespace LAMMPS_NS { + +template +class PairLJCubicKokkos : public PairLJCubic { + public: + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; + enum {COUL_FLAG=0}; + typedef DeviceType device_type; + typedef ArrayTypes AT; + PairLJCubicKokkos(class LAMMPS *); + ~PairLJCubicKokkos() override; + + void compute(int, int) override; + + void init_style() override; + double init_one(int, int) override; + + struct params_lj{ + KOKKOS_INLINE_FUNCTION + params_lj() {cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;epsilon=0;sigma=0;}; + KOKKOS_INLINE_FUNCTION + params_lj(int /*i*/) {cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;epsilon=0;sigma=0;}; + KK_FLOAT cut_inner_sq,cut_inner,lj1,lj2,lj3,lj4,epsilon,sigma; + }; + + protected: + template + KOKKOS_INLINE_FUNCTION + KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, + const int& itype, const int& jtype) const; + + template + KOKKOS_INLINE_FUNCTION + KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, + const int& itype, const int& jtype) const; + + template + KOKKOS_INLINE_FUNCTION + KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, + const int& /*itype*/, const int& /*jtype*/) const { return 0; } + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + // hardwired to space for 12 atom types + params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + + KK_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + double m_cut_inner[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + double m_cut_inner_sq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + typename AT::t_kkfloat_1d_3_lr_randomread x; + typename AT::t_kkfloat_1d_3_lr c_x; + typename AT::t_kkacc_1d_3 f; + typename AT::t_int_1d_randomread type; + typename AT::t_kkfloat_1d_randomread q; + + DAT::ttransform_kkacc_1d k_eatom; + DAT::ttransform_kkacc_1d_6 k_vatom; + typename AT::t_kkacc_1d d_eatom; + typename AT::t_kkacc_1d_6 d_vatom; + + int newton_pair; + + DAT::ttransform_kkfloat_2d k_cutsq; + typename AT::t_kkfloat_2d d_cutsq; + DAT::ttransform_kkfloat_2d k_cut_inner; + typename AT::t_kkfloat_2d d_cut_inner; + DAT::ttransform_kkfloat_2d k_cut_inner_sq; + typename AT::t_kkfloat_2d d_cut_inner_sq; + + typename AT::t_kkfloat_1d_randomread + d_rtable, d_drtable, d_ftable, d_dftable, + d_ctable, d_dctable, d_etable, d_detable; + + int neighflag; + int nlocal,nall,eflag,vflag; + + void allocate() override; + + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend struct PairComputeFunctor; + friend EV_FLOAT pair_compute_neighlist(PairLJCubicKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist(PairLJCubicKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist(PairLJCubicKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist(PairLJCubicKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute(PairLJCubicKokkos*,NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairLJCubicKokkos*); + +}; + +} + +#endif +#endif + From 43a7d857fa2b8e967fce99615c7f73d68fbf977b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 20:55:20 -0500 Subject: [PATCH 2/4] flag that pair style support KOKKOS --- doc/src/Commands_pair.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index 73d3d9c4554..1a239ce4d2a 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -149,7 +149,7 @@ OPT. * :doc:`lj/class2/coul/long/cs ` * :doc:`lj/class2/coul/long/soft ` * :doc:`lj/class2/soft ` - * :doc:`lj/cubic (go) ` + * :doc:`lj/cubic (gko) ` * :doc:`lj/cut (gikot) ` * :doc:`lj/cut/coul/cut (gko) ` * :doc:`lj/cut/coul/cut/dielectric (o) ` From 121cbb0dd81c28a5de2d051b76b80439524b2c7e Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 18 Feb 2026 08:18:09 -0700 Subject: [PATCH 3/4] small tweaks --- src/EXTRA-PAIR/pair_lj_cubic.cpp | 4 ++-- src/KOKKOS/pair_lj_cubic_kokkos.cpp | 4 ++-- src/KOKKOS/pair_lj_cubic_kokkos.h | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/EXTRA-PAIR/pair_lj_cubic.cpp b/src/EXTRA-PAIR/pair_lj_cubic.cpp index 4390aa8ae9c..50136414bad 100644 --- a/src/EXTRA-PAIR/pair_lj_cubic.cpp +++ b/src/EXTRA-PAIR/pair_lj_cubic.cpp @@ -40,9 +40,9 @@ PairLJCubic::PairLJCubic(LAMMPS *_lmp) : Pair(_lmp) {} PairLJCubic::~PairLJCubic() { - if (copymode) return; + if (copymode) return; - if (allocated) { + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); diff --git a/src/KOKKOS/pair_lj_cubic_kokkos.cpp b/src/KOKKOS/pair_lj_cubic_kokkos.cpp index c219bd45d32..0ce971e8171 100644 --- a/src/KOKKOS/pair_lj_cubic_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cubic_kokkos.cpp @@ -13,7 +13,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Ray Shan (SNL) + Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ #include "pair_lj_cubic_kokkos.h" @@ -273,7 +273,7 @@ double PairLJCubicKokkos::init_one(int i, int j) k_params.view_host()(i,j).cut_inner_sq = cut_inner_sqm; k_params.view_host()(i,j).cut_inner = static_cast(cut_inner[i][j]); k_params.view_host()(i,j).epsilon = static_cast(epsilon[i][j]); -k_params.view_host()(i,j).sigma = static_cast(sigma[i][j]); + k_params.view_host()(i,j).sigma = static_cast(sigma[i][j]); k_params.view_host()(j,i) = k_params.view_host()(i,j); if (i(PairLJCubicKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJCubicKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairLJCubicKokkos*); - }; } From 5f35a25e9d531928efbb91b7f259e3182ca90fac Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 18 Feb 2026 13:54:45 -0500 Subject: [PATCH 4/4] programming style --- src/KOKKOS/pair_lj_cubic_kokkos.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/KOKKOS/pair_lj_cubic_kokkos.h b/src/KOKKOS/pair_lj_cubic_kokkos.h index d6c7ea9cc6c..3095890e0a7 100644 --- a/src/KOKKOS/pair_lj_cubic_kokkos.h +++ b/src/KOKKOS/pair_lj_cubic_kokkos.h @@ -55,18 +55,18 @@ class PairLJCubicKokkos : public PairLJCubic { protected: template KOKKOS_INLINE_FUNCTION - KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, - const int& itype, const int& jtype) const; + KK_FLOAT compute_fpair(const KK_FLOAT &rsq, const int &i, const int &j, + const int &itype, const int &jtype) const; template KOKKOS_INLINE_FUNCTION - KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, - const int& itype, const int& jtype) const; + KK_FLOAT compute_evdwl(const KK_FLOAT &rsq, const int &i, const int &j, + const int &itype, const int &jtype) const; template KOKKOS_INLINE_FUNCTION - KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, - const int& /*itype*/, const int& /*jtype*/) const { return 0; } + KK_FLOAT compute_ecoul(const KK_FLOAT &/*rsq*/, const int &/*i*/, const int &/*j*/, + const int &/*itype*/, const int &/*jtype*/) const { return 0; } Kokkos::DualView k_params; typename Kokkos::DualView