ComputeNonbondedUtil.h File Reference

#include "NamdTypes.h"
#include "ReductionMgr.h"
#include "Molecule.h"

Go to the source code of this file.

Classes

class  Pairlists
class  ComputeNonbondedWorkArrays
struct  GBISParamStruct
struct  nonbonded
class  ComputeNonbondedUtil

Defines

#define NBWORKARRAYSINIT(ARRAYS)   ComputeNonbondedWorkArrays* const computeNonbondedWorkArrays = ARRAYS;
#define NBWORKARRAY(TYPE, NAME, SIZE)
#define VDW_SWITCH_MODE_ENERGY   0
#define VDW_SWITCH_MODE_MARTINI   1
#define VDW_SWITCH_MODE_FORCE   2

Typedefs

typedef unsigned short plint

Functions

void register_cuda_compute_self (ComputeID c, PatchID pid)
void register_cuda_compute_pair (ComputeID c, PatchID pid[], int t[])
void unregister_cuda_compute (ComputeID c)


Define Documentation

#define NBWORKARRAY ( TYPE,
NAME,
SIZE   ) 

Value:

computeNonbondedWorkArrays->NAME.resize(SIZE); \
  TYPE * const NAME = computeNonbondedWorkArrays->NAME.begin();

Definition at line 97 of file ComputeNonbondedUtil.h.

Referenced by SELF().

#define NBWORKARRAYSINIT ( ARRAYS   )     ComputeNonbondedWorkArrays* const computeNonbondedWorkArrays = ARRAYS;

Definition at line 88 of file ComputeNonbondedUtil.h.

Referenced by SELF().

#define VDW_SWITCH_MODE_ENERGY   0

Definition at line 398 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedUtil::select().

#define VDW_SWITCH_MODE_FORCE   2

Definition at line 400 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedUtil::select().

#define VDW_SWITCH_MODE_MARTINI   1

Definition at line 399 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedUtil::select().


Typedef Documentation

typedef unsigned short plint

Definition at line 33 of file ComputeNonbondedUtil.h.


Function Documentation

void register_cuda_compute_pair ( ComputeID  c,
PatchID  pid[],
int  t[] 
)

Definition at line 718 of file ComputeNonbondedCUDA.C.

References ComputeNonbondedCUDA::compute_record::c, PatchMap::center(), cudaCompute, ComputeNonbondedCUDA::localComputeRecords, NAMD_bug(), ComputeNonbondedCUDA::compute_record::offset, ComputeNonbondedCUDA::patchMap, ComputeNonbondedCUDA::patchRecords, ComputeNonbondedCUDA::compute_record::pid, ComputeNonbondedCUDA::remoteComputeRecords, ComputeNonbondedCUDA::requirePatch(), Vector::x, Vector::y, and Vector::z.

Referenced by ComputeNonbondedPair::initialize().

00718                                                                      {
00719 
00720   if ( ! cudaCompute ) NAMD_bug("register_pair called early");
00721  
00722   cudaCompute->requirePatch(pid[0]);
00723   cudaCompute->requirePatch(pid[1]);
00724 
00725   ComputeNonbondedCUDA::compute_record cr;
00726   cr.c = c; 
00727   cr.pid[0] = pid[0];  cr.pid[1] = pid[1];
00728 
00729   int t1 = t[0];
00730   int t2 = t[1];
00731   Vector offset = cudaCompute->patchMap->center(pid[0])
00732                 - cudaCompute->patchMap->center(pid[1]);
00733   offset.x += (t1%3-1) - (t2%3-1);
00734   offset.y += ((t1/3)%3-1) - ((t2/3)%3-1);
00735   offset.z += (t1/9-1) - (t2/9-1);
00736   cr.offset = offset;
00737 
00738   if ( cudaCompute->patchRecords[pid[0]].isLocal ) {
00739     cudaCompute->localComputeRecords.add(cr);
00740   } else {
00741     cudaCompute->remoteComputeRecords.add(cr);
00742   }
00743 }

void register_cuda_compute_self ( ComputeID  c,
PatchID  pid 
)

Definition at line 701 of file ComputeNonbondedCUDA.C.

References ComputeNonbondedCUDA::compute_record::c, cudaCompute, ComputeNonbondedCUDA::localComputeRecords, NAMD_bug(), ComputeNonbondedCUDA::compute_record::offset, ComputeNonbondedCUDA::patchRecords, ComputeNonbondedCUDA::compute_record::pid, ComputeNonbondedCUDA::remoteComputeRecords, and ComputeNonbondedCUDA::requirePatch().

Referenced by ComputeNonbondedSelf::initialize().

00701                                                           {
00702 
00703   if ( ! cudaCompute ) NAMD_bug("register_self called early");
00704 
00705   cudaCompute->requirePatch(pid);
00706 
00707   ComputeNonbondedCUDA::compute_record cr;
00708   cr.c = c;
00709   cr.pid[0] = pid;  cr.pid[1] = pid;
00710   cr.offset = 0.;
00711   if ( cudaCompute->patchRecords[pid].isLocal ) {
00712     cudaCompute->localComputeRecords.add(cr);
00713   } else {
00714     cudaCompute->remoteComputeRecords.add(cr);
00715   }
00716 }

void unregister_cuda_compute ( ComputeID  c  ) 

Definition at line 745 of file ComputeNonbondedCUDA.C.

References NAMD_bug().

00745                                           {  // static
00746 
00747   NAMD_bug("unregister_compute unimplemented");
00748 
00749 }


Generated on Fri Sep 22 01:17:15 2017 for NAMD by  doxygen 1.4.7