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 "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 340 of file CudaComputeNonbonded.C.

Referenced by CudaComputeNonbonded::assignPatches().

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

Definition at line 351 of file CudaComputeNonbonded.C.

References PatchMap::ObjectOnPe().

Referenced by CudaComputeNonbonded::assignPatches().

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

Definition at line 1557 of file CudaComputeNonbonded.C.

Referenced by cr_sortop_reverse_priority::pid_compare_priority().

1557  {
1558  if ( a == b ) return 0;
1559  for ( int bit = 1; bit; bit *= 2 ) {
1560  if ( (a&bit) != (b&bit) ) return ((a&bit) < (b&bit));
1561  }
1562  return 0;
1563 }

Variable Documentation

__thread DeviceCUDA* deviceCUDA

Definition at line 18 of file DeviceCUDA.C.