Skip to content

Commit

Permalink
remove extra setZero()
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Nov 29, 2023
1 parent 34ad243 commit 7a609a6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions stan/math/rev/core/var.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@ class var_value<T, internal::require_matrix_var_value<T>> {
reverse_pass_callback(
[this_vi = this->vi_, other_vi = other.vi_]() mutable {
other_vi->adj_ += this_vi->adj_;
// Reset the adjoint for `this` to replicate SoA before assignment
this_vi->adj_.setZero();
});
}

Expand Down

0 comments on commit 7a609a6

Please sign in to comment.