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

Constructor & Destructor Documentation

◆ pe_sortop_topo()

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

Definition at line 1968 of file WorkDistrib.C.

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

Member Function Documentation

◆ operator()()

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

Definition at line 1969 of file WorkDistrib.C.

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

1969  {
1970  int crds1[3], crds2[3];
1971  tmgr.coords(pe1,crds1);
1972  tmgr.coords(pe2,crds2);
1973  for ( int i=0; i<3; ++i ) {
1974  int d = sortdims[i];
1975  if ( crds1[d] != crds2[d] ) return ( crds1[d] < crds2[d] );
1976  }
1977  const int *index = WorkDistrib::peCompactOrderingIndex;
1978  return ( index[pe1] < index[pe2] );
1979  }
static int * peCompactOrderingIndex
Definition: WorkDistrib.h:118
void coords(int pe, int *crds)
Definition: WorkDistrib.C:1946

Member Data Documentation

◆ sortdims

const int* TopoManagerWrapper::pe_sortop_topo::sortdims

Definition at line 1967 of file WorkDistrib.C.

Referenced by operator()().

◆ tmgr

TopoManagerWrapper& TopoManagerWrapper::pe_sortop_topo::tmgr

Definition at line 1966 of file WorkDistrib.C.

Referenced by operator()().


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