aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-06-11 07:56:50 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-06-11 07:56:50 -0400
commitbdd7c6c88a0b8cb931480e04e33a17aa08022e06 (patch)
treeecc28fd133ddabfccd76a925043e35003ada6e10 /test
parent52e8c42a005cb607ba87e4f028e143d6d91f5021 (diff)
change the value of Dynamic to -1, since the index type is now configurable.
remove EIGEN_ENUM_MIN/MAX, implement new macros instead
Diffstat (limited to 'test')
-rw-r--r--test/block.cpp7
-rw-r--r--test/householder.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/test/block.cpp b/test/block.cpp
index 2c2825349..a6bf47058 100644
--- a/test/block.cpp
+++ b/test/block.cpp
@@ -22,6 +22,7 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
+#define EIGEN_NO_STATIC_ASSERT // otherwise we fail at compile time on unused paths
#include "main.h"
template<typename MatrixType> void block(const MatrixType& m)
@@ -71,8 +72,10 @@ template<typename MatrixType> void block(const MatrixType& m)
m1.block(r1,c1,r2-r1+1,c2-c1+1) = s1 * m2.block(0, 0, r2-r1+1,c2-c1+1);
m1.block(r1,c1,r2-r1+1,c2-c1+1)(r2-r1,c2-c1) = m2.block(0, 0, r2-r1+1,c2-c1+1)(0,0);
- const int BlockRows = EIGEN_ENUM_MIN(MatrixType::RowsAtCompileTime,2);
- const int BlockCols = EIGEN_ENUM_MIN(MatrixType::ColsAtCompileTime,5);
+ enum {
+ BlockRows = 2,
+ BlockCols = 5
+ };
if (rows>=5 && cols>=8)
{
// test fixed block() as lvalue
diff --git a/test/householder.cpp b/test/householder.cpp
index b7a1cadf9..310eb8c33 100644
--- a/test/householder.cpp
+++ b/test/householder.cpp
@@ -47,7 +47,7 @@ template<typename MatrixType> void householder(const MatrixType& m)
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, Dynamic> VBlockMatrixType;
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, MatrixType::RowsAtCompileTime> TMatrixType;
- Matrix<Scalar, EIGEN_ENUM_MAX(MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime), 1> _tmp(std::max(rows,cols));
+ Matrix<Scalar, EIGEN_SIZE_MAX(MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime), 1> _tmp(std::max(rows,cols));
Scalar* tmp = &_tmp.coeffRef(0,0);
Scalar beta;