Skip to content

Commit

Permalink
#2261: elm: add settime to elmlbdata
Browse files Browse the repository at this point in the history
  • Loading branch information
nlslatt committed Mar 25, 2024
1 parent 77081f5 commit c80279e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/vt/elm/elm_lb_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,26 @@ 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<LoadType> const& subphaseLoads
) {
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;

Expand Down
3 changes: 3 additions & 0 deletions src/vt/elm/elm_lb_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ struct ElementLBData {
void start(TimeType time);
void stop(TimeType time);
void addTime(LoadType const timeLoad);
void setTime(
LoadType const timeLoad, std::vector<LoadType> const& subphaseLoads
);

void sendToEntity(ElementIDStruct to, ElementIDStruct from, double bytes);
void sendComm(elm::CommKey key, double bytes);
Expand Down

0 comments on commit c80279e

Please sign in to comment.