NAMD
ComputeNonbondedCUDA.h
Go to the documentation of this file.
1 #ifndef COMPUTENONBONDEDCUDA_H
2 #define COMPUTENONBONDEDCUDA_H
3 #include "ComputeNonbondedUtil.h"
4 #include "ComputeHomeTuples.h"
5 
6 class ComputeMgr;
7 
8 //class ComputeNonbondedCUDAKernel;
9 
10 class FinishWorkMsg;
11 
12 class float4;
13 
14 int cuda_device_pe();
15 
16 bool cuda_device_shared_with_pe(int pe);
17 
19 
21 
22  public:
23 
24  struct compute_record {
28  };
29 
30  struct patch_record {
33  int numAtoms;
35  int refCount;
36  int isLocal;
40  int hostPe;
44  Patch *p;
47  Box<Patch,Real> *intRadBox; //5 GBIS Boxes
55  Force *f;
56  Real *intRad; //5 GBIS arrays
61 
63  };
64 
65 
67  ComputeNonbondedCUDA *m = 0, int idx = -1);
69 
70  void atomUpdate();
71  void doWork();
72  int noWork();
73  void skip();
74 
75  void recvYieldDevice(int pe);
77 
81  int step;
82  int finishWork(); // returns true when finished, false to continue
83  void finishReductions();
84  void finishPatch(int);
85  void messageFinishPatch(int);
86 
87  static void build_lj_table();
88  static void build_force_table();
89 
90  static void build_exclusions();
91 
92  void requirePatch(int pid);
93  void assignPatches();
94  void registerPatches();
100 
102  float4* forces;
103 
105  float4* slow_forces;
106 
109 
112 
113  //int gpu_is_mine;
114 
115  // GPU device ID that this non-bonded computation uses
116  int deviceID;
117 
121 
122  //ComputeNonbondedCUDAKernel *kernel;
123 
125  int masterPe;
128  int *slavePes;
130 
134 
139  float plcutoff2;
140 
143 
144  private:
145  void finishPatch(patch_record&);
146 
147 };
148 
149 #endif //COMPUTENONBONDEDCUDA_H
ResizeArray< int > remoteHostedPatches
ResizeArray< int > localActivePatches
ResizeArray< compute_record > computeRecords
int ComputeID
Definition: NamdTypes.h:183
int cuda_device_pe()
Definition: Vector.h:64
bool cuda_device_shared_with_pe(int pe)
float Real
Definition: common.h:109
SubmitReduction * reduction
Definition: Patch.h:35
bool one_cuda_device_per_node()
ComputeNonbondedCUDA ** slaves
ResizeArray< int > remoteActivePatches
int PatchID
Definition: NamdTypes.h:182
ComputeNonbondedCUDA * master
ResizeArray< compute_record > localComputeRecords
ResizeArray< compute_record > remoteComputeRecords
LocalWorkMsg * localWorkMsg2
ResizeArray< int > hostedPatches
ComputeNonbondedCUDA(ComputeID c, ComputeMgr *mgr, ComputeNonbondedCUDA *m=0, int idx=-1)
ResizeArray< int > activePatches
ResizeArray< int > localHostedPatches
ResizeArray< patch_record > patchRecords
Box< Patch, CompAtom > * positionBox
float GBReal
Definition: ComputeGBIS.inl:17