git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13274 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -54,6 +54,7 @@ class KokkosLMP {
|
|||||||
|
|
||||||
class AtomKokkos : public Atom {
|
class AtomKokkos : public Atom {
|
||||||
public:
|
public:
|
||||||
|
tagint **k_special;
|
||||||
AtomKokkos(class LAMMPS *lmp) : Atom(lmp) {}
|
AtomKokkos(class LAMMPS *lmp) : Atom(lmp) {}
|
||||||
~AtomKokkos() {}
|
~AtomKokkos() {}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -32,11 +32,13 @@ class Memory : protected Pointers {
|
|||||||
void fail(const char *);
|
void fail(const char *);
|
||||||
|
|
||||||
// Kokkos memory allocation functions
|
// Kokkos memory allocation functions
|
||||||
// could provide a dummy any Kokkos memory function
|
// provide a dummy prototpye for any Kokkos memory function
|
||||||
// called in main LAMMPS even when not built with KOKKOS package
|
// called in main LAMMPS even when not built with KOKKOS package
|
||||||
|
|
||||||
#ifdef LMP_KOKKOS
|
#ifdef LMP_KOKKOS
|
||||||
#include "memory_kokkos.h"
|
#include "memory_kokkos.h"
|
||||||
|
#else
|
||||||
|
void grow_kokkos(tagint **, tagint **, int, int, const char*) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -575,10 +575,8 @@ void Special::combine()
|
|||||||
|
|
||||||
if (lmp->kokkos) {
|
if (lmp->kokkos) {
|
||||||
AtomKokkos* atomKK = (AtomKokkos*) atom;
|
AtomKokkos* atomKK = (AtomKokkos*) atom;
|
||||||
#ifdef LMP_KOKKOS
|
|
||||||
memory->grow_kokkos(atomKK->k_special,atom->special,
|
memory->grow_kokkos(atomKK->k_special,atom->special,
|
||||||
atom->nmax,atom->maxspecial,"atom:special");
|
atom->nmax,atom->maxspecial,"atom:special");
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
memory->destroy(atom->special);
|
memory->destroy(atom->special);
|
||||||
memory->create(atom->special,atom->nmax,atom->maxspecial,"atom:special");
|
memory->create(atom->special,atom->nmax,atom->maxspecial,"atom:special");
|
||||||
|
|||||||
Reference in New Issue
Block a user