Fix some maybe-uninitialized warnings

Cherry-picked from 72166d0e6e and 6965f6de7f
This commit is contained in:
Christoph Hertzberg
2020-02-28 19:32:10 +01:00
parent 84364ad11d
commit 14db78c53b
2 changed files with 9 additions and 4 deletions

View File

@@ -28,9 +28,13 @@
template<typename MatrixType>
void bdcsvd(const MatrixType& a = MatrixType(), bool pickrandom = true)
{
MatrixType m = a;
if(pickrandom)
MatrixType m;
if(pickrandom) {
m.resizeLike(a);
svd_fill_random(m);
}
else
m = a;
CALL_SUBTEST(( svd_test_all_computation_options<BDCSVD<MatrixType> >(m, false) ));
}