1 #ifndef CUDACOMPUTENONBONDED_H 2 #define CUDACOMPUTENONBONDED_H 8 #include <hip/hip_runtime.h> 26 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 29 #define MAX_EXCLUSIONS (1<<27) 101 size_t maxShmemPerBlock;
114 int2 *exclusionsByAtom;
125 int2* exclIndexMaxDiff;
126 size_t exclIndexMaxDiffSize;
130 size_t atomIndexSize;
157 std::vector<int> atomIndexToNBindex;
163 float* drudeAtomAlpha;
164 size_t drudeAtomAlphaSize;
169 float4* h_forcesSlow;
170 size_t h_forcesSlowSize;
174 float4* d_forcesSlow;
175 size_t d_forcesSlowSize;
200 size_t dHdrPrefixHSize;
203 cudaEvent_t forceDoneEvent;
204 bool forceDoneEventRecord;
211 std::vector<int> pes;
213 std::vector< std::vector<int> > rankPatches;
221 std::vector<ComputeRecord> computes;
222 std::vector<PatchRecord> patches;
234 float pairlistTolerance;
250 bool lambdaWindowUpdated;
252 double beforeForceCompute;
254 static inline void updateVdwTypesExclLoop(
int first,
int last,
void *result,
int paraNum,
void *param);
255 void updateVdwTypesExclSubset(
int first,
int last);
257 static inline void copyAtomsLoop(
int first,
int last,
void *result,
int paraNum,
void *param);
258 void copyAtomsSubset(
int first,
int last);
262 void updatePatches();
263 int calcNumTileLists();
264 void getMaxMovementTolerance(
float& maxAtomMovement,
float& maxPatchTolerance);
265 void updateVdwTypesExcl();
266 void buildNeighborlist();
272 void finishSetOfPatchesOnPe(std::vector<int>& patchSet);
273 void finishGBISPhase(
int i);
276 static void forceDoneCheck(
void *arg,
double walltime);
277 void forceDoneSetCallback();
278 void updateComputes();
279 void buildExclusions();
280 void skipPatch(
int i);
282 void reallocateArrays();
283 #ifdef NODEGROUP_FORCE_REGISTER 284 void updatePatchRecord();
286 void copyGBISphase(
int i);
287 void updatePatch(
int i);
289 void assignPatch(
int i);
293 const bool doStreaming;
294 int* patchReadyQueue;
295 int patchReadyQueueNext, patchReadyQueueLen;
297 void finishPatch(
int i);
298 void unregisterBox(
int i);
341 #endif // CUDACOMPUTENONBONDED_H
bool operator==(const PatchRecord &pr) const
void finishPatchOnPe(int i)
SubmitReduction * getCurrentReduction()
Alchemical datastructure that holds the lambda-relevant paramenters for FEP/TI.
virtual void initialize()
Box< Patch, Real > * dHdrPrefixBox
Box< Patch, Real > * intRadBox
bool operator<(const PatchRecord &pr) const
virtual void gbisP2PatchReady(PatchID, int seq)
std::vector< PatchRecord > & getPatches()
void messageEnqueueWork()
Box< Patch, GBReal > * dEdaSumBox
static CudaNBConstants getNonbondedCoef(SimParameters *params)
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
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()
static bool getDoTable(SimParameters *params, const bool doSlow, const bool doVirial)
void updatePatchOrder(const std::vector< CudaLocalRecord > &data)