ComputeNonbondedCUDAExcl.h

Go to the documentation of this file.
00001 
00007 #ifndef COMPUTENONBONDEDCUDAEXCL_H
00008 #define COMPUTENONBONDEDCUDAEXCL_H
00009 
00010 #include "common.h"
00011 #include "NamdTypes.h"
00012 #include "Molecule.h"
00013 #include "ReductionMgr.h"
00014 #include "ComputeHomeTuples.h"
00015 #include "ComputeSelfTuples.h"
00016 #include "ComputeNonbondedUtil.h"
00017 
00018 
00019 class TuplePatchElem;
00020 
00021 class ExclElem : public ComputeNonbondedUtil {
00022 public:
00023     // ComputeHomeTuples interface
00024     enum { size = 2 };
00025     AtomID atomID[size];
00026     int    localIndex[size];
00027     TuplePatchElem *p[size];
00028     Real scale;
00029     static void computeForce(ExclElem*, int, BigReal*, BigReal *);
00030 
00031     static void getMoleculePointers(Molecule*, int*, int32***, Exclusion**);
00032     static void getParameterPointers(Parameters*, const int**);
00033     static void getTupleInfo(ExclusionSignature* sig, int *count, TupleSignature** t) {
00034 #ifdef NAMD_CUDA
00035         *count = sig->allExclCnt;
00036         *t = sig->allTuples;
00037 #endif
00038     }
00039 
00040     // pressure profile parameters
00041     static int pressureProfileSlabs;
00042     static int pressureProfileAtomTypes;
00043     static BigReal pressureProfileThickness;
00044     static BigReal pressureProfileMin;
00045 
00046     int hash() const { return 0x7FFFFFFF & ( (atomID[0]<<16) + (atomID[1])); }
00047 
00048     // Internal data
00049     int modified;
00050 
00051   enum { vdwEnergyIndex, electEnergyIndex, fullElectEnergyIndex, TENSOR(virialIndex),
00052            TENSOR(slowVirialIndex), reductionDataSize };
00053   enum { reductionChecksumLabel = REDUCTION_EXCLUSION_CHECKSUM };
00054   static void submitReductionData(BigReal*,SubmitReduction*);
00055 
00056   inline ExclElem();
00057   inline ExclElem(AtomID atom0, const TupleSignature *sig, const int *v);
00058   inline ExclElem(const Exclusion *a, const int *v);
00059   inline ExclElem(AtomID atom0, AtomID atom1);
00060   ~ExclElem() {};
00061 
00062   inline int operator==(const ExclElem &a) const;
00063   inline int operator<(const ExclElem &a) const;
00064 };
00065 
00066 class ComputeExcls : public ComputeHomeTuples<ExclElem,Exclusion,int>
00067 {
00068 public:
00069 
00070   ComputeExcls(ComputeID c, PatchIDList &p) : ComputeHomeTuples<ExclElem,Exclusion,int>(c,p) { ; }
00071 
00072 };
00073 
00074 class ComputeSelfExcls : public ComputeSelfTuples<ExclElem,Exclusion,int>
00075 {
00076 public:
00077 
00078   ComputeSelfExcls(ComputeID c, PatchID p) : ComputeSelfTuples<ExclElem,Exclusion,int>(c,p) { ; }
00079 
00080 };
00081 
00082 #include "ComputeNonbondedCUDAExcl.inl"
00083 
00084 #endif
00085 

Generated on Sat Nov 18 01:17:12 2017 for NAMD by  doxygen 1.4.7