Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends

LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER > Class Template Reference

#include <hpxsimulator.h>

Inherits LibGeoDecomp::DistributedSimulator< CELL_TYPE >.

Collaboration diagram for LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef DistributedSimulator
< CELL_TYPE >::Topology 
Topology
typedef
LibGeoDecomp::DistributedSimulator
< CELL_TYPE > 
ParentType
typedef UpdateGroup< CELL_TYPE,
PARTITION, STEPPER > 
UpdateGroupType
typedef ParentType::GridType GridType

Public Member Functions

 HpxSimulator (Initializer< CELL_TYPE > *initializer, const float overcommitFactor, LoadBalancer *balancer=0, const unsigned loadBalancingPeriod=1, const unsigned ghostZoneWidth=1)
 HpxSimulator (Initializer< CELL_TYPE > *initializer, const hpx::util::function< std::size_t()> &numUpdateGroups, LoadBalancer *balancer=0, const unsigned loadBalancingPeriod=1, const unsigned ghostZoneWidth=1)
void calculateBoundingBoxes (std::vector< CoordBox< DIM > > &boundingBoxes, std::size_t rank_start, std::size_t rank_end, const CoordBox< DIM > &box, const std::vector< std::size_t > &weights)
void init ()
void run ()
 performs step() until the maximum number of steps is reached.
void stop ()
void step ()
 performs a single simulation step.
virtual unsigned getStep () const
 returns the number of the current logical simulation step.
virtual void addSteerer (Steerer< CELL_TYPE > *steerer)
 adds a Steerer which will be called back before simulation steps as specified by the Steerer's period.
virtual void addWriter (ParallelWriter< CELL_TYPE > *writer)
 register writer which will observe the simulation.
std::size_t numUpdateGroups () const
std::vector< ChronometergatherStatistics ()
 Returns histograms which detail how much execution time was spent on which part of the algorithm.

Static Public Attributes

static const int DIM = Topology::DIM

Private Member Functions

std::vector< ChronometernanoStep (std::size_t remainingNanoSteps)
std::vector< std::size_t > initialWeights (const std::size_t items, const std::size_t size) const
std::vector< ChronometerrunTimed ()

Private Attributes

boost::shared_ptr< LoadBalancerbalancer
unsigned loadBalancingPeriod
unsigned ghostZoneWidth
PartitionManager< TopologypartitionManager
std::vector< hpx::id_type > updateGroupsIds
boost::atomic< boolinitialized
std::vector< Chronometerstatistics

Friends

class HpxSimulatorTest

template<class CELL_TYPE, class PARTITION, class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
class LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >


Member Typedef Documentation

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
typedef ParentType::GridType LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::GridType
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
typedef LibGeoDecomp::DistributedSimulator<CELL_TYPE> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::ParentType
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
typedef DistributedSimulator<CELL_TYPE>::Topology LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::Topology
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
typedef UpdateGroup<CELL_TYPE, PARTITION, STEPPER> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::UpdateGroupType

Constructor & Destructor Documentation

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::HpxSimulator ( Initializer< CELL_TYPE > *  initializer,
const float  overcommitFactor,
LoadBalancer balancer = 0,
const unsigned  loadBalancingPeriod = 1,
const unsigned  ghostZoneWidth = 1 
) [inline]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::HpxSimulator ( Initializer< CELL_TYPE > *  initializer,
const hpx::util::function< std::size_t()> &  numUpdateGroups,
LoadBalancer balancer = 0,
const unsigned  loadBalancingPeriod = 1,
const unsigned  ghostZoneWidth = 1 
) [inline]

Member Function Documentation

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
virtual void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::addSteerer ( Steerer< CELL_TYPE > *  steerer  )  [inline, virtual]

adds a Steerer which will be called back before simulation steps as specified by the Steerer's period.

The Steerer is assumed to be owned by the Simulator. It will destroy the Steerer upon its death.

Reimplemented from LibGeoDecomp::Simulator< CELL_TYPE >.

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
virtual void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::addWriter ( ParallelWriter< CELL_TYPE > *  writer  )  [inline, virtual]

register writer which will observe the simulation.

The DistributedSimulator will assume that it now owns the ParallelWriter, so it'll delete it upon destruction.

Reimplemented from LibGeoDecomp::DistributedSimulator< CELL_TYPE >.

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::calculateBoundingBoxes ( std::vector< CoordBox< DIM > > &  boundingBoxes,
std::size_t  rank_start,
std::size_t  rank_end,
const CoordBox< DIM > &  box,
const std::vector< std::size_t > &  weights 
) [inline]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::vector<Chronometer> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::gatherStatistics (  )  [inline, virtual]

Returns histograms which detail how much execution time was spent on which part of the algorithm.

Will return one element per rank.

Implements LibGeoDecomp::Simulator< CELL_TYPE >.

References LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::statistics.

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
virtual unsigned LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::getStep (  )  const [inline, virtual]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::init (  )  [inline]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::vector<std::size_t> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::initialWeights ( const std::size_t  items,
const std::size_t  size 
) const [inline, private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::vector<Chronometer> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::nanoStep ( std::size_t  remainingNanoSteps  )  [inline, private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::size_t LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::numUpdateGroups (  )  const [inline]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::run (  )  [inline, virtual]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::vector<Chronometer> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::runTimed (  )  [inline, private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::step (  )  [inline, virtual]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
void LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::stop (  )  [inline]

Friends And Related Function Documentation

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
friend class HpxSimulatorTest [friend]

Member Data Documentation

template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
boost::shared_ptr<LoadBalancer> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::balancer [private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
const int LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::DIM = Topology::DIM [static]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
unsigned LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::ghostZoneWidth [private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
boost::atomic<bool> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::initialized [private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
unsigned LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::loadBalancingPeriod [private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
PartitionManager<Topology> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::partitionManager [private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::vector<Chronometer> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::statistics [private]
template<class CELL_TYPE , class PARTITION , class STEPPER = LibGeoDecomp::HiParSimulator::HpxStepper<CELL_TYPE>>
std::vector<hpx::id_type> LibGeoDecomp::HpxSimulator::HpxSimulator< CELL_TYPE, PARTITION, STEPPER >::updateGroupsIds [private]

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