struct
RawDataA strictly retrospective view of the recorded object timings.
For use with load balancers, this must typically be stacked beneath a model that predicts future loads, such as NaivePersistence
Base classes
- struct LoadModel
- Interface for transforming measurements of past object loads into predictions of future object load for load balancing strategies.
Constructors, destructors, conversion operators
- RawData() defaulted
Public functions
- void updateLoads(PhaseType last_completed_phase) override
- Signals that load data for a new phase is available.
- auto getModeledLoad(ElementIDStruct object, PhaseOffset when) const -> LoadType override
- Provide an estimate of the given object's load during a specified interval.
- auto hasRawLoad() const -> bool override
- Whether or not the model is based on the RawData model.
- auto getRawLoad(ElementIDStruct object, PhaseOffset when) const -> LoadType override
- auto hasUserData() const -> bool override
- Whether or not the model is based on the RawData model.
- auto getUserData(ElementIDStruct object, PhaseOffset when) const -> ElmUserDataType override
- auto getComm(PhaseOffset when) const -> CommMapType override
- void setLoads(std::unordered_map<PhaseType, LoadMapType> const* proc_load, std::unordered_map<PhaseType, CommMapType> const* proc_comm, std::unordered_map<PhaseType, DataMapType> const* user_data) override
- Initialize the model instance with pointers to the measured load data.
- auto begin() const -> ObjectIterator override
- auto getNumObjects() const -> int override
- auto getNumCompletedPhases() const -> unsigned int override
- auto getNumSubphases() const -> int override
- auto getNumPastPhasesNeeded(unsigned int look_back) const -> unsigned int override
- Compute how many phases of past load statistics need to be kept available for the model to use.
Public variables
- std::unordered_map<PhaseType, LoadMapType> const * proc_load_
- std::unordered_map<PhaseType, CommMapType> const * proc_comm_
- std::unordered_map<PhaseType, DataMapType> const * user_data_
- PhaseType last_completed_phase_
Function documentation
void vt:: vrt:: collection:: balance:: RawData:: updateLoads(PhaseType last_completed_phase) override
Signals that load data for a new phase is available.
For models that want to do pre-computation based on measured loads before being asked to provide predictions from them
This would typically be called by LBManager collectively inside an epoch that can be used for global communication in advance of any calls to getModeledLoad()
The setLoads
method must have been called before any call to this.
LoadType vt:: vrt:: collection:: balance:: RawData:: getModeledLoad(ElementIDStruct object,
PhaseOffset when) const override
Provide an estimate of the given object's load during a specified interval.
Parameters | |
---|---|
object in | The object whose load is desired |
when in | The interval in which the estimated load is desired |
Returns | How much computation time the object is estimated to require |
The updateLoads
method must have been called before any call to this.
void vt:: vrt:: collection:: balance:: RawData:: setLoads(std::unordered_map<PhaseType, LoadMapType> const* proc_load,
std::unordered_map<PhaseType, CommMapType> const* proc_comm,
std::unordered_map<PhaseType, DataMapType> const* user_data) override
Initialize the model instance with pointers to the measured load data.
This would typically be called by LBManager when the user has passed a new model instance for a collection
ObjectIterator vt:: vrt:: collection:: balance:: RawData:: begin() const override
Object enumeration, to abstract away access to the underlying structures from NodeLBData
The updateLoads
method must have been called before any call to this.
int vt:: vrt:: collection:: balance:: RawData:: getNumObjects() const override
Object enumeration, to abstract away access to the underlying structures from NodeLBData
The updateLoads
method must have been called before any call to this.
unsigned int vt:: vrt:: collection:: balance:: RawData:: getNumCompletedPhases() const override
Returns the number of phases of history available
The updateLoads
method must have been called before any call to this.
int vt:: vrt:: collection:: balance:: RawData:: getNumSubphases() const override
Returns the number of subphases recorded in the most recent completed phase
The updateLoads
method must have been called before any call to this.
unsigned int vt:: vrt:: collection:: balance:: RawData:: getNumPastPhasesNeeded(unsigned int look_back) const override
Compute how many phases of past load statistics need to be kept available for the model to use.
Parameters | |
---|---|
look_back in | How many phases into the past the caller intends to query |
Returns | How many phases of past load statistics will be needed to satisfy the requested history |