PPL Logo

topo Namespace Reference

This namespace contains network topology related classes and utilities. More...


Data Structures

class  SpanningTreeStrategy
 The spanning tree build strategy interface. More...
class  SpanningTreeVertex
 Contains indices to direct children. More...
class  SpanningTreeStrategy_3dTorus_minBytesHops
 A concrete tree builder for use on machines with a 3D Torus topology. More...
class  topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >
 Partial specialization when input is a container of SpanningTreeVertices. More...
class  topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, vtxType >
 Partial specialization when input is a container of vtxTypes. More...
class  SpanningTreeStrategy_3dTorus_minHops
 A concrete tree builder for use on machines with a 3D Torus topology. More...
class  topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >
 Partial specialization for scenario for a container of SpanningTreeVertices. More...
class  topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, vtxType >
 Partial specialization for scenario when a container of vtxTypes is input. More...
class  SpanningTreeStrategy_nodeAware_minBytes
 A concrete tree builder that is aware of cpu topology (ie, node aware) while constructing spanning trees. More...
class  topo::SpanningTreeStrategy_nodeAware_minBytes< Iterator, SpanningTreeVertex >
 Partial specialization when input is a container of SpanningTreeVertices. More...
class  SpanningTreeStrategy_nodeAware_minGens
 A concrete tree builder that is aware of cpu topology (ie, node aware) while constructing spanning trees. More...
class  topo::SpanningTreeStrategy_nodeAware_minGens< Iterator, SpanningTreeVertex >
 Partial specialization for the scenario of a container of SpanningTreeVertices. More...
class  SpanningTreeStrategy_topoUnaware
 A concrete tree builder that is NOT topology aware. More...
class  topo::SpanningTreeStrategy_topoUnaware< Iterator, SpanningTreeVertex >
 Partial specialization when input is a container of SpanningTreeVertices. More...

Namespaces

namespace  impl
 Nested namespace to prevent the implementation muck from polluting topo::.

Typedefs

typedef int vtxType
 Alias for the actual data type of a vertex id (PE/node number).

Functions

template<typename Iterator>
SpanningTreeStrategy< Iterator > * getSpanningTreeStrategy (const Iterator firstVtx, const Iterator beyondLastVtx, const int maxBranches)
 Tiny factory method that returns a tree construction strategy that it thinks is best (based on inputs, the machine's network topology info etc).
int getProcID (const vtxType vtx)
int getProcID (const SpanningTreeVertex &vtx)
int numHops (const SpanningTreeVertex &vtx1, const SpanningTreeVertex &vtx2)
 Return the number of hops (on the machine network) between two vertices in the tree.
template<typename Iterator>
Iterator pickClosest (const SpanningTreeVertex &parent, const Iterator start, const Iterator end)
 Pick the vertex closes to the parent in the given range.
template<typename Iterator>
SpanningTreeVertexbuildSpanningTreeGeneration (const Iterator firstVtx, const Iterator beyondLastVtx, const int maxBranches=2)
 Builds one generation of the spanning tree given a container of vertices with the tree root as the first element in the container.
template<typename Iterator>
SpanningTreeVertexbuildSpanningTreeGeneration (const Iterator firstVtx, const Iterator beyondLastVtx, const int maxBranches, SpanningTreeStrategy< Iterator > *bldr)
 Facade function to hide all the template muck for the mainstream usecases.
template<typename Iterator>
void buildSpanningTree (const Iterator firstVtx, const Iterator beyondLastVtx, const int maxBranches=2)
 Builds the complete spanning tree given a container of vertices with the tree root as the first element in the container.
template<typename Iterator>
void buildSpanningTree (const Iterator firstVtx, const Iterator beyondLastVtx, const int maxBranches, SpanningTreeStrategy< Iterator > *bldr)
 Facade function to build a complete spanning tree given an input container of SpanningTreeVertex-es Uses tag-dispatching to ensure at compile-time that the input container holds only SpanningTreeVertex and nothing else.


Detailed Description

This namespace contains network topology related classes and utilities.

Note:
: Concrete strategy implementations depend on the definitions in this file. Hence its necessary that user code include this file and not just any of the individual strategy headers that follow.

Typedef Documentation

typedef int topo::vtxType

Alias for the actual data type of a vertex id (PE/node number).

Definition at line 114 of file spanningTreeStrategy.h.


Function Documentation

template<typename Iterator>
SpanningTreeVertex * topo::buildSpanningTreeGeneration ( const Iterator  firstVtx,
const Iterator  beyondLastVtx,
const int  maxBranches = 2 
) [inline]

Builds one generation of the spanning tree given a container of vertices with the tree root as the first element in the container.

Definition at line 212 of file spanningTreeStrategy.h.

References getSpanningTreeStrategy().

Referenced by topo::impl::buildSpanningTree(), ChunkPipeTreeMulticastStrategy::determineNextHopPEs(), and CkMulticastMgr::setup().

template<typename Iterator>
SpanningTreeVertex * topo::buildSpanningTreeGeneration ( const Iterator  firstVtx,
const Iterator  beyondLastVtx,
const int  maxBranches,
SpanningTreeStrategy< Iterator > *  bldr 
) [inline]

Facade function to hide all the template muck for the mainstream usecases.

Use when you're happy with the default spanning tree strategy. This should hide the very existence of all this template stuff for the default use-cases.

For scenarios, where you want to specify the tree building strategy, you need to supply a strategy object. In this case, instantiate a strategy object manually (the factory method getSpanningTreeStrategy() will give you what it thinks is best) and plug it into this function call.

Its advisable to use this facade even when explicitly specifying a strategy object, as this leaves room for future additions to the procedure without affecting the user code

Validate input. Invalid inputs are not exceptions. They are just no-ops

Delegate the actual work

Definition at line 193 of file spanningTreeStrategy.h.

References topo::SpanningTreeStrategy< Iterator, ValueType >::buildNextGen().

template<typename Iterator>
void topo::buildSpanningTree ( const Iterator  firstVtx,
const Iterator  beyondLastVtx,
const int  maxBranches = 2 
) [inline]

Builds the complete spanning tree given a container of vertices with the tree root as the first element in the container.

Definition at line 290 of file spanningTreeStrategy.h.

References getSpanningTreeStrategy().

Referenced by OneTimeTopoTreeMulticastStrategy::determineNextHopPEs().

template<typename Iterator>
void topo::buildSpanningTree ( const Iterator  firstVtx,
const Iterator  beyondLastVtx,
const int  maxBranches,
SpanningTreeStrategy< Iterator > *  bldr 
) [inline]

Facade function to build a complete spanning tree given an input container of SpanningTreeVertex-es Uses tag-dispatching to ensure at compile-time that the input container holds only SpanningTreeVertex and nothing else.

Create a tag

Delegate the work

Definition at line 274 of file spanningTreeStrategy.h.

References topo::impl::buildSpanningTree(), and tag.

template<typename Iterator>
SpanningTreeStrategy< Iterator > * topo::getSpanningTreeStrategy ( const Iterator  firstVtx,
const Iterator  beyondLastVtx,
const int  maxBranches 
) [inline]

Tiny factory method that returns a tree construction strategy that it thinks is best (based on inputs, the machine's network topology info etc).

Simply uses machine specific preprocessor macros to return an appropriate strategy.

Expects that these macros will be available in the current compilation unit thanks to charm innards.

Reserves the right to use other heuristics (based on the input data) to select a strategy, if such needs arise in the future.

Note:
: The list of machine macros here should sync with the ones that TopoManager is aware of.

Nested, utility class to let us to use the parent PE for different Iterator::value_types

Find the number of PEs on the same node as the parent vertex (max possible on-node destinations)

If minimizing tree generations may be more beneficial than reducing inter-node traffic

Definition at line 327 of file spanningTreeStrategy.h.

References CmiNumPesOnPhysicalNode(), CmiPhysicalNodeID(), and topo::SpanningTreeVertex::id.

Referenced by buildSpanningTree(), and buildSpanningTreeGeneration().

int topo::getProcID ( const vtxType  vtx  )  [inline]

Definition at line 60 of file spanningTreeVertex.h.

Referenced by topo::impl::buildNextGen_topoUnaware().

int topo::getProcID ( const SpanningTreeVertex &  vtx  )  [inline]

Definition at line 61 of file spanningTreeVertex.h.

References topo::SpanningTreeVertex::id.

int topo::numHops ( const SpanningTreeVertex &  vtx1,
const SpanningTreeVertex &  vtx2 
) [inline]

Return the number of hops (on the machine network) between two vertices in the tree.

Assert that the dimensions of the coordinate vectors of the two vertices are the same

Definition at line 64 of file spanningTreeVertex.h.

References abs(), and topo::SpanningTreeVertex::X.

Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), and pickClosest().

template<typename Iterator>
Iterator topo::pickClosest ( const SpanningTreeVertex &  parent,
const Iterator  start,
const Iterator  end 
) [inline]

Pick the vertex closes to the parent in the given range.

Todo:
: Static assert that Iterator::value_type == SpanningTreeVertex

Loop thro the range and identify the vertex closest to the parent

Definition at line 79 of file spanningTreeVertex.h.

References hops, and numHops().

Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), and topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen().


Generated on Sat May 26 08:13:43 2012 for Charm++ by  doxygen 1.5.5