git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13385 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -48,6 +48,7 @@ class LAMMPS {
|
|||||||
|
|
||||||
class Cuda *cuda; // CUDA accelerator class
|
class Cuda *cuda; // CUDA accelerator class
|
||||||
class KokkosLMP *kokkos; // KOKKOS accelerator class
|
class KokkosLMP *kokkos; // KOKKOS accelerator class
|
||||||
|
class AtomKokkos *atomKK; // KOKKOS version of Atom class
|
||||||
|
|
||||||
class CiteMe *citeme; // citation info
|
class CiteMe *citeme; // citation info
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,8 @@ namespace LAMMPS_NS {
|
|||||||
#define MIN(A,B) ((A) < (B) ? (A) : (B))
|
#define MIN(A,B) ((A) < (B) ? (A) : (B))
|
||||||
#define MAX(A,B) ((A) > (B) ? (A) : (B))
|
#define MAX(A,B) ((A) > (B) ? (A) : (B))
|
||||||
|
|
||||||
|
//class AtomKokkos;
|
||||||
|
|
||||||
class Pointers {
|
class Pointers {
|
||||||
public:
|
public:
|
||||||
Pointers(LAMMPS *ptr) :
|
Pointers(LAMMPS *ptr) :
|
||||||
@ -55,7 +57,8 @@ class Pointers {
|
|||||||
world(ptr->world),
|
world(ptr->world),
|
||||||
infile(ptr->infile),
|
infile(ptr->infile),
|
||||||
screen(ptr->screen),
|
screen(ptr->screen),
|
||||||
logfile(ptr->logfile) {}
|
logfile(ptr->logfile),
|
||||||
|
atomKK(ptr->atomKK) {}
|
||||||
virtual ~Pointers() {}
|
virtual ~Pointers() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -80,6 +83,8 @@ class Pointers {
|
|||||||
FILE *&infile;
|
FILE *&infile;
|
||||||
FILE *&screen;
|
FILE *&screen;
|
||||||
FILE *&logfile;
|
FILE *&logfile;
|
||||||
|
|
||||||
|
class AtomKokkos *&atomKK;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "special.h"
|
#include "special.h"
|
||||||
|
#include "accelerator_kokkos.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
@ -112,9 +113,13 @@ void Replicate::command(int narg, char **arg)
|
|||||||
|
|
||||||
// old = original atom class
|
// old = original atom class
|
||||||
// atom = new replicated atom class
|
// atom = new replicated atom class
|
||||||
|
// also set atomKK for Kokkos version of Atom class
|
||||||
|
|
||||||
Atom *old = atom;
|
Atom *old = atom;
|
||||||
atom = new Atom(lmp);
|
if (lmp->kokkos) atom = new AtomKokkos(lmp);
|
||||||
|
else atom = new Atom(lmp);
|
||||||
|
atomKK = (AtomKokkos*) atom;
|
||||||
|
|
||||||
atom->settings(old);
|
atom->settings(old);
|
||||||
atom->create_avec(old->atom_style,old->avec->nargcopy,old->avec->argcopy,0);
|
atom->create_avec(old->atom_style,old->avec->nargcopy,old->avec->argcopy,0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user