From 7ac1889153b0dade639d349e82714c92895caf0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Wed, 22 Jun 2022 19:21:53 +0200 Subject: [PATCH] #1830: make `getModeledWork` const --- src/vt/vrt/collection/balance/temperedlb/temperedlb.cc | 2 +- src/vt/vrt/collection/balance/temperedlb/temperedlb.h | 2 +- src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc | 2 +- src/vt/vrt/collection/balance/temperedwmin/temperedwmin.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc index 302402175a..2310012bc4 100644 --- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc +++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc @@ -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} ); diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.h b/src/vt/vrt/collection/balance/temperedlb/temperedlb.h index f8f9046b33..be07298b25 100644 --- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.h +++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.h @@ -120,7 +120,7 @@ struct TemperedLB : BaseLB { ElementLoadType::iterator selectObject( LoadType size, ElementLoadType& load, std::set 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); diff --git a/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc b/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc index fc97ebcb91..e904309f26 100644 --- a/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc +++ b/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc @@ -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}; diff --git a/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.h b/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.h index 386e0c03d9..e0cdc03dfa 100644 --- a/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.h +++ b/src/vt/vrt/collection/balance/temperedwmin/temperedwmin.h @@ -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;