CudaNonbondedTables Class Reference

#include <CudaNonbondedTables.h>

List of all members.

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.

00010                                                            : deviceID(deviceID) {
00011 
00012   vdwCoefTable = NULL;
00013   vdwCoefTableWidth = 0;
00014   vdwCoefTableTex = 0;  
00015 
00016   forceTableTex = 0;
00017   energyTableTex = 0;
00018 
00019   exclusionTable = NULL;
00020   r2_table = NULL;
00021   exclusionTableTex = 0;
00022   r2_table_tex = 0;
00023 
00024   modifiedExclusionForceTableTex = 0;
00025   modifiedExclusionEnergyTableTex = 0;
00026 
00027   cudaCheck(cudaSetDevice(deviceID));
00028   buildForceAndEnergyTables(4096);
00029   buildVdwCoefTable();
00030 }

CudaNonbondedTables::~CudaNonbondedTables (  ) 

Definition at line 32 of file CudaNonbondedTables.C.

References cudaCheck.

00032                                           {
00033   cudaCheck(cudaSetDevice(deviceID));
00034   if (vdwCoefTable != NULL) deallocate_device<float2>(&vdwCoefTable);
00035   if (exclusionTable != NULL) deallocate_device<float4>(&exclusionTable);
00036   if (r2_table != NULL) deallocate_device<float>(&r2_table);
00037 
00038   cudaCheck(cudaFreeArray(forceArray));
00039   cudaCheck(cudaFreeArray(energyArray));
00040 
00041   cudaCheck(cudaDestroyTextureObject(vdwCoefTableTex));
00042   cudaCheck(cudaDestroyTextureObject(forceTableTex));
00043   cudaCheck(cudaDestroyTextureObject(energyTableTex));
00044 
00045   cudaCheck(cudaDestroyTextureObject(exclusionTableTex));
00046   cudaCheck(cudaDestroyTextureObject(r2_table_tex));
00047 }


Member Function Documentation

float* CudaNonbondedTables::get_r2_table (  )  [inline]

Definition at line 64 of file CudaNonbondedTables.h.

00064 {return r2_table;}

cudaTextureObject_t CudaNonbondedTables::get_r2_table_tex (  )  [inline]

Definition at line 66 of file CudaNonbondedTables.h.

00066 {return r2_table_tex;}

cudaTextureObject_t CudaNonbondedTables::getEnergyTableTex (  )  [inline]

Definition at line 55 of file CudaNonbondedTables.h.

00055 {return energyTableTex;}

float4* CudaNonbondedTables::getExclusionTable (  )  [inline]

Definition at line 63 of file CudaNonbondedTables.h.

00063 {return exclusionTable;}

cudaTextureObject_t CudaNonbondedTables::getExclusionTableTex (  )  [inline]

Definition at line 65 of file CudaNonbondedTables.h.

00065 {return exclusionTableTex;}

float2* CudaNonbondedTables::getExclusionVdwCoefTable (  )  [inline]

Definition at line 59 of file CudaNonbondedTables.h.

00059 {return exclusionVdwCoefTable;}

cudaTextureObject_t CudaNonbondedTables::getExclusionVdwCoefTableTex (  )  [inline]

Definition at line 60 of file CudaNonbondedTables.h.

00060 {return exclusionVdwCoefTableTex;}

cudaTextureObject_t CudaNonbondedTables::getForceTableTex (  )  [inline]

Definition at line 54 of file CudaNonbondedTables.h.

00054 {return forceTableTex;}

cudaTextureObject_t CudaNonbondedTables::getModifiedExclusionEnergyTableTex (  )  [inline]

Definition at line 69 of file CudaNonbondedTables.h.

00069 {return modifiedExclusionEnergyTableTex;}

cudaTextureObject_t CudaNonbondedTables::getModifiedExclusionForceTableTex (  )  [inline]

Definition at line 68 of file CudaNonbondedTables.h.

00068 {return modifiedExclusionForceTableTex;}

float2* CudaNonbondedTables::getVdwCoefTable (  )  [inline]

Definition at line 51 of file CudaNonbondedTables.h.

00051 {return vdwCoefTable;}

cudaTextureObject_t CudaNonbondedTables::getVdwCoefTableTex (  )  [inline]

Definition at line 53 of file CudaNonbondedTables.h.

00053 {return vdwCoefTableTex;}

int CudaNonbondedTables::getVdwCoefTableWidth (  )  [inline]

Definition at line 52 of file CudaNonbondedTables.h.

00052 {return vdwCoefTableWidth;}

void CudaNonbondedTables::updateTables (  ) 

Definition at line 120 of file CudaNonbondedTables.C.

00120                                        {
00121   buildVdwCoefTable(true);
00122 }


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

Generated on 6 Dec 2019 for NAMD by  doxygen 1.6.1