1 #ifndef CUDACOMPUTENONBONDED_H
2 #define CUDACOMPUTENONBONDED_H
14 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
19 #include <hip/hip_runtime.h>
25 #define MAX_EXCLUSIONS (1<<27)
95 size_t maxShmemPerBlock;
108 int2 *exclusionsByAtom;
119 int2* exclIndexMaxDiff;
120 int exclIndexMaxDiffSize;
137 float4* h_forcesSlow;
138 int h_forcesSlowSize;
142 float4* d_forcesSlow;
143 int d_forcesSlowSize;
171 cudaEvent_t forceDoneEvent;
172 bool forceDoneEventRecord;
179 std::vector<int> pes;
181 std::vector< std::vector<int> > rankPatches;
189 std::vector<ComputeRecord> computes;
190 std::vector<PatchRecord> patches;
200 float pairlistTolerance;
213 double beforeForceCompute;
215 static inline void updateVdwTypesExclLoop(
int first,
int last,
void *result,
int paraNum,
void *param);
216 void updateVdwTypesExclSubset(
int first,
int last);
218 static inline void copyAtomsLoop(
int first,
int last,
void *result,
int paraNum,
void *param);
219 void copyAtomsSubset(
int first,
int last);
223 void updatePatches();
224 int calcNumTileLists();
225 void getMaxMovementTolerance(
float& maxAtomMovement,
float& maxPatchTolerance);
226 void updateVdwTypesExcl();
227 void buildNeighborlist();
233 void finishSetOfPatchesOnPe(std::vector<int>& patchSet);
234 void finishPatches();
235 void finishGBISPhase(
int i);
237 void reSortTileLists();
239 static void forceDoneCheck(
void *arg,
double walltime);
240 void forceDoneSetCallback();
241 void updateComputes();
242 void buildExclusions();
243 void skipPatch(
int i);
245 void reallocateArrays();
246 void copyGBISphase(
int i);
247 void updatePatch(
int i);
249 void assignPatch(
int i);
253 const bool doStreaming;
254 int* patchReadyQueue;
255 int patchReadyQueueNext, patchReadyQueueLen;
257 void finishPatch(
int i);
258 void unregisterBox(
int i);
288 #endif // CUDACOMPUTENONBONDED_H
void finishPatchOnPe(int i)
virtual void initialize()
Box< Patch, Real > * dHdrPrefixBox
Box< Patch, Real > * intRadBox
virtual void gbisP2PatchReady(PatchID, int seq)
void messageEnqueueWork()
Box< Patch, GBReal > * dEdaSumBox
Box< Patch, Real > * bornRadBox
virtual void gbisP3PatchReady(PatchID, int seq)
CudaComputeNonbonded(ComputeID c, int deviceID, CudaNonbondedTables &cudaNonbondedTables, bool doStreaming)
void unregisterBoxesOnPe()
PatchRecord(PatchID patchID)
void registerComputeSelf(ComputeID cid, PatchID pid)
Box< Patch, Results > * forceBox
bool operator<(const PatchRecord &pr) const
virtual void patchReady(PatchID, int doneMigration, int seq)
Box< Patch, CompAtom > * positionBox
Box< Patch, GBReal > * psiSumBox
int reversePriorityRankInPe
void registerComputePair(ComputeID cid, PatchID *pid, int *trans)
void assignPatches(ComputeMgr *computeMgrIn)
virtual void atomUpdate()
bool operator==(const PatchRecord &pr) const