Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Nov 27, 2023
1 parent f5d49a6 commit a8ab023
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions stan/math/rev/core/arena_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class arena_matrix : public Eigen::Map<MatrixType> {
Base::operator=(a);
return *this;
}
/**
* Forces hard copying matrices into an arena matrix
* @tparam T Any type assignable to `Base`
* @param x the values to write to `this`
*/
template <typename T>
void hard_copy(const T& x) {
Base::operator=(x);
Expand Down
2 changes: 1 addition & 1 deletion stan/math/rev/core/var.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ 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 a8ab023

Please sign in to comment.