Skip to content

Commit

Permalink
#708: ProcStats: add method for LB strategies to get subphase loads a…
Browse files Browse the repository at this point in the history
…s desired
  • Loading branch information
Phil Miller authored and lifflander committed Jun 10, 2020
1 parent e508be0 commit 45a6f50
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vt/vrt/collection/balance/proc_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ ProcStats::getProcLoad(PhaseType phase) const {
return proc_data_.at(phase);
}

ProcStats::SubphaseLoadMapType const&
ProcStats::getProcSubphaseLoad(PhaseType phase) const {
vtAssert(proc_subphase_data_.size() > phase, "Phase must exist in load data");
return proc_subphase_data_.at(phase);
}

CommMapType const& ProcStats::getProcComm(PhaseType phase) const {
vtAssert(proc_comm_.size() > phase, "Phase must exist in comm data");
return proc_comm_.at(phase);
Expand Down
9 changes: 9 additions & 0 deletions src/vt/vrt/collection/balance/proc_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ struct ProcStats : runtime::component::Component<ProcStats> {
*/
LoadMapType const& getProcLoad(PhaseType phase) const;

/**
* \internal \brief Get object loads for the subphases of a given phase
*
* \param[in] phase the phase
*
* \return the subphase load map
*/
SubphaseLoadMapType const& getProcSubphaseLoad(PhaseType phase) const;

/**
* \internal \brief Get object comm graph for a given phase
*
Expand Down

0 comments on commit 45a6f50

Please sign in to comment.