From 9e9abab2b90f7ed006687dc5e3f1671f57e61015 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 15 Sep 2009 11:53:24 +0200 Subject: [PATCH] bugfixes for ICC (compilation and runtime) --- Eigen/src/SVD/JacobiSVD.h | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 2801ee077..4b69e67c4 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -25,6 +25,22 @@ #ifndef EIGEN_JACOBISVD_H #define EIGEN_JACOBISVD_H +// forward declarations (needed by ICC) +template::IsComplex> +struct ei_svd_precondition_2x2_block_to_be_real; + +templateMatrixType::ColsAtCompileTime))> +struct ei_svd_precondition_if_more_rows_than_cols; + +templateMatrixType::RowsAtCompileTime))> +struct ei_svd_precondition_if_more_cols_than_rows; + /** \ingroup SVD_Module * \nonstableyet * @@ -118,8 +134,8 @@ template class JacobiSVD friend struct ei_svd_precondition_if_more_cols_than_rows; }; -template::IsComplex> -struct ei_svd_precondition_2x2_block_to_be_real +template +struct ei_svd_precondition_2x2_block_to_be_real { typedef JacobiSVD SVD; static void run(typename SVD::WorkMatrixType&, JacobiSVD&, int, int) {} @@ -195,10 +211,7 @@ void ei_real_2x2_jacobi_svd(const MatrixType& matrix, int p, int q, *j_left = rot1 * j_right->transpose(); } -templateMatrixType::ColsAtCompileTime)> +template struct ei_svd_precondition_if_more_rows_than_cols { typedef JacobiSVD SVD; @@ -231,10 +244,7 @@ struct ei_svd_precondition_if_more_rows_than_cols } }; -templateMatrixType::RowsAtCompileTime)> +template struct ei_svd_precondition_if_more_cols_than_rows { typedef JacobiSVD SVD; @@ -256,7 +266,7 @@ struct ei_svd_precondition_if_more_cols_than_rows MaxColsAtCompileTime = SVD::MaxColsAtCompileTime, MatrixOptions = SVD::MatrixOptions }; - + static bool run(const MatrixType& matrix, typename SVD::WorkMatrixType& work_matrix, SVD& svd) { int rows = matrix.rows();