Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

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)

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 * NAME = computeNonbondedWorkArrays->NAME.begin();

Definition at line 85 of file ComputeNonbondedUtil.h.

Referenced by SELF().

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

Definition at line 82 of file ComputeNonbondedUtil.h.

Referenced by SELF().


Typedef Documentation

typedef unsigned short plint
 

Definition at line 27 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedUtil::calcGBIS(), ComputeNonbondedSelf::doForce(), ComputeLCPO::doForce(), Pairlists::getIndexValue(), Pairlists::newlist(), pairlist_from_pairlist(), pairlistFromAll(), Pairlists::Pairlists(), and SELF().


Function Documentation

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

Definition at line 666 of file ComputeNonbondedCUDA.C.

References ResizeArray< Elem >::add(), 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().

00666                                                                      {
00667 
00668   if ( ! cudaCompute ) NAMD_bug("register_pair called early");
00669  
00670   cudaCompute->requirePatch(pid[0]);
00671   cudaCompute->requirePatch(pid[1]);
00672 
00673   ComputeNonbondedCUDA::compute_record cr, cr2;
00674   cr.c = c;  cr2.c = c;
00675   cr.pid[0] = pid[0];  cr.pid[1] = pid[1];
00676   cr2.pid[0] = pid[1];  cr2.pid[1] = pid[0];
00677 
00678   int t1 = t[0];
00679   int t2 = t[1];
00680   Vector offset = cudaCompute->patchMap->center(pid[0])
00681                 - cudaCompute->patchMap->center(pid[1]);
00682   offset.x += (t1%3-1) - (t2%3-1);
00683   offset.y += ((t1/3)%3-1) - ((t2/3)%3-1);
00684   offset.z += (t1/9-1) - (t2/9-1);
00685   cr.offset = offset;
00686   cr2.offset = -1. * offset;
00687     
00688   if ( cudaCompute->patchRecords[pid[0]].isLocal ) {
00689     cudaCompute->localComputeRecords.add(cr);
00690   } else {
00691     cudaCompute->remoteComputeRecords.add(cr);
00692   }
00693   if ( cudaCompute->patchRecords[pid[1]].isLocal ) {
00694     cudaCompute->localComputeRecords.add(cr2);
00695   } else {
00696     cudaCompute->remoteComputeRecords.add(cr2);
00697   }
00698 }

void register_cuda_compute_self ComputeID  c,
PatchID  pid
 

Definition at line 649 of file ComputeNonbondedCUDA.C.

References ResizeArray< Elem >::add(), 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().

00649                                                           {
00650 
00651   if ( ! cudaCompute ) NAMD_bug("register_self called early");
00652 
00653   cudaCompute->requirePatch(pid);
00654 
00655   ComputeNonbondedCUDA::compute_record cr;
00656   cr.c = c;
00657   cr.pid[0] = pid;  cr.pid[1] = pid;
00658   cr.offset = 0.;
00659   if ( cudaCompute->patchRecords[pid].isLocal ) {
00660     cudaCompute->localComputeRecords.add(cr);
00661   } else {
00662     cudaCompute->remoteComputeRecords.add(cr);
00663   }
00664 }

void unregister_cuda_compute ComputeID  c  ) 
 

Definition at line 700 of file ComputeNonbondedCUDA.C.

References NAMD_bug().

00700                                           {  // static
00701 
00702   NAMD_bug("unregister_compute unimplemented");
00703 
00704 }


Generated on Wed May 22 04:07:19 2013 for NAMD by  doxygen 1.3.9.1