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;
146 float4* h_forcesSlow;
147 size_t h_forcesSlowSize;
151 float4* d_forcesSlow;
152 size_t d_forcesSlowSize;
177 size_t dHdrPrefixHSize;
180 cudaEvent_t forceDoneEvent;
181 bool forceDoneEventRecord;
188 std::vector<int> pes;
190 std::vector< std::vector<int> > rankPatches;
198 std::vector<ComputeRecord> computes;
199 std::vector<PatchRecord> patches;
210 float pairlistTolerance;
225 bool lambdaWindowUpdated;
227 double beforeForceCompute;
229 static inline void updateVdwTypesExclLoop(
int first,
int last,
void *result,
int paraNum,
void *param);
230 void updateVdwTypesExclSubset(
int first,
int last);
232 static inline void copyAtomsLoop(
int first,
int last,
void *result,
int paraNum,
void *param);
233 void copyAtomsSubset(
int first,
int last);
237 void updatePatches();
238 int calcNumTileLists();
239 void getMaxMovementTolerance(
float& maxAtomMovement,
float& maxPatchTolerance);
240 void updateVdwTypesExcl();
241 void buildNeighborlist();
247 void finishSetOfPatchesOnPe(std::vector<int>& patchSet);
248 void finishGBISPhase(
int i);
251 static void forceDoneCheck(
void *arg,
double walltime);
252 void forceDoneSetCallback();
253 void updateComputes();
254 void buildExclusions();
255 void skipPatch(
int i);
257 void reallocateArrays();
258 #ifdef NODEGROUP_FORCE_REGISTER 259 void updatePatchRecord();
261 void copyGBISphase(
int i);
262 void updatePatch(
int i);
264 void assignPatch(
int i);
268 const bool doStreaming;
269 int* patchReadyQueue;
270 int patchReadyQueueNext, patchReadyQueueLen;
272 void finishPatch(
int i);
273 void unregisterBox(
int i);
313 #endif // CUDACOMPUTENONBONDED_H
bool operator==(const PatchRecord &pr) const
void finishPatchOnPe(int i)
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)