ComputePmeCUDA.h

Go to the documentation of this file.
00001 #ifndef COMPUTEPMECUDA_H
00002 #define COMPUTEPMECUDA_H
00003 
00004 #include <vector>
00005 #include <list>
00006 #include "PmeBase.h"
00007 
00008 #include "PatchTypes.h"       // Results
00009 #include "Compute.h"
00010 #include "Box.h"
00011 #include "OwnerBox.h"
00012 #include "ComputePmeCUDAMgr.decl.h"
00013 
00014 #ifdef NAMD_CUDA
00015 class HomePatch;
00016 
00017 class ComputePmeCUDA : public Compute {
00018 public:
00019   ComputePmeCUDA(ComputeID c, PatchIDList& pids);
00020   ComputePmeCUDA(ComputeID c, PatchID pid);
00021   virtual ~ComputePmeCUDA();
00022   void initialize();
00023   void atomUpdate();
00024   int noWork();
00025   void doWork();
00026   bool storePmeForceMsg(PmeForceMsg *msg);
00027 private:
00028   struct PatchRecord {
00029     PatchRecord() {
00030       pmeForceMsg = NULL;
00031       patch = NULL;
00032       positionBox = NULL;
00033       avgPositionBox = NULL;
00034       forceBox = NULL;
00035     }
00036     // Message that contains the pointers to forces
00037     PmeForceMsg* pmeForceMsg;
00038     // Home pencil
00039     int homePencilY;
00040     int homePencilZ;
00041     int homePencilNode;
00042     // Pointer to patch
00043     Patch *patch;
00044     // Patch ID
00045     PatchID patchID;
00046     // Boxes
00047     Box<Patch,CompAtom> *positionBox;
00048     Box<Patch,CompAtom> *avgPositionBox;
00049     Box<Patch,Results> *forceBox;
00050   };
00051 
00052   double calcSelfEnergy(int numAtoms, CompAtom *x);
00053   void sendAtoms();
00054   void recvForces();
00055   void setupActivePencils();
00056 
00057   CmiNodeLock lock;
00058   int patchCounter;
00059 
00060   std::vector<PatchRecord> patches;
00061 
00062   bool selfEnergyDone;
00063 
00064   bool sendAtomsDone;
00065 
00066   PmeGrid pmeGrid;
00067 
00068   ComputePmeCUDAMgr *mgr;
00069 
00070   CProxy_ComputePmeCUDAMgr computePmeCUDAMgrProxy;
00071 
00072   bool atomsChanged;
00073 
00074 };
00075 #endif // NAMD_CUDA
00076 
00077 #endif // COMPUTEPMECUDA_H

Generated on Thu Nov 23 01:17:11 2017 for NAMD by  doxygen 1.4.7