CudaNonbondedTables.h

Go to the documentation of this file.
00001 #ifndef CUDANONBONDEDTABLES_H
00002 #define CUDANONBONDEDTABLES_H
00003 
00004 #ifdef NAMD_CUDA
00005 #include <cuda.h>
00006 
00007 class CudaNonbondedTables {
00008 private:
00009   const int deviceID;
00010 
00011   float2 *vdwCoefTable;
00012   int vdwCoefTableWidth;
00013   cudaTextureObject_t vdwCoefTableTex;
00014 
00015   // Non-bonded
00016   cudaArray_t forceArray;
00017   cudaTextureObject_t forceTableTex;
00018 
00019   cudaArray_t energyArray;
00020   cudaTextureObject_t energyTableTex;
00021 
00022   // Modified exclusions
00023   cudaArray_t modifiedExclusionForceArray;
00024   cudaTextureObject_t modifiedExclusionForceTableTex;
00025   
00026   cudaArray_t modifiedExclusionEnergyArray;
00027   cudaTextureObject_t modifiedExclusionEnergyTableTex;
00028 
00029   // Exclusions
00030   float2 *exclusionVdwCoefTable;
00031   cudaTextureObject_t exclusionVdwCoefTableTex;
00032 
00033   // cudaArray_t exclusionForceArray;
00034   // cudaTextureObject_t exclusionForceTableTex;
00035   
00036   // cudaArray_t exclusionEnergyArray;
00037   // cudaTextureObject_t exclusionEnergyTableTex;
00038 
00039   float4* exclusionTable;
00040   float* r2_table;
00041   cudaTextureObject_t exclusionTableTex;
00042   cudaTextureObject_t r2_table_tex;
00043 
00044   void buildVdwCoefTable();
00045   void buildForceAndEnergyTables(int tableSize);
00046 
00047 public:
00048   CudaNonbondedTables(const int deviceID);
00049   ~CudaNonbondedTables();
00050 
00051   float2* getVdwCoefTable() {return vdwCoefTable;}
00052   int getVdwCoefTableWidth() {return vdwCoefTableWidth;}
00053   cudaTextureObject_t getVdwCoefTableTex() {return vdwCoefTableTex;}
00054   cudaTextureObject_t getForceTableTex() {return forceTableTex;}
00055   cudaTextureObject_t getEnergyTableTex() {return energyTableTex;}
00056 
00057   float2* getExclusionVdwCoefTable() {return exclusionVdwCoefTable;}
00058   cudaTextureObject_t getExclusionVdwCoefTableTex() {return exclusionVdwCoefTableTex;}
00059   // cudaTextureObject_t getExclusionForceTableTex() {return exclusionForceTableTex;}
00060   // cudaTextureObject_t getExclusionEnergyTableTex() {return exclusionEnergyTableTex;}
00061   float4* getExclusionTable() {return exclusionTable;}
00062   float* get_r2_table() {return r2_table;}
00063   cudaTextureObject_t getExclusionTableTex() {return exclusionTableTex;}
00064   cudaTextureObject_t get_r2_table_tex() {return r2_table_tex;}
00065 
00066   cudaTextureObject_t getModifiedExclusionForceTableTex() {return modifiedExclusionForceTableTex;}
00067   cudaTextureObject_t getModifiedExclusionEnergyTableTex() {return modifiedExclusionEnergyTableTex;}
00068 
00069 };
00070 
00071 #endif // NAMD_CUDA
00072 #endif // CUDANONBONDEDTABLES_H

Generated on Tue Sep 19 01:17:12 2017 for NAMD by  doxygen 1.4.7