NAMD
Public Member Functions | List of all members
CudaNonbondedTables Class Reference

#include <CudaNonbondedTables.h>

Public Member Functions

 CudaNonbondedTables (const int deviceID)
 
 ~CudaNonbondedTables ()
 
float2getVdwCoefTable ()
 
int getVdwCoefTableWidth ()
 
cudaTextureObject_t getVdwCoefTableTex ()
 
cudaTextureObject_t getForceTableTex ()
 
cudaTextureObject_t getEnergyTableTex ()
 
void updateTables ()
 
float2getExclusionVdwCoefTable ()
 
cudaTextureObject_t getExclusionVdwCoefTableTex ()
 
float4 * getExclusionTable ()
 
float * get_r2_table ()
 
cudaTextureObject_t getExclusionTableTex ()
 
cudaTextureObject_t get_r2_table_tex ()
 
cudaTextureObject_t getModifiedExclusionForceTableTex ()
 
cudaTextureObject_t getModifiedExclusionEnergyTableTex ()
 

Detailed Description

Definition at line 7 of file CudaNonbondedTables.h.

Constructor & Destructor Documentation

CudaNonbondedTables::CudaNonbondedTables ( const int  deviceID)

Definition at line 10 of file CudaNonbondedTables.C.

References cudaCheck.

10  : deviceID(deviceID) {
11 
12  vdwCoefTable = NULL;
14  vdwCoefTableTex = 0;
15 
16  forceTableTex = 0;
17  energyTableTex = 0;
18 
19  exclusionTable = NULL;
20  r2_table = NULL;
21  exclusionTableTex = 0;
22  r2_table_tex = 0;
23 
24  modifiedExclusionForceTableTex = 0;
25  modifiedExclusionEnergyTableTex = 0;
26 
27  cudaCheck(cudaSetDevice(deviceID));
28  buildForceAndEnergyTables(4096);
29  buildVdwCoefTable();
30 }
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t cudaTextureObject_t cudaTextureObject_t energyTableTex
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t cudaTextureObject_t forceTableTex
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t vdwCoefTableTex
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int vdwCoefTableWidth
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ vdwCoefTable
#define cudaCheck(stmt)
Definition: CudaUtils.h:79
CudaNonbondedTables::~CudaNonbondedTables ( )

Definition at line 32 of file CudaNonbondedTables.C.

References cudaCheck.

32  {
33  cudaCheck(cudaSetDevice(deviceID));
34  if (vdwCoefTable != NULL) deallocate_device<float2>(&vdwCoefTable);
35  if (exclusionTable != NULL) deallocate_device<float4>(&exclusionTable);
36  if (r2_table != NULL) deallocate_device<float>(&r2_table);
37 
38  cudaCheck(cudaFreeArray(forceArray));
39  cudaCheck(cudaFreeArray(energyArray));
40 
41  cudaCheck(cudaDestroyTextureObject(vdwCoefTableTex));
42  cudaCheck(cudaDestroyTextureObject(forceTableTex));
43  cudaCheck(cudaDestroyTextureObject(energyTableTex));
44 
45  cudaCheck(cudaDestroyTextureObject(exclusionTableTex));
46  cudaCheck(cudaDestroyTextureObject(r2_table_tex));
47 }
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t cudaTextureObject_t cudaTextureObject_t energyTableTex
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t cudaTextureObject_t forceTableTex
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t vdwCoefTableTex
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ vdwCoefTable
#define cudaCheck(stmt)
Definition: CudaUtils.h:79

Member Function Documentation

float* CudaNonbondedTables::get_r2_table ( )
inline

Definition at line 64 of file CudaNonbondedTables.h.

64 {return r2_table;}
cudaTextureObject_t CudaNonbondedTables::get_r2_table_tex ( )
inline

Definition at line 66 of file CudaNonbondedTables.h.

66 {return r2_table_tex;}
cudaTextureObject_t CudaNonbondedTables::getEnergyTableTex ( )
inline

Definition at line 55 of file CudaNonbondedTables.h.

55 {return energyTableTex;}
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t cudaTextureObject_t cudaTextureObject_t energyTableTex
float4* CudaNonbondedTables::getExclusionTable ( )
inline

Definition at line 63 of file CudaNonbondedTables.h.

63 {return exclusionTable;}
cudaTextureObject_t CudaNonbondedTables::getExclusionTableTex ( )
inline

Definition at line 65 of file CudaNonbondedTables.h.

65 {return exclusionTableTex;}
float2* CudaNonbondedTables::getExclusionVdwCoefTable ( )
inline

Definition at line 59 of file CudaNonbondedTables.h.

59 {return exclusionVdwCoefTable;}
cudaTextureObject_t CudaNonbondedTables::getExclusionVdwCoefTableTex ( )
inline

Definition at line 60 of file CudaNonbondedTables.h.

60 {return exclusionVdwCoefTableTex;}
cudaTextureObject_t CudaNonbondedTables::getForceTableTex ( )
inline

Definition at line 54 of file CudaNonbondedTables.h.

54 {return forceTableTex;}
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t cudaTextureObject_t forceTableTex
cudaTextureObject_t CudaNonbondedTables::getModifiedExclusionEnergyTableTex ( )
inline

Definition at line 69 of file CudaNonbondedTables.h.

69 {return modifiedExclusionEnergyTableTex;}
cudaTextureObject_t CudaNonbondedTables::getModifiedExclusionForceTableTex ( )
inline

Definition at line 68 of file CudaNonbondedTables.h.

68 {return modifiedExclusionForceTableTex;}
float2* CudaNonbondedTables::getVdwCoefTable ( )
inline

Definition at line 51 of file CudaNonbondedTables.h.

51 {return vdwCoefTable;}
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ vdwCoefTable
cudaTextureObject_t CudaNonbondedTables::getVdwCoefTableTex ( )
inline

Definition at line 53 of file CudaNonbondedTables.h.

53 {return vdwCoefTableTex;}
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int const float2 *__restrict__ const int *__restrict__ const float3 const float3 const float3 const float4 *__restrict__ const float cudaTextureObject_t vdwCoefTableTex
int CudaNonbondedTables::getVdwCoefTableWidth ( )
inline

Definition at line 52 of file CudaNonbondedTables.h.

52 {return vdwCoefTableWidth;}
__global__ void const int const TileList *__restrict__ TileExcl *__restrict__ const int *__restrict__ const int vdwCoefTableWidth
void CudaNonbondedTables::updateTables ( )

Definition at line 120 of file CudaNonbondedTables.C.

120  {
121  buildVdwCoefTable(true);
122 }

The documentation for this class was generated from the following files: