NAMD
ComputeNonbondedCUDAExcl.h
Go to the documentation of this file.
1 
7 #ifndef COMPUTENONBONDEDCUDAEXCL_H
8 #define COMPUTENONBONDEDCUDAEXCL_H
9 
10 #include "common.h"
11 #include "NamdTypes.h"
12 #include "Molecule.h"
13 #include "ReductionMgr.h"
14 #include "ComputeHomeTuples.h"
15 #include "ComputeSelfTuples.h"
16 
17 
18 class TuplePatchElem;
19 
20 class ExclElem {
21 public:
22  // ComputeHomeTuples interface
23  enum { size = 2 };
28  static void computeForce(ExclElem*, int, BigReal*, BigReal *);
29 
30  static void getMoleculePointers(Molecule*, int*, int32***, Exclusion**);
31  static void getParameterPointers(Parameters*, const int**);
32  static void getTupleInfo(ExclusionSignature* sig, int *count, TupleSignature** t) {
33 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
34  *count = sig->allExclCnt;
35  *t = sig->allTuples;
36 #endif
37  }
38 
39  // pressure profile parameters
44  static int pswitchTable[3*3];
45 
46  int hash() const { return 0x7FFFFFFF & ( (atomID[0]<<16) + (atomID[1])); }
47 
48  // Internal data
49  int modified;
50 
56  TENSOR(virialIndex), TENSOR(slowVirialIndex), reductionDataSize };
59 
60  inline ExclElem();
61  inline ExclElem(AtomID atom0, const TupleSignature *sig, const int *v);
62  inline ExclElem(const Exclusion *a, const int *v);
63  inline ExclElem(AtomID atom0, AtomID atom1);
64  ~ExclElem() {};
65 
66  inline int operator==(const ExclElem &a) const;
67  inline int operator<(const ExclElem &a) const;
68 };
69 
70 class ComputeExcls : public ComputeHomeTuples<ExclElem,Exclusion,int>
71 {
72 public:
73 
75 
76 };
77 
78 class ComputeSelfExcls : public ComputeSelfTuples<ExclElem,Exclusion,int>
79 {
80 public:
81 
83 
84 };
85 
87 
88 #endif
89 
int operator<(const ExclElem &a) const
static int pressureProfileAtomTypes
int32 ComputeID
Definition: NamdTypes.h:288
ComputeExcls(ComputeID c, PatchIDList &p)
static void submitReductionData(BigReal *, SubmitReduction *)
static void computeForce(ExclElem *, int, BigReal *, BigReal *)
float Real
Definition: common.h:118
int32_t int32
Definition: common.h:38
static void getParameterPointers(Parameters *, const int **)
Molecule stores the structural information for the system.
Definition: Molecule.h:174
TupleSignature * allTuples
Definition: structures.h:535
static int pswitchTable[3 *3]
int operator==(const ExclElem &a) const
TuplePatchElem * p[size]
ComputeSelfExcls(ComputeID c, PatchID p)
static int pressureProfileSlabs
AtomID atomID[size]
int32 AtomID
Definition: NamdTypes.h:35
static BigReal pressureProfileThickness
int32 PatchID
Definition: NamdTypes.h:287
static void getTupleInfo(ExclusionSignature *sig, int *count, TupleSignature **t)
static BigReal pressureProfileMin
static void getMoleculePointers(Molecule *, int *, int32 ***, Exclusion **)
double BigReal
Definition: common.h:123