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 #include "CudaPmeSolverUtil.h"
9 #include "ComputeBondedCUDA.h"
10 #include <memory>
11 
12 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
13 
15 
16 class ComputeCUDAMgr : public CBase_ComputeCUDAMgr {
17 public:
18  // ComputeCUDAMgr_SDAG_CODE;
20  ComputeCUDAMgr(CkMigrateMessage *);
22  void initialize(CkQdMsg *msg);
23  void initialize_devices(CkQdMsg *msg);
24  void update();
28 #ifdef BONDED_CUDA
29  ComputeBondedCUDA* createComputeBondedCUDA(ComputeID c, ComputeMgr* computeMgr);
30  ComputeBondedCUDA* getComputeBondedCUDA();
31 #endif
34 #ifdef NAMD_CUDA
35  std::shared_ptr<CudaGlobalMasterServer> createCudaGlobalMaster();
36  std::shared_ptr<CudaGlobalMasterServer> getCudaGlobalMaster();
37 #endif
38 private:
39 
40  // Number of CUDA devices on this node that are used in computation
41  int numDevices;
42  std::vector<CudaNonbondedTables*> cudaNonbondedTablesList;
43  std::vector<CudaComputeNonbonded*> cudaComputeNonbondedList;
44 #ifdef BONDED_CUDA
45  std::vector<ComputeBondedCUDA*> computeBondedCUDAList;
46 #endif
47  CudaPmeOneDevice* cudaPmeOneDevice;
48 #ifdef NAMD_CUDA
49  std::shared_ptr<CudaGlobalMasterServer> cudaGlobalMasterObject;
50 #endif
51 };
52 
53 #else // NAMD_CUDA
54 
55 class ComputeCUDAMgr : public CBase_ComputeCUDAMgr {
56 };
57 
58 #endif // NAMD_CUDA
59 #endif // COMPUTECUDAMGR_H
60 
std::shared_ptr< CudaGlobalMasterServer > getCudaGlobalMaster()
int32 ComputeID
Definition: NamdTypes.h:278
void initialize(CkQdMsg *msg)
static ComputeCUDAMgr * getComputeCUDAMgr()
std::shared_ptr< CudaGlobalMasterServer > createCudaGlobalMaster()
void initialize_devices(CkQdMsg *msg)
CudaComputeNonbonded * getCudaComputeNonbonded()
CudaComputeNonbonded * createCudaComputeNonbonded(ComputeID c)
A class for copying atom information from SequencerCUDA to CudaGlobalMasterClient.
CudaPmeOneDevice * createCudaPmeOneDevice()
CudaPmeOneDevice * getCudaPmeOneDevice()