Public Member Functions | Private Attributes | Friends

LibGeoDecomp::TracingBalancer Class Reference

This class relies on another LoadBalancer to do the job, but is able to pass debug output. More...

#include <tracingbalancer.h>

Inherits LibGeoDecomp::LoadBalancer.

Collaboration diagram for LibGeoDecomp::TracingBalancer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TracingBalancer (LoadBalancer *balancer, std::ostream &stream=std::cout)
virtual WeightVec balance (const WeightVec &weights, const LoadVec &relativeLoads)
 Given the current workload distribution weights and the work time / wall clock time ratio relativeLoads for each node, return a new, possibly better distribution "newLoads".

Private Attributes

boost::shared_ptr< LoadBalancerbalancer
std::ostream & stream

Friends

class Serialization

Detailed Description

This class relies on another LoadBalancer to do the job, but is able to pass debug output.


Constructor & Destructor Documentation

LibGeoDecomp::TracingBalancer::TracingBalancer ( LoadBalancer balancer,
std::ostream &  stream = std::cout 
) [inline, explicit]

Member Function Documentation

virtual WeightVec LibGeoDecomp::TracingBalancer::balance ( const WeightVec weights,
const LoadVec relativeLoads 
) [inline, virtual]

Given the current workload distribution weights and the work time / wall clock time ratio relativeLoads for each node, return a new, possibly better distribution "newLoads".

Wall clock time is the sum of the work time and the waiting time during which a node is blocking on communication to other nodes.

NOTE: The sum of the elements in weights and the return value "newLoads" has to match, as the underlying assumption is, that this sum is the number of smallest, atomic work items that can be exchanged between to nodes. More formally:

\[ \sum_{i=0}^{i<n} \mbox{weights}[i] = \sum_{i=0}^{i<n} \mbox{newLoads}[i] \qquad \mbox{where:}\quad n = |\mbox{weights}| = |\mbox{newLoads}| \]

Implements LibGeoDecomp::LoadBalancer.

References balancer, and stream.


Friends And Related Function Documentation

friend class Serialization [friend]

Reimplemented from LibGeoDecomp::LoadBalancer.


Member Data Documentation

Referenced by balance().

std::ostream& LibGeoDecomp::TracingBalancer::stream [private]

Referenced by balance().


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