mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
Make absolutely sure that tau is initialized (this change suppresses a gcc warning)
This commit is contained in:
parent
4577bafb91
commit
309620ee1f
@ -476,7 +476,7 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
|
|||||||
}
|
}
|
||||||
} // End update current column
|
} // End update current column
|
||||||
|
|
||||||
Scalar tau;
|
Scalar tau = 0;
|
||||||
RealScalar beta = 0;
|
RealScalar beta = 0;
|
||||||
|
|
||||||
if(nonzeroCol < diagSize)
|
if(nonzeroCol < diagSize)
|
||||||
@ -490,7 +490,6 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
|
|||||||
for (Index itq = 1; itq < nzcolQ; ++itq) sqrNorm += numext::abs2(tval(Qidx(itq)));
|
for (Index itq = 1; itq < nzcolQ; ++itq) sqrNorm += numext::abs2(tval(Qidx(itq)));
|
||||||
if(sqrNorm == RealScalar(0) && numext::imag(c0) == RealScalar(0))
|
if(sqrNorm == RealScalar(0) && numext::imag(c0) == RealScalar(0))
|
||||||
{
|
{
|
||||||
tau = RealScalar(0);
|
|
||||||
beta = numext::real(c0);
|
beta = numext::real(c0);
|
||||||
tval(Qidx(0)) = 1;
|
tval(Qidx(0)) = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user