diff --git a/src/vt/elm/elm_lb_data.cc b/src/vt/elm/elm_lb_data.cc index a15ee4d3eb..71796b3b60 100644 --- a/src/vt/elm/elm_lb_data.cc +++ b/src/vt/elm/elm_lb_data.cc @@ -133,11 +133,27 @@ void ElementLBData::addTime(LoadType const timeLoad) { vt_debug_print( verbose,lb, "ElementLBData: addTime: time={}, cur_load={}\n", - time, + timeLoad, phase_timings_[cur_phase_] ); } +void ElementLBData::setTime( + LoadType const timeLoad, + std::vector const& subphaseLoads +) { + // warning: this will override any existing time that might be there + phase_timings_[cur_phase_] = timeLoad; + + subphase_timings_[cur_phase_] = subphaseLoads; + + vt_debug_print( + verbose,lb, + "ElementLBData: setTime: time={}\n", + timeLoad + ); +} + void ElementLBData::setPhase(PhaseType const& new_phase) { cur_phase_ = new_phase; diff --git a/src/vt/elm/elm_lb_data.h b/src/vt/elm/elm_lb_data.h index 1ae770e484..01b6c4c8b6 100644 --- a/src/vt/elm/elm_lb_data.h +++ b/src/vt/elm/elm_lb_data.h @@ -64,6 +64,10 @@ struct ElementLBData { void start(TimeType time); void stop(TimeType time); void addTime(LoadType const timeLoad); + /// warning: this will override any existing time that might be there + void setTime( + LoadType const timeLoad, std::vector const& subphaseLoads + ); void sendToEntity(ElementIDStruct to, ElementIDStruct from, double bytes); void sendComm(elm::CommKey key, double bytes);