From 2874101b62f96f1654457eb37ad312799f828dfd Mon Sep 17 00:00:00 2001 From: Thomas Capricelli Date: Thu, 1 Jul 2010 03:23:47 +0200 Subject: [PATCH] fix compilation with icc. Anyway, the use of an enum instead of a 'const bool' is more consistent with the code around. --- Eigen/src/Core/TriangularMatrix.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index a4d210cad..1151c38af 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -545,10 +545,12 @@ template template void TriangularView::lazyAssign(const TriangularBase& other) { - const bool unroll = MatrixType::SizeAtCompileTime != Dynamic + enum { + unroll = = MatrixType::SizeAtCompileTime != Dynamic && ei_traits::CoeffReadCost != Dynamic && MatrixType::SizeAtCompileTime * ei_traits::CoeffReadCost / 2 - <= EIGEN_UNROLLING_LIMIT; + <= EIGEN_UNROLLING_LIMIT + }; ei_assert(m_matrix.rows() == other.rows() && m_matrix.cols() == other.cols()); ei_triangular_assignment_selector @@ -584,10 +586,12 @@ template template void TriangularBase::evalToLazy(MatrixBase &other) const { - const bool unroll = DenseDerived::SizeAtCompileTime != Dynamic + enum { + unroll = DenseDerived::SizeAtCompileTime != Dynamic && ei_traits::CoeffReadCost != Dynamic && DenseDerived::SizeAtCompileTime * ei_traits::CoeffReadCost / 2 - <= EIGEN_UNROLLING_LIMIT; + <= EIGEN_UNROLLING_LIMIT + }; ei_assert(this->rows() == other.rows() && this->cols() == other.cols()); ei_triangular_assignment_selector