mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Revert "BDCSVD fix -Wmaybe-uninitialized"
This reverts merge request !1649
This commit is contained in:
@@ -52,8 +52,9 @@ struct traits<BDCSVD<MatrixType_, Options> > : svd_traits<MatrixType_, Options>
|
|||||||
|
|
||||||
template <typename MatrixType, int Options>
|
template <typename MatrixType, int Options>
|
||||||
struct allocate_small_svd {
|
struct allocate_small_svd {
|
||||||
static void run(JacobiSVD<MatrixType, Options>& smallSvd, Index rows, Index cols, unsigned int) {
|
static void run(JacobiSVD<MatrixType, Options>& smallSvd, Index rows, Index cols, unsigned int computationOptions) {
|
||||||
internal::construct_at(&smallSvd, rows, cols);
|
(void)computationOptions;
|
||||||
|
smallSvd = JacobiSVD<MatrixType, Options>(rows, cols);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ EIGEN_DISABLE_DEPRECATED_WARNING
|
|||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
struct allocate_small_svd<MatrixType, 0> {
|
struct allocate_small_svd<MatrixType, 0> {
|
||||||
static void run(JacobiSVD<MatrixType>& smallSvd, Index rows, Index cols, unsigned int computationOptions) {
|
static void run(JacobiSVD<MatrixType>& smallSvd, Index rows, Index cols, unsigned int computationOptions) {
|
||||||
internal::construct_at(&smallSvd, rows, cols, computationOptions);
|
smallSvd = JacobiSVD<MatrixType>(rows, cols, computationOptions);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -553,8 +553,7 @@ class JacobiSVD : public SVDBase<JacobiSVD<MatrixType_, Options_> > {
|
|||||||
* \deprecated Will be removed in the next major Eigen version. Options should
|
* \deprecated Will be removed in the next major Eigen version. Options should
|
||||||
* be specified in the \a Options template parameter.
|
* be specified in the \a Options template parameter.
|
||||||
*/
|
*/
|
||||||
// EIGEN_DEPRECATED // this constructor is used to allocate memory in BDCSVD
|
EIGEN_DEPRECATED JacobiSVD(Index rows, Index cols, unsigned int computationOptions) {
|
||||||
JacobiSVD(Index rows, Index cols, unsigned int computationOptions) {
|
|
||||||
internal::check_svd_options_assertions<MatrixType, Options>(computationOptions, rows, cols);
|
internal::check_svd_options_assertions<MatrixType, Options>(computationOptions, rows, cols);
|
||||||
allocate(rows, cols, computationOptions);
|
allocate(rows, cols, computationOptions);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user