NAMD
Classes | Macros | Functions | Variables
CudaComputeNonbonded.C File Reference
#include <algorithm>
#include <map>
#include <vector>
#include "NamdTypes.h"
#include "charm++.h"
#include "Patch.h"
#include "PatchMap.h"
#include "ProxyMgr.h"
#include "LJTable.h"
#include "Node.h"
#include "ObjectArena.h"
#include "ReductionMgr.h"
#include "CudaComputeNonbonded.h"
#include "WorkDistrib.h"
#include "HomePatch.h"
#include "Priorities.h"
#include "ComputePmeCUDAMgr.h"
#include "NamdEventsProfiling.h"
#include "DeviceCUDA.h"

Go to the source code of this file.

Classes

struct  pid_sortop_reverse_priority
 
struct  cr_sortop_distance
 
struct  cr_sortop_reverse_priority
 
struct  exlist_sortop
 

Macros

#define SET_EXCL(EXCL, BASE, DIFF)   (EXCL)[((BASE)+(DIFF))>>5] |= (1<<(((BASE)+(DIFF))&31))
 

Functions

void CcdCallBacksReset (void *ignored, double curWallTime)
 
int findHomePatchPe (PatchIDList *rankPatchIDs, PatchID pid)
 
void findProxyPatchPes (std::vector< int > &proxyPatchPes, PatchID pid)
 
static bool sortop_bitreverse (int a, int b)
 

Variables

__thread DeviceCUDAdeviceCUDA
 

Macro Definition Documentation

#define SET_EXCL (   EXCL,
  BASE,
  DIFF 
)    (EXCL)[((BASE)+(DIFF))>>5] |= (1<<(((BASE)+(DIFF))&31))

Function Documentation

void CcdCallBacksReset ( void ignored,
double  curWallTime 
)
int findHomePatchPe ( PatchIDList rankPatchIDs,
PatchID  pid 
)

Definition at line 341 of file CudaComputeNonbonded.C.

Referenced by CudaComputeNonbonded::assignPatches().

341  {
342  // for (int i=0;i < rankPatchIDs.size();i++) {
343  for (int i=0;i < CkMyNodeSize();i++) {
344  if (rankPatchIDs[i].find(pid) != -1) return CkNodeFirst(CkMyNode()) + i;
345  }
346  return -1;
347 }
void findProxyPatchPes ( std::vector< int > &  proxyPatchPes,
PatchID  pid 
)

Definition at line 352 of file CudaComputeNonbonded.C.

References PatchMap::ObjectOnPe().

Referenced by CudaComputeNonbonded::assignPatches().

352  {
353  proxyPatchPes.clear();
354  for (int i=0;i < CkMyNodeSize();i++) {
355  int pe = CkNodeFirst(CkMyNode()) + i;
356  if (PatchMap::ObjectOnPe(pe)->patch(pid) != NULL)
357  proxyPatchPes.push_back(pe);
358  }
359 }
static PatchMap * ObjectOnPe(int pe)
Definition: PatchMap.h:28
static bool sortop_bitreverse ( int  a,
int  b 
)
inlinestatic

Definition at line 1565 of file CudaComputeNonbonded.C.

Referenced by cr_sortop_reverse_priority::pid_compare_priority().

1565  {
1566  if ( a == b ) return 0;
1567  for ( int bit = 1; bit; bit *= 2 ) {
1568  if ( (a&bit) != (b&bit) ) return ((a&bit) < (b&bit));
1569  }
1570  return 0;
1571 }

Variable Documentation

__thread DeviceCUDA* deviceCUDA

Definition at line 22 of file DeviceCUDA.C.