CudaComputeNonbondedKernel.h

Go to the documentation of this file.
00001 #ifndef CUDACOMPUTENONBONDEDKERNEL_H
00002 #define CUDACOMPUTENONBONDEDKERNEL_H
00003 #include "CudaUtils.h"
00004 #include "CudaTileListKernel.h"
00005 #include "CudaNonbondedTables.h"
00006 #ifdef NAMD_CUDA
00007 
00008 class CudaComputeNonbondedKernel {
00009 private:
00010 
00011   const int deviceID;
00012   CudaNonbondedTables& cudaNonbondedTables;
00013   const bool doStreaming;
00014 
00015   // Exclusions
00016   unsigned int* overflowExclusions;
00017   int overflowExclusionsSize;
00018 
00019   int2* exclIndexMaxDiff;
00020   int exclIndexMaxDiffSize;
00021 
00022   // Atom indices
00023   int* atomIndex;
00024   int atomIndexSize;
00025 
00026   // VdW types
00027   int* vdwTypes;
00028   int vdwTypesSize;
00029 
00030   unsigned int* patchNumCount;
00031   int patchNumCountSize;
00032 
00033   int* patchReadyQueue;
00034   int patchReadyQueueSize;
00035 
00036 public:
00037   CudaComputeNonbondedKernel(int deviceID, CudaNonbondedTables& cudaNonbondedTables, bool doStreaming);
00038   ~CudaComputeNonbondedKernel();
00039 
00040   void updateVdwTypesExcl(const int atomStorageSize, const int* h_vdwTypes,
00041     const int2* h_exclIndexMaxDiff, const int* h_atomIndex, cudaStream_t stream);
00042 
00043   void nonbondedForce(CudaTileListKernel& tlKernel,
00044     const int atomStorageSize, const bool doPairlist,
00045     const bool doEnergy, const bool doVirial, const bool doSlow,
00046     const float3 lata, const float3 latb, const float3 latc,
00047     const float4* h_xyzq, const float cutoff2, 
00048     float4* d_forces, float4* d_forcesSlow,
00049     float4* h_forces, float4* h_forcesSlow,
00050     cudaStream_t stream);
00051 
00052   void reduceVirialEnergy(CudaTileListKernel& tlKernel,
00053     const int atomStorageSize, const bool doEnergy, const bool doVirial, const bool doSlow, const bool doGBIS,
00054     float4* d_forces, float4* d_forcesSlow,
00055     VirialEnergy* d_virialEnergy, cudaStream_t stream);
00056 
00057   void getVirialEnergy(VirialEnergy* h_virialEnergy, cudaStream_t stream);
00058 
00059   void bindExclusions(int numExclusions, unsigned int* exclusion_bits);
00060 
00061   int* getPatchReadyQueue();
00062 };
00063 
00064 #endif // NAMD_CUDA
00065 #endif // CUDACOMPUTENONBONDEDKERNEL_H

Generated on Tue Nov 21 01:17:12 2017 for NAMD by  doxygen 1.4.7