Skip to content

Commit

Permalink
#2150: LB: Remove old toMilli function and use TimeType's millisecond…
Browse files Browse the repository at this point in the history
…s() instead
  • Loading branch information
JacobDomagala committed Sep 26, 2023
1 parent fc186b3 commit f1c89d3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/vt/vrt/collection/balance/baselb/baselb.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ struct BaseLB {
balance::DataMapType const& in_data_map
);

static LoadType loadMilli(LoadType const& load);

void notifyCurrentHostNodeOfObjectsDeparting(
TransferMsg<ObjDestinationListType>* msg
);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/baselb/load_sampler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void LoadSamplerBaseLB::buildHistogram() {
TimeType load = load_model_->getModeledLoad(
obj, {balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE}
);
auto const& load_milli = loadMilli(load.seconds());
auto const& load_milli = load.milliseconds();
auto const& bin = histogramSample(load_milli);
if (obj.isMigratable()) {
obj_sample[bin].push_back(obj);
Expand Down
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/balance/greedylb/greedylb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ void GreedyLB::loadOverBin(ObjBinType bin, ObjBinListType& bin_list) {
load_over[bin].push_back(obj_id);
bin_list.pop_back();

auto const& obj_time_milli = loadMilli(load_model_->getModeledLoad(
auto const& obj_time_milli = load_model_->getModeledLoad(
obj_id, {balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE}
).seconds());
).milliseconds();

this_load -= obj_time_milli;

Expand Down
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ void HierarchicalLB::loadOverBin(ObjBinType bin, ObjBinListType& bin_list) {
load_over[bin].push_back(obj_id);
bin_list.pop_back();

auto const& obj_time_milli = loadMilli(load_model_->getModeledLoad(obj_id,
auto const& obj_time_milli = load_model_->getModeledLoad(obj_id,
{balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE}
).seconds());
).milliseconds();

this_load -= obj_time_milli;

Expand Down
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void ZoltanLB::inputParams(balance::ConfigEntry* config) {

void ZoltanLB::runLB(LoadType total_load) {
auto const& this_node = theContext()->getNode();
this_load = loadMilli(total_load);
this_load = total_load.milliseconds();

if (this_node == 0) {
vt_debug_print(terse, lb, "ZoltanLB: runLB: edges={}\n", do_edges_);
Expand Down Expand Up @@ -485,7 +485,7 @@ std::unique_ptr<ZoltanLB::Graph> ZoltanLB::makeGraph() {
obj,
{balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE}
);
auto time = static_cast<int>(loadMilli(load));
auto time = load.milliseconds();
graph->vertex_weight[idx++] = time;
}
}
Expand Down

0 comments on commit f1c89d3

Please sign in to comment.