From 75649551c26b7fb6cff4933aaa7b31303163aaa7 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 3 Sep 2008 11:26:19 +0000 Subject: [PATCH] compilation fixes with MSVC --- Eigen/src/Core/Product.h | 2 +- Eigen/src/LU/LU.h | 27 +++++++-------------------- test/dynalloc.cpp | 2 -- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index f18bc1e4a..04deae0ab 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -36,7 +36,7 @@ struct ei_product_coeff_impl; template struct ei_product_packet_impl; -template class ei_product_eval_to_column_major; +template struct ei_product_eval_to_column_major; /** \class ProductReturnType * diff --git a/Eigen/src/LU/LU.h b/Eigen/src/LU/LU.h index 6e844e196..f7ed1b412 100644 --- a/Eigen/src/LU/LU.h +++ b/Eigen/src/LU/LU.h @@ -71,9 +71,9 @@ template class LU MatrixType::MaxRowsAtCompileTime) }; - typedef Matrix KernelReturnType; + MatrixType::MaxColsAtCompileTime, MaxSmallDimAtCompileTime> KernelResultType; /** Constructor. * @@ -150,12 +150,7 @@ template class LU * * \sa kernel() */ - void computeKernel(Matrix::MaxSmallDimAtCompileTime - > *result) const; + void computeKernel(KernelResultType *result) const; /** \returns the kernel of the matrix. The columns of the returned matrix * will form a basis of the kernel. @@ -171,7 +166,7 @@ template class LU * * \sa computeKernel() */ - const KernelReturnType kernel() const; + const KernelResultType kernel() const; /** This method finds a solution x to the equation Ax=b, where A is the matrix of which * *this is the LU decomposition, if any exists. @@ -372,12 +367,7 @@ typename ei_traits::Scalar LU::determinant() const } template -void LU::computeKernel(Matrix::MaxSmallDimAtCompileTime - > *result) const +void LU::computeKernel(KernelResultType *result) const { ei_assert(!isInvertible()); const int dimker = dimensionOfKernel(), cols = m_lu.cols(); @@ -414,13 +404,10 @@ void LU::computeKernel(Matrix -const typename LU::KernelReturnType +const typename LU::KernelResultType LU::kernel() const { - Matrix::MaxSmallDimAtCompileTime> result(m_lu.cols(), dimensionOfKernel()); + KernelResultType result(m_lu.cols(), dimensionOfKernel()); computeKernel(&result); return result; } diff --git a/test/dynalloc.cpp b/test/dynalloc.cpp index 287dce0d2..3b0d703ae 100644 --- a/test/dynalloc.cpp +++ b/test/dynalloc.cpp @@ -24,8 +24,6 @@ #include "main.h" -#include - // test compilation with both a struct and a class... struct MyStruct : WithAlignedOperatorNew {