Skip to content

Commit

Permalink
#1934: Adapt newly added functionality in LBDataHolder to support Cir…
Browse files Browse the repository at this point in the history
…cularPhasesBuffer
  • Loading branch information
thearusable committed Sep 23, 2024
1 parent a25a83b commit 91ca1eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vt/vrt/collection/balance/lb_data_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,15 @@ std::unique_ptr<vt::tv::PhaseWork> LBDataHolder::toTV(PhaseType phase) const {

std::unordered_map<ElementIDType, ObjectWork> objects;

if (node_data_.find(phase) != node_data_.end()) {
if (node_data_.contains(phase)) {
for (auto&& elm : node_data_.at(phase)) {
ElementIDStruct id = elm.first;
double whole_phase_load = elm.second.whole_phase_load;
auto const& subphase_loads = elm.second.subphase_loads;

ElmUserDataType user_defined;
if (
user_defined_lb_info_.find(phase) != user_defined_lb_info_.end() and
user_defined_lb_info_.contains(phase) and
user_defined_lb_info_.at(phase).find(id) !=
user_defined_lb_info_.at(phase).end()
) {
Expand All @@ -367,7 +367,7 @@ std::unique_ptr<vt::tv::PhaseWork> LBDataHolder::toTV(PhaseType phase) const {
}
}

if (node_comm_.find(phase) != node_comm_.end()) {
if (node_comm_.contains(phase)) {
for (auto&& elm : node_comm_.at(phase)) {
auto const& key = elm.first;
auto const& volume = elm.second;
Expand Down Expand Up @@ -398,7 +398,7 @@ std::unordered_map<ElementIDType, tv::ObjectInfo> LBDataHolder::getObjInfo(
PhaseType phase
) const {
std::unordered_map<ElementIDType, tv::ObjectInfo> map;
if (node_data_.find(phase) != node_data_.end()) {
if (node_data_.contains(phase)) {
for (auto&& elm : node_data_.at(phase)) {
ElementIDStruct id = elm.first;

Expand Down

0 comments on commit 91ca1eb

Please sign in to comment.