diff --git a/lib/gpu/charmm_long.cpp b/lib/gpu/charmm_long.cpp index b6f70409ae..907ed0c96d 100644 --- a/lib/gpu/charmm_long.cpp +++ b/lib/gpu/charmm_long.cpp @@ -1,19 +1,17 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov +/*************************************************************************** + charmm_long.cpp + ------------------- + W. Michael Brown (ORNL) - 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. + Class for acceleration of the charmm/coul/long pair style. - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ---------------------------------------------------------------------- - Contributing authors: Mike Brown (ORNL), brownw@ornl.gov -------------------------------------------------------------------------- */ + __________________________________________________________________________ + This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) + __________________________________________________________________________ + + begin : + email : brownw@ornl.gov + ***************************************************************************/ #ifdef USE_OPENCL #include "charmm_long_cl.h" @@ -23,27 +21,27 @@ #include "charmm_long.h" #include -#define CRML_GPU_MemoryT CRML_GPU_Memory +#define CHARMMLongT CHARMMLong extern Device device; template -CRML_GPU_MemoryT::CRML_GPU_Memory() : BaseCharge(), +CHARMMLongT::CHARMMLong() : BaseCharge(), _allocated(false) { } template -CRML_GPU_MemoryT::~CRML_GPU_Memory() { +CHARMMLongT::~CHARMMLong() { clear(); } template -int CRML_GPU_MemoryT::bytes_per_atom(const int max_nbors) const { +int CHARMMLongT::bytes_per_atom(const int max_nbors) const { return this->bytes_per_atom_atomic(max_nbors); } template -int CRML_GPU_MemoryT::init(const int ntypes, +int CHARMMLongT::init(const int ntypes, double host_cut_bothsq, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **host_offset, @@ -107,7 +105,7 @@ int CRML_GPU_MemoryT::init(const int ntypes, } template -void CRML_GPU_MemoryT::clear() { +void CHARMMLongT::clear() { if (!_allocated) return; _allocated=false; @@ -119,15 +117,15 @@ void CRML_GPU_MemoryT::clear() { } template -double CRML_GPU_MemoryT::host_memory_usage() const { - return this->host_memory_usage_atomic()+sizeof(CRML_GPU_Memory); +double CHARMMLongT::host_memory_usage() const { + return this->host_memory_usage_atomic()+sizeof(CHARMMLong); } // --------------------------------------------------------------------------- // Calculate energies, forces, and torques // --------------------------------------------------------------------------- template -void CRML_GPU_MemoryT::loop(const bool _eflag, const bool _vflag) { +void CHARMMLongT::loop(const bool _eflag, const bool _vflag) { // Compute the block size and grid size to keep all cores busy const int BX=this->_block_bio_size; int eflag, vflag; @@ -172,4 +170,4 @@ void CRML_GPU_MemoryT::loop(const bool _eflag, const bool _vflag) { this->time_pair.stop(); } -template class CRML_GPU_Memory; +template class CHARMMLong; diff --git a/lib/gpu/charmm_long.cu b/lib/gpu/charmm_long.cu index f2ba74c8b6..6887bc6d6e 100644 --- a/lib/gpu/charmm_long.cu +++ b/lib/gpu/charmm_long.cu @@ -1,22 +1,17 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - 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 authors: Mike Brown (ORNL), brownw@ornl.gov -------------------------------------------------------------------------- */ - -#ifndef CRML_GPU_KERNEL -#define CRML_GPU_KERNEL +// ************************************************************************** +// charmm_long.cu +// ------------------- +// W. Michael Brown (ORNL) +// +// Device code for acceleration of the charmm/coul/long pair style +// +// __________________________________________________________________________ +// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) +// __________________________________________________________________________ +// +// begin : +// email : brownw@ornl.gov +// ***************************************************************************/ #ifdef NV_KERNEL @@ -497,5 +492,3 @@ __kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp2 *ljd_in, ans[ii]=f; } // if ii } - -#endif diff --git a/lib/gpu/charmm_long.h b/lib/gpu/charmm_long.h index 6de168e0aa..948569e292 100644 --- a/lib/gpu/charmm_long.h +++ b/lib/gpu/charmm_long.h @@ -1,30 +1,28 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov +/*************************************************************************** + charmm_long.h + ------------------- + W. Michael Brown (ORNL) - 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. + Class for acceleration of the charmm/coul/long pair style. - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ---------------------------------------------------------------------- - Contributing authors: Mike Brown (ORNL), brownw@ornl.gov -------------------------------------------------------------------------- */ + __________________________________________________________________________ + This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) + __________________________________________________________________________ -#ifndef CRML_GPU_MEMORY_H -#define CRML_GPU_MEMORY_H + begin : + email : brownw@ornl.gov + ***************************************************************************/ + +#ifndef LAL_CHARMM_LONG_H +#define LAL_CHARMM_LONG_H #include "base_charge.h" template -class CRML_GPU_Memory : public BaseCharge { +class CHARMMLong : public BaseCharge { public: - CRML_GPU_Memory(); - ~CRML_GPU_Memory(); + CHARMMLong(); + ~CHARMMLong(); /// Clear any previous data and set up for a new LAMMPS run /** \param max_nbors initial number of rows in the neighbor matrix diff --git a/lib/gpu/charmm_long_ext.cpp b/lib/gpu/charmm_long_ext.cpp index 24064b3f48..aeaa0ad62c 100644 --- a/lib/gpu/charmm_long_ext.cpp +++ b/lib/gpu/charmm_long_ext.cpp @@ -1,19 +1,17 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov +/*************************************************************************** + charmm_long.h + ------------------- + W. Michael Brown (ORNL) - 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. + Functions for LAMMPS access to charmm/coul/long acceleration routines. - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -/* ---------------------------------------------------------------------- - Contributing authors: Mike Brown (ORNL), brownw@ornl.gov -------------------------------------------------------------------------- */ + __________________________________________________________________________ + This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) + __________________________________________________________________________ + + begin : + email : brownw@ornl.gov + ***************************************************************************/ #include #include @@ -23,7 +21,7 @@ using namespace std; -static CRML_GPU_Memory CRMLMF; +static CHARMMLong CRMLMF; // --------------------------------------------------------------------------- // Allocate memory on host and device and copy constants to device diff --git a/lib/gpu/gayberne.cpp b/lib/gpu/gayberne.cpp index b1433ee7fb..58b0815db6 100644 --- a/lib/gpu/gayberne.cpp +++ b/lib/gpu/gayberne.cpp @@ -1,7 +1,7 @@ /*************************************************************************** gayberne.cpp ------------------- - W. Michael Brown + W. Michael Brown (ORNL) Host code for Gay-Berne potential acceleration diff --git a/lib/gpu/gayberne.cu b/lib/gpu/gayberne.cu index 8964dd284c..bfd62daae1 100644 --- a/lib/gpu/gayberne.cu +++ b/lib/gpu/gayberne.cu @@ -1,7 +1,7 @@ // ************************************************************************** // gayberne.cu // ------------------- -// W. Michael Brown +// W. Michael Brown (ORNL) // // Device code for Gay-Berne potential acceleration // diff --git a/lib/gpu/gayberne.h b/lib/gpu/gayberne.h index 60d9b947d5..3f37f77c56 100644 --- a/lib/gpu/gayberne.h +++ b/lib/gpu/gayberne.h @@ -1,7 +1,7 @@ /*************************************************************************** gayberne.h ------------------- - W. Michael Brown + W. Michael Brown (ORNL) Host code for Gay-Berne potential acceleration @@ -13,8 +13,8 @@ email : brownw@ornl.gov ***************************************************************************/ -#ifndef GAYBERNE_H -#define GAYBERNE_H +#ifndef LAL_GAYBERNE_H +#define LAL_GAYBERNE_H #include "base_ellipsoid.h" #include "mpi.h" diff --git a/lib/gpu/gayberne_lj.cu b/lib/gpu/gayberne_lj.cu index 4bd3a1f82a..b889611b7c 100644 --- a/lib/gpu/gayberne_lj.cu +++ b/lib/gpu/gayberne_lj.cu @@ -1,7 +1,7 @@ // ************************************************************************** // gayberne_lj.cu // ------------------- -// W. Michael Brown +// W. Michael Brown (ORNL) // // Device code for Gay-Berne - Lennard-Jones potential acceleration // @@ -13,9 +13,6 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifndef GAYBERNE_LJ_CU -#define GAYBERNE_LJ_CU - #ifdef NV_KERNEL #include "ellipsoid_extra.h" #endif @@ -590,5 +587,3 @@ __kernel void kernel_lj_fast(__global numtyp4 *x_, __global numtyp4 *lj1_in, } // if ii } -#endif -