Skip to content

Commit d59d09a

Browse files
committed
InterParam::target_val
1 parent 0ac2ce4 commit d59d09a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

util/interp_param.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ template<typename T>
3232
struct InterpParamVariable {
3333
InterpParamVariable(unsigned num_updates = 256)
3434
: cur_val{0}
35+
, target_val{0}
3536
, step_size{0}
3637
, num_updates{num_updates} {
3738
}
3839

3940
void set_new_value(T new_val) {
41+
target_val = new_val;
4042
T d = new_val - cur_val;
4143
step_size = d / T(num_updates);
4244
}
@@ -59,6 +61,7 @@ struct InterpParamVariable {
5961
}
6062

6163
T cur_val;
64+
T target_val;
6265

6366
private:
6467
T step_size;

0 commit comments

Comments
 (0)