From cfa91c0611b5ee0fb544999b81b8558a397709c0 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 26 May 2011 22:15:18 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6218 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/accelerator_cuda.h | 4 +--- src/output.cpp | 10 +++------- src/pair.cpp | 6 ++---- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/accelerator_cuda.h b/src/accelerator_cuda.h index 455d63fc8a..307a045cae 100644 --- a/src/accelerator_cuda.h +++ b/src/accelerator_cuda.h @@ -29,7 +29,7 @@ #else // dummy interface to USER-CUDA -// used when USER-CUDA is not installed +// needed for compiling when USER-CUDA is not installed #include "comm.h" #include "modify.h" @@ -41,11 +41,9 @@ class Cuda { public: int cuda_exists; int oncpu; - int neighbor_decide_by_integrator; Cuda(class LAMMPS *) {cuda_exists = 0;} ~Cuda() {} - void setDevice(class LAMMPS *) {} void accelerator(int, char **) {} void evsetup_eatom_vatom(int, int) {} void downloadAll() {} diff --git a/src/output.cpp b/src/output.cpp index 95808a9b5e..b376ff5757 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -30,14 +30,12 @@ #include "force.h" #include "dump.h" #include "write_restart.h" +#include "accelerator_cuda.h" #include "memory.h" #include "error.h" -#include "accelerator.h" using namespace LAMMPS_NS; -enum{NOACCEL,OPT,GPU,USERCUDA}; // same as lammps.cpp - #define DELTA 1 #define MYMIN(a,b) ((a) < (b) ? (a) : (b)) @@ -250,8 +248,7 @@ void Output::write(bigint ntimestep) if (next_dump_any == ntimestep) { - if (lmp->accelerator == USERCUDA && !lmp->cuda->oncpu) - lmp->cuda->downloadAll(); + if (lmp->cuda && !lmp->cuda->oncpu) lmp->cuda->downloadAll(); for (int idump = 0; idump < ndump; idump++) { if (next_dump[idump] == ntimestep && last_dump[idump] != ntimestep) { @@ -279,8 +276,7 @@ void Output::write(bigint ntimestep) if (next_restart == ntimestep && last_restart != ntimestep) { - if (lmp->accelerator == USERCUDA && !lmp->cuda->oncpu) - lmp->cuda->downloadAll(); + if (lmp->cuda && !lmp->cuda->oncpu) lmp->cuda->downloadAll(); if (restart_toggle == 0) { char *file = new char[strlen(restart1) + 16]; diff --git a/src/pair.cpp b/src/pair.cpp index dde19c1d05..b1e095258b 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -30,7 +30,7 @@ #include "comm.h" #include "force.h" #include "update.h" -#include "accelerator.h" +#include "accelerator_cuda.h" #include "memory.h" #include "error.h" @@ -41,7 +41,6 @@ using namespace LAMMPS_NS; enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; enum{R,RSQ,BMP}; -enum{NOACCEL,OPT,GPU,USERCUDA}; // same as lammps.cpp /* ---------------------------------------------------------------------- */ @@ -328,8 +327,7 @@ void Pair::ev_setup(int eflag, int vflag) if (vflag_either == 0 && eflag_either == 0) evflag = 0; } else vflag_fdotr = 0; - if (lmp->accelerator == USERCUDA) - lmp->cuda->evsetup_eatom_vatom(eflag_atom,vflag_atom); + if (lmp->cuda) lmp->cuda->evsetup_eatom_vatom(eflag_atom,vflag_atom); } /* ----------------------------------------------------------------------