diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index 192f42f07..6b85d1d5a 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -50,26 +50,6 @@ struct traits > : svd_traits typedef MatrixType_ MatrixType; }; -template -struct allocate_small_svd { - static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - (void)computationOptions; - smallSvd = JacobiSVD(rows, cols); - } -}; - -EIGEN_DIAGNOSTICS(push) -EIGEN_DISABLE_DEPRECATED_WARNING - -template -struct allocate_small_svd { - static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - smallSvd = JacobiSVD(rows, cols, computationOptions); - } -}; - -EIGEN_DIAGNOSTICS(pop) - } // end namespace internal /** \ingroup SVD_Module @@ -289,7 +269,7 @@ void BDCSVD::allocate(Index rows, Index cols, unsigned int if (Base::allocate(rows, cols, computationOptions)) return; if (cols < m_algoswap) - internal::allocate_small_svd::run(smallSvd, rows, cols, computationOptions); + smallSvd.allocate(rows, cols, Options == 0 ? computationOptions : internal::get_computation_options(Options)); m_computed = MatrixXr::Zero(diagSize() + 1, diagSize()); m_compU = computeV(); diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 615aad149..e81db2dc2 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -611,7 +611,6 @@ class JacobiSVD : public SVDBase > { using Base::rank; using Base::rows; - private: void allocate(Index rows_, Index cols_, unsigned int computationOptions) { if (Base::allocate(rows_, cols_, computationOptions)) return; eigen_assert(!(ShouldComputeThinU && int(QRPreconditioner) == int(FullPivHouseholderQRPreconditioner)) && @@ -624,6 +623,7 @@ class JacobiSVD : public SVDBase > { if (rows() > cols()) m_qr_precond_morerows.allocate(*this); } + private: JacobiSVD& compute_impl(const MatrixType& matrix, unsigned int computationOptions); protected: