NAMD
Public Member Functions | Public Attributes | List of all members
TopoManagerWrapper::pe_sortop_topo Struct Reference

Public Member Functions

 pe_sortop_topo (TopoManagerWrapper &t, int *d)
 
bool operator() (int pe1, int pe2) const
 

Public Attributes

TopoManagerWrappertmgr
 
const int * sortdims
 

Detailed Description

Definition at line 1844 of file WorkDistrib.C.

Constructor & Destructor Documentation

TopoManagerWrapper::pe_sortop_topo::pe_sortop_topo ( TopoManagerWrapper t,
int *  d 
)
inline

Definition at line 1847 of file WorkDistrib.C.

1847 : tmgr(t), sortdims(d) {}

Member Function Documentation

bool TopoManagerWrapper::pe_sortop_topo::operator() ( int  pe1,
int  pe2 
) const
inline

Definition at line 1848 of file WorkDistrib.C.

References TopoManagerWrapper::coords(), WorkDistrib::peCompactOrderingIndex, sortdims, and tmgr.

1848  {
1849  int crds1[3], crds2[3];
1850  tmgr.coords(pe1,crds1);
1851  tmgr.coords(pe2,crds2);
1852  for ( int i=0; i<3; ++i ) {
1853  int d = sortdims[i];
1854  if ( crds1[d] != crds2[d] ) return ( crds1[d] < crds2[d] );
1855  }
1856  const int *index = WorkDistrib::peCompactOrderingIndex;
1857  return ( index[pe1] < index[pe2] );
1858  }
static int * peCompactOrderingIndex
Definition: WorkDistrib.h:118
void coords(int pe, int *crds)
Definition: WorkDistrib.C:1825

Member Data Documentation

const int* TopoManagerWrapper::pe_sortop_topo::sortdims

Definition at line 1846 of file WorkDistrib.C.

Referenced by operator()().

TopoManagerWrapper& TopoManagerWrapper::pe_sortop_topo::tmgr

Definition at line 1845 of file WorkDistrib.C.

Referenced by operator()().


The documentation for this struct was generated from the following file: