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 1840 of file WorkDistrib.C.

Constructor & Destructor Documentation

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

Definition at line 1843 of file WorkDistrib.C.

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

Member Function Documentation

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

Definition at line 1844 of file WorkDistrib.C.

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

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

Member Data Documentation

const int* TopoManagerWrapper::pe_sortop_topo::sortdims

Definition at line 1842 of file WorkDistrib.C.

Referenced by operator()().

TopoManagerWrapper& TopoManagerWrapper::pe_sortop_topo::tmgr

Definition at line 1841 of file WorkDistrib.C.

Referenced by operator()().


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