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 29, 2022
1 parent 390f3eb commit 7ac1889
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 @@ -1366,7 +1366,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 @@ -120,7 +120,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 @@ -66,7 +66,7 @@ struct TemperedWMin : TemperedLB {
*/
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 7ac1889

Please sign in to comment.