Skip to content

Commit

Permalink
#1830: make getModeledWork const
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Jun 22, 2022
1 parent 413f98c commit d8c4387
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ void TemperedLB::migrate() {
vtAssertExpr(false);
}

TimeType TemperedLB::getModeledWork(const elm::ElementIDStruct& obj) {
TimeType TemperedLB::getModeledWork(const elm::ElementIDStruct& obj) const {
return load_model_->getModeledLoad(
obj, {balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE}
);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/temperedlb/temperedlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct TemperedLB : BaseLB {
ElementLoadType::iterator selectObject(
LoadType size, ElementLoadType& load, std::set<ObjIDType> const& available
);
virtual TimeType getModeledWork(const elm::ElementIDStruct& obj);
virtual TimeType getModeledWork(const elm::ElementIDStruct& obj) const;

void lazyMigrateObjsTo(EpochType epoch, NodeType node, ObjsType const& objs);
void inLazyMigrations(balance::LazyMigrationMsg* msg);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void TemperedWMin::inputParams(balance::SpecEntry* spec) {
);
}

TimeType TemperedWMin::getModeledWork(const elm::ElementIDStruct& obj) {
TimeType TemperedWMin::getModeledWork(const elm::ElementIDStruct& obj) const {
balance::PhaseOffset when =
{balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE};

Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/temperedwmin/temperedwmin.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct TemperedWMin : TemperedLB {
protected:
bool canPropagate() const override { return true; }

TimeType getModeledWork(const elm::ElementIDStruct& obj) override;
TimeType getModeledWork(const elm::ElementIDStruct& obj) const override;

private:
double alpha_ = 1.0;
Expand Down

0 comments on commit d8c4387

Please sign in to comment.