Peano
Loading...
Searching...
No Matches
Statistics.h
Go to the documentation of this file.
1
// This file is part of the Peano project. For conditions of distribution and
2
// use, please see the copyright notice at www.peano-framework.org
3
#pragma once
4
5
6
#include "
tarch/logging/Log.h
"
7
8
9
#include "
State.h
"
10
11
12
namespace
toolbox
{
13
namespace
loadbalancing {
14
class
Statistics;
15
}
16
}
17
18
19
39
class
toolbox::loadbalancing::Statistics
{
40
public
:
41
Statistics
();
42
43
std::string
toString
()
const
;
44
61
void
updateGlobalView
();
62
63
int
getGlobalNumberOfRanksWithEnabledLoadBalancing
()
const
;
64
int
getGlobalNumberOfTrees
()
const
;
65
76
int
getNumberOfStateUpdatesWithoutAnySplit
()
const
;
77
78
int
getMaximumTreesPerRank
()
const
;
79
83
void
incLocalNumberOfSplits
(
int
delta=1 );
84
92
int
getLocalNumberOfSplits
()
const
;
93
98
void
notifyOfStateChange
(
State
state );
99
100
private
:
101
static
tarch::logging::Log
_log
;
102
106
static
constexpr
int
MaxNumberOfStateUpdatesWithoutAnySplit
= 65536;
107
111
bool
_localLoadBalancingEnabled
;
112
117
int
_localNumberOfSplits
;
118
119
int
_globalNumberOfTrees
;
120
121
int
_globalNumberOfRanksWithEnabledLoadBalancing
;
122
127
int
_globalNumberOfSplits
;
128
129
int
_numberOfStateUpdatesWithoutAnySplit
;
130
131
int
_maximumTreesPerRank
;
132
};
Log.h
State.h
tarch::logging::Log
Log Device.
Definition
Log.h:517
toolbox::loadbalancing::Statistics
Statistics helper routine for load balancing.
Definition
Statistics.h:39
toolbox::loadbalancing::Statistics::_localNumberOfSplits
int _localNumberOfSplits
Rank-local accumulator where I keep track of how often I did split since the last updateGlobalView().
Definition
Statistics.h:117
toolbox::loadbalancing::Statistics::getMaximumTreesPerRank
int getMaximumTreesPerRank() const
toolbox::loadbalancing::Statistics::getGlobalNumberOfRanksWithEnabledLoadBalancing
int getGlobalNumberOfRanksWithEnabledLoadBalancing() const
toolbox::loadbalancing::Statistics::_maximumTreesPerRank
int _maximumTreesPerRank
Definition
Statistics.h:131
toolbox::loadbalancing::Statistics::MaxNumberOfStateUpdatesWithoutAnySplit
static constexpr int MaxNumberOfStateUpdatesWithoutAnySplit
Saturation value of getNumberOfStateUpdatesWithoutAnySplit()
Definition
Statistics.h:106
toolbox::loadbalancing::Statistics::_numberOfStateUpdatesWithoutAnySplit
int _numberOfStateUpdatesWithoutAnySplit
Definition
Statistics.h:129
toolbox::loadbalancing::Statistics::getGlobalNumberOfTrees
int getGlobalNumberOfTrees() const
toolbox::loadbalancing::Statistics::_globalNumberOfSplits
int _globalNumberOfSplits
Sum of all ranks' local number of splits at the last updateGlobalView()
Definition
Statistics.h:127
toolbox::loadbalancing::Statistics::_globalNumberOfRanksWithEnabledLoadBalancing
int _globalNumberOfRanksWithEnabledLoadBalancing
Definition
Statistics.h:121
toolbox::loadbalancing::Statistics::_localLoadBalancingEnabled
bool _localLoadBalancingEnabled
Rank-local: Is the load balancing on this rank switched on.
Definition
Statistics.h:111
toolbox::loadbalancing::Statistics::_log
static tarch::logging::Log _log
Definition
Statistics.h:101
toolbox::loadbalancing::Statistics::updateGlobalView
void updateGlobalView()
Update the global statistics view on all ranks.
toolbox::loadbalancing::Statistics::toString
std::string toString() const
toolbox::loadbalancing::Statistics::incLocalNumberOfSplits
void incLocalNumberOfSplits(int delta=1)
Rank-local: Bookmark that this rank has triggered a split.
toolbox::loadbalancing::Statistics::getNumberOfStateUpdatesWithoutAnySplit
int getNumberOfStateUpdatesWithoutAnySplit() const
Number of updateGlobalView() calls without any split on any rank.
toolbox::loadbalancing::Statistics::_globalNumberOfTrees
int _globalNumberOfTrees
Definition
Statistics.h:119
toolbox::loadbalancing::Statistics::getLocalNumberOfSplits
int getLocalNumberOfSplits() const
Number of splits this rank has triggered since the last updateGlobalView()
toolbox::loadbalancing::Statistics::notifyOfStateChange
void notifyOfStateChange(State state)
Rank-local: Memorise whether the load balancing on this rank is switched on.
toolbox::loadbalancing::Statistics::Statistics
Statistics()
toolbox::loadbalancing::State
State
State descriptor of load balancing.
Definition
State.h:22
toolbox
Definition
InterpolationRestriction.h:10
src
toolbox
loadbalancing
Statistics.h
Generated on Wed Nov 4 2026 08:20:47 for Peano by
1.9.8