NAMD
ComputeCUDAMgr.h
Go to the documentation of this file.
1 #ifndef COMPUTECUDAMGR_H
2 #define COMPUTECUDAMGR_H
3 #include <vector>
4 #include "CudaUtils.h"
5 #include "ComputeCUDAMgr.decl.h"
6 #include "CudaNonbondedTables.h"
7 #include "CudaComputeNonbonded.h"
8 #ifdef BONDED_CUDA
9 #include "ComputeBondedCUDA.h"
10 #endif
11 #ifdef NAMD_CUDA
12 
13 class ComputeCUDAMgr : public CBase_ComputeCUDAMgr {
14 public:
15  // ComputeCUDAMgr_SDAG_CODE;
17  ComputeCUDAMgr(CkMigrateMessage *);
19  void initialize(CkQdMsg *msg);
20  void initialize_devices(CkQdMsg *msg);
21  void update();
25 #ifdef BONDED_CUDA
26  ComputeBondedCUDA* createComputeBondedCUDA(ComputeID c, ComputeMgr* computeMgr);
27  ComputeBondedCUDA* getComputeBondedCUDA();
28 #endif
29 private:
30 
31  // Number of CUDA devices on this node that are used in computation
32  int numDevices;
33  std::vector<CudaNonbondedTables*> cudaNonbondedTablesList;
34  std::vector<CudaComputeNonbonded*> cudaComputeNonbondedList;
35 #ifdef BONDED_CUDA
36  std::vector<ComputeBondedCUDA*> computeBondedCUDAList;
37 #endif
38 };
39 
40 #else // NAMD_CUDA
41 
42 class ComputeCUDAMgr : public CBase_ComputeCUDAMgr {
43 };
44 
45 #endif // NAMD_CUDA
46 #endif // COMPUTECUDAMGR_H
int ComputeID
Definition: NamdTypes.h:183
static __thread ComputeMgr * computeMgr
void initialize(CkQdMsg *msg)
static ComputeCUDAMgr * getComputeCUDAMgr()
void initialize_devices(CkQdMsg *msg)
CudaComputeNonbonded * getCudaComputeNonbonded()
CudaComputeNonbonded * createCudaComputeNonbonded(ComputeID c)