aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-09-15 11:53:24 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-09-15 11:53:24 +0200
commit9e9abab2b90f7ed006687dc5e3f1671f57e61015 (patch)
tree98f87a2fa07e6335689e874ec1470c2443ba4bc1 /Eigen
parent432fcefcb1ddffd8293ec2443234232eb64f199c (diff)
bugfixes for ICC (compilation and runtime)
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/SVD/JacobiSVD.h32
1 files 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<typename MatrixType, unsigned int Options, bool IsComplex = NumTraits<typename MatrixType::Scalar>::IsComplex>
+struct ei_svd_precondition_2x2_block_to_be_real;
+
+template<typename MatrixType, unsigned int Options,
+ bool PossiblyMoreRowsThanCols = (Options & AtLeastAsManyColsAsRows) == 0
+ && (MatrixType::RowsAtCompileTime==Dynamic
+ || (MatrixType::RowsAtCompileTime>MatrixType::ColsAtCompileTime))>
+struct ei_svd_precondition_if_more_rows_than_cols;
+
+template<typename MatrixType, unsigned int Options,
+ bool PossiblyMoreColsThanRows = (Options & AtLeastAsManyRowsAsCols) == 0
+ && (MatrixType::ColsAtCompileTime==Dynamic
+ || (MatrixType::ColsAtCompileTime>MatrixType::RowsAtCompileTime))>
+struct ei_svd_precondition_if_more_cols_than_rows;
+
/** \ingroup SVD_Module
* \nonstableyet
*
@@ -118,8 +134,8 @@ template<typename MatrixType, unsigned int Options> class JacobiSVD
friend struct ei_svd_precondition_if_more_cols_than_rows;
};
-template<typename MatrixType, unsigned int Options, bool IsComplex = NumTraits<typename MatrixType::Scalar>::IsComplex>
-struct ei_svd_precondition_2x2_block_to_be_real
+template<typename MatrixType, unsigned int Options>
+struct ei_svd_precondition_2x2_block_to_be_real<MatrixType, Options, false>
{
typedef JacobiSVD<MatrixType, Options> SVD;
static void run(typename SVD::WorkMatrixType&, JacobiSVD<MatrixType, Options>&, 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();
}
-template<typename MatrixType, unsigned int Options,
- bool PossiblyMoreRowsThanCols = (Options & AtLeastAsManyColsAsRows) == 0
- && (MatrixType::RowsAtCompileTime==Dynamic
- || MatrixType::RowsAtCompileTime>MatrixType::ColsAtCompileTime)>
+template<typename MatrixType, unsigned int Options, bool PossiblyMoreRowsThanCols>
struct ei_svd_precondition_if_more_rows_than_cols
{
typedef JacobiSVD<MatrixType, Options> SVD;
@@ -231,10 +244,7 @@ struct ei_svd_precondition_if_more_rows_than_cols<MatrixType, Options, true>
}
};
-template<typename MatrixType, unsigned int Options,
- bool PossiblyMoreColsThanRows = (Options & AtLeastAsManyRowsAsCols) == 0
- && (MatrixType::ColsAtCompileTime==Dynamic
- || MatrixType::ColsAtCompileTime>MatrixType::RowsAtCompileTime)>
+template<typename MatrixType, unsigned int Options, bool PossiblyMoreColsThanRows>
struct ei_svd_precondition_if_more_cols_than_rows
{
typedef JacobiSVD<MatrixType, Options> SVD;
@@ -256,7 +266,7 @@ struct ei_svd_precondition_if_more_cols_than_rows<MatrixType, Options, true>
MaxColsAtCompileTime = SVD::MaxColsAtCompileTime,
MatrixOptions = SVD::MatrixOptions
};
-
+
static bool run(const MatrixType& matrix, typename SVD::WorkMatrixType& work_matrix, SVD& svd)
{
int rows = matrix.rows();