Public Member Functions | Private Member Functions | Private Attributes

LibGeoDecomp::BiasBalancer Class Reference

This class is for testing purposes. More...

#include <biasbalancer.h>

Inherits LibGeoDecomp::LoadBalancer.

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

List of all members.

Public Member Functions

 BiasBalancer (LoadBalancer *balancer)
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 Member Functions

WeightVec loadOnOneNodeOnly (WeightVec weights) const

Private Attributes

bool pristine
boost::shared_ptr< LoadBalancerbalancer

Detailed Description

This class is for testing purposes.

It's meant to create an unbalanced load distribution first and then hand over to the balancer specified in the constructor.


Constructor & Destructor Documentation

LibGeoDecomp::BiasBalancer::BiasBalancer ( LoadBalancer balancer  )  [explicit]

Member Function Documentation

BiasBalancer::WeightVec LibGeoDecomp::BiasBalancer::balance ( const WeightVec weights,
const LoadVec relativeLoads 
) [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 LibGeoDecomp::LoadBalancer::balance(), loadOnOneNodeOnly(), and pristine.

BiasBalancer::WeightVec LibGeoDecomp::BiasBalancer::loadOnOneNodeOnly ( WeightVec  weights  )  const [private]

References LibGeoDecomp::sum().

Referenced by balance().


Member Data Documentation

boost::shared_ptr<LoadBalancer> LibGeoDecomp::BiasBalancer::balancer [private]

Referenced by balance().


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