Skip to content

Commit 7a609a6

Browse files
committed
remove extra setZero()
1 parent 34ad243 commit 7a609a6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

stan/math/rev/core/var.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,6 @@ class var_value<T, internal::require_matrix_var_value<T>> {
390390
reverse_pass_callback(
391391
[this_vi = this->vi_, other_vi = other.vi_]() mutable {
392392
other_vi->adj_ += this_vi->adj_;
393-
// Reset the adjoint for `this` to replicate SoA before assignment
394-
this_vi->adj_.setZero();
395393
});
396394
}
397395

0 commit comments

Comments
 (0)