51
51
namespace vt { namespace elm {
52
52
53
53
void ElementLBData::start (TimeType time) {
54
- TimeTypeWrapper const start_time = time ;
55
- cur_time_ = start_time. seconds () ;
54
+ auto const start_time = time ;
55
+ cur_time_ = start_time;
56
56
cur_time_started_ = true ;
57
57
58
58
vt_debug_print (
@@ -63,13 +63,13 @@ void ElementLBData::start(TimeType time) {
63
63
}
64
64
65
65
void ElementLBData::stop (TimeType time) {
66
- TimeTypeWrapper const stop_time = time ;
67
- TimeTypeWrapper const total_time = stop_time. seconds () - cur_time_;
66
+ auto const stop_time = time ;
67
+ auto const total_time = stop_time - cur_time_;
68
68
// vtAssert(cur_time_started_, "Must have started time");
69
69
auto const started = cur_time_started_;
70
70
if (started) {
71
71
cur_time_started_ = false ;
72
- addTime (total_time);
72
+ addTime (total_time. seconds () );
73
73
}
74
74
75
75
vt_debug_print (
@@ -124,17 +124,17 @@ void ElementLBData::recvToNode(
124
124
recvComm (key, bytes);
125
125
}
126
126
127
- void ElementLBData::addTime (TimeTypeWrapper const & time ) {
128
- phase_timings_[cur_phase_] += time . seconds () ;
127
+ void ElementLBData::addTime (LoadType const timeLoad ) {
128
+ phase_timings_[cur_phase_] += timeLoad ;
129
129
130
130
subphase_timings_[cur_phase_].resize (cur_subphase_ + 1 );
131
- subphase_timings_[cur_phase_].at (cur_subphase_) += time . seconds () ;
131
+ subphase_timings_[cur_phase_].at (cur_subphase_) += timeLoad ;
132
132
133
133
vt_debug_print (
134
134
verbose,lb,
135
135
" ElementLBData: addTime: time={}, cur_load={}\n " ,
136
136
time ,
137
- TimeTypeWrapper ( phase_timings_[cur_phase_])
137
+ phase_timings_[cur_phase_]
138
138
);
139
139
}
140
140
@@ -163,43 +163,43 @@ PhaseType ElementLBData::getPhase() const {
163
163
return cur_phase_;
164
164
}
165
165
166
- TimeType ElementLBData::getLoad (PhaseType const & phase) const {
166
+ LoadType ElementLBData::getLoad (PhaseType const & phase) const {
167
167
auto iter = phase_timings_.find (phase);
168
168
if (iter != phase_timings_.end ()) {
169
- TimeTypeWrapper const total_load = phase_timings_.at (phase);
169
+ auto const total_load = phase_timings_.at (phase);
170
170
171
171
vt_debug_print (
172
172
verbose, lb,
173
173
" ElementLBData: getLoad: load={}, phase={}, size={}\n " ,
174
174
total_load, phase, phase_timings_.size ()
175
175
);
176
176
177
- return total_load. seconds () ;
177
+ return total_load;
178
178
} else {
179
179
return 0.0 ;
180
180
}
181
181
}
182
182
183
- TimeType
183
+ LoadType
184
184
ElementLBData::getLoad (PhaseType phase, SubphaseType subphase) const {
185
185
if (subphase == no_subphase)
186
186
return getLoad (phase);
187
187
188
188
auto const & subphase_loads = subphase_timings_.at (phase);
189
189
190
190
vtAssert (subphase_loads.size () > subphase, " Must have subphase" );
191
- TimeTypeWrapper const total_load = subphase_loads.at (subphase);
191
+ auto const total_load = subphase_loads.at (subphase);
192
192
193
193
vt_debug_print (
194
194
verbose, lb,
195
195
" ElementLBData: getLoad: load={}, phase={}, subphase={}\n " ,
196
196
total_load, phase, subphase
197
197
);
198
198
199
- return total_load. seconds () ;
199
+ return total_load;
200
200
}
201
201
202
- std::vector<TimeType > const & ElementLBData::getSubphaseTimes (PhaseType phase) {
202
+ std::vector<LoadType > const & ElementLBData::getSubphaseTimes (PhaseType phase) {
203
203
return subphase_timings_[phase];
204
204
}
205
205
0 commit comments