From a994e51c96565d52edb80996167b61e67b0deba7 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 26 Mar 2008 09:13:11 +0000 Subject: [PATCH] * add Gael copyright lines on 2 more files * macro renaming: EIGEN_NDEBUG becomes EIGEN_NO_DEBUG as this is much better (and similar to Qt) and EIGEN_CUSTOM_ASSERT becomes EIGEN_USE_CUSTOM_ASSERT * protect Core header by a EIGEN_CORE_H --- Eigen/Core | 6 +++++- Eigen/src/Core/Product.h | 1 + Eigen/src/Core/Util.h | 8 ++++++-- doc/echelon.cpp | 1 - test/main.h | 3 ++- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Eigen/Core b/Eigen/Core index f56a13ab8..6da789afe 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -1,7 +1,10 @@ +#ifndef EIGEN_CORE_H +#define EIGEN_CORE_H + #include #include #include -#ifndef EIGEN_CUSTOM_ASSERT +#ifndef EIGEN_USE_CUSTOM_ASSERT #include #endif #include @@ -43,3 +46,4 @@ namespace Eigen { } // namespace Eigen +#endif // EIGEN_CORE_H diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 13a995ad0..548656209 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -2,6 +2,7 @@ // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2006-2008 Benoit Jacob +// Copyright (C) 2008 Gael Guennebaud // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/Eigen/src/Core/Util.h b/Eigen/src/Core/Util.h index b458fe4ae..55f9fa7df 100644 --- a/Eigen/src/Core/Util.h +++ b/Eigen/src/Core/Util.h @@ -49,7 +49,11 @@ EIGEN_USING_MATRIX_TYPEDEFS \ using Eigen::Matrix; \ using Eigen::MatrixBase; -#ifdef EIGEN_NDEBUG +#ifdef NDEBUG +#define EIGEN_NO_DEBUG +#endif + +#ifdef EIGEN_NO_DEBUG #define ei_assert(x) #else #define ei_assert(x) assert(x) @@ -61,7 +65,7 @@ using Eigen::MatrixBase; #define ei_internal_assert(x) #endif -#ifdef NDEBUG +#ifdef EIGEN_NO_DEBUG #define EIGEN_ONLY_USED_FOR_DEBUG(x) (void)x #else #define EIGEN_ONLY_USED_FOR_DEBUG(x) diff --git a/doc/echelon.cpp b/doc/echelon.cpp index cf15fda49..8e3b03cd9 100644 --- a/doc/echelon.cpp +++ b/doc/echelon.cpp @@ -68,7 +68,6 @@ int main(int, char **) cout << "Here's the matrix m:" << endl << m << endl; cout << "Now let's echelon m:" << endl; - for(int i = 0; i < 1000000; i++) echelon(m); cout << "Now m is:" << endl << m << endl; diff --git a/test/main.h b/test/main.h index 7fe147235..c69a8f1ec 100644 --- a/test/main.h +++ b/test/main.h @@ -2,6 +2,7 @@ // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2006-2008 Benoit Jacob +// Copyright (C) 2008 Gael Guennebaud // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -117,7 +118,7 @@ #endif // EIGEN_DEBUG_ASSERTS - #define EIGEN_CUSTOM_ASSERT + #define EIGEN_USE_CUSTOM_ASSERT #else // EIGEN_NO_ASSERTION_CHECKING