diff --git a/src/vt/vrt/collection/balance/model/comm_model.cc b/src/vt/vrt/collection/balance/model/weighted_messages.cc similarity index 94% rename from src/vt/vrt/collection/balance/model/comm_model.cc rename to src/vt/vrt/collection/balance/model/weighted_messages.cc index 7ddb8280fa..59613032ff 100644 --- a/src/vt/vrt/collection/balance/model/comm_model.cc +++ b/src/vt/vrt/collection/balance/model/weighted_messages.cc @@ -2,7 +2,7 @@ //@HEADER // ***************************************************************************** // -// comm_model.cc +// weighted_messages.cc // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC @@ -41,11 +41,11 @@ //@HEADER */ -#include "vt/vrt/collection/balance/model/comm_model.h" +#include "vt/vrt/collection/balance/model/weighted_messages.h" namespace vt { namespace vrt { namespace collection { namespace balance { -TimeType CommModel::getModeledComm(ElementIDStruct object, PhaseOffset when) { +TimeType WeightedMessages::getModeledComm(ElementIDStruct object, PhaseOffset when) { auto phase = getNumCompletedPhases() + when.phases; auto& comm = proc_comm_->at(phase); diff --git a/src/vt/vrt/collection/balance/model/comm_model.h b/src/vt/vrt/collection/balance/model/weighted_messages.h similarity index 92% rename from src/vt/vrt/collection/balance/model/comm_model.h rename to src/vt/vrt/collection/balance/model/weighted_messages.h index c65c53832b..37debf9b36 100644 --- a/src/vt/vrt/collection/balance/model/comm_model.h +++ b/src/vt/vrt/collection/balance/model/weighted_messages.h @@ -2,7 +2,7 @@ //@HEADER // ***************************************************************************** // -// comm_model.h +// weighted_messages.h // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC @@ -41,15 +41,15 @@ //@HEADER */ -#if !defined INCLUDED_VT_VRT_COLLECTION_BALANCE_MODEL_COMM_MODEL_H -#define INCLUDED_VT_VRT_COLLECTION_BALANCE_MODEL_COMM_MODEL_H +#if !defined INCLUDED_VT_VRT_COLLECTION_BALANCE_MODEL_WEIGHTED_MESSAGES_H +#define INCLUDED_VT_VRT_COLLECTION_BALANCE_MODEL_WEIGHTED_MESSAGES_H #include "vt/vrt/collection/balance/model/composed_model.h" #include namespace vt { namespace vrt { namespace collection { namespace balance { -struct CommModel : public ComposedModel { +struct WeightedMessages : public ComposedModel { /** * \brief Constructor * @@ -57,7 +57,7 @@ struct CommModel : public ComposedModel { * \param[in] in_per_msg_weight weight to add per message received * \param[in] in_per_byte_weight weight to add per byte received */ - explicit CommModel( + explicit WeightedMessages( std::shared_ptr base, TimeType in_per_msg_weight, TimeType in_per_byte_weight ) : ComposedModel(base), diff --git a/tests/unit/collection/test_model_comm_model.nompi.cc b/tests/unit/collection/test_model_comm_model.nompi.cc index 16f795d054..805ea8292c 100644 --- a/tests/unit/collection/test_model_comm_model.nompi.cc +++ b/tests/unit/collection/test_model_comm_model.nompi.cc @@ -42,7 +42,7 @@ */ #include -#include +#include #include @@ -52,13 +52,13 @@ namespace vt { namespace tests { namespace unit { namespace comm { namespace model { -using TestModelCommModel = TestHarness; +using TestModelWeightedMessages = TestHarness; using vt::elm::CommKeyType; using vt::elm::CommMapType; using vt::elm::CommVolume; using vt::elm::ElementIDStruct; -using vt::vrt::collection::balance::CommModel; +using vt::vrt::collection::balance::WeightedMessages; using vt::vrt::collection::balance::LoadMapType; using vt::vrt::collection::balance::LoadModel; using vt::vrt::collection::balance::ObjectIterator; @@ -107,7 +107,7 @@ struct StubModel : LoadModel { ProcLoadMap const* proc_load_ = nullptr; }; -TEST_F(TestModelCommModel, test_comm_model) { +TEST_F(TestModelWeightedMessages, test_model) { // For simplicity's sake, the elements are on the home node // Element 1 (home node == 1) @@ -146,7 +146,7 @@ TEST_F(TestModelCommModel, test_comm_model) { constexpr auto per_msg_weight = 3.0; constexpr auto per_byte_weight = 5.0; - auto test_model = std::make_shared( + auto test_model = std::make_shared( std::make_shared(), per_msg_weight, per_byte_weight ); test_model->setLoads(&proc_load, &proc_comm);