Skip to content

Commit

Permalink
Fix a dangling reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleroy committed Jan 6, 2024
1 parent 29d9330 commit 21c533c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numerics/matrix_computations_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ void Premultiply(HouseholderReflection const& P, Matrix& A) {
// A becomes A P.
template<typename Matrix>
void PostMultiply(Matrix& A, HouseholderReflection const& P) {
auto const βᵗv = TransposedView{P.β * P.v}; // NOLINT
auto const βv = P.β * P.v;
auto const βᵗv = TransposedView{βv}; // NOLINT
auto const Av = A * P.v;
A -= Av * βᵗv;
}
Expand Down

0 comments on commit 21c533c

Please sign in to comment.