mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-25 18:50:40 +08:00
* 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
This commit is contained in:
parent
729618c945
commit
a994e51c96
@ -1,7 +1,10 @@
|
||||
#ifndef EIGEN_CORE_H
|
||||
#define EIGEN_CORE_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
#include <complex>
|
||||
#ifndef EIGEN_CUSTOM_ASSERT
|
||||
#ifndef EIGEN_USE_CUSTOM_ASSERT
|
||||
#include <cassert>
|
||||
#endif
|
||||
#include <iostream>
|
||||
@ -43,3 +46,4 @@ namespace Eigen {
|
||||
|
||||
} // namespace Eigen
|
||||
|
||||
#endif // EIGEN_CORE_H
|
||||
|
@ -2,6 +2,7 @@
|
||||
// for linear algebra. Eigen itself is part of the KDE project.
|
||||
//
|
||||
// Copyright (C) 2006-2008 Benoit Jacob <jacob@math.jussieu.fr>
|
||||
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
||||
//
|
||||
// Eigen is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// for linear algebra. Eigen itself is part of the KDE project.
|
||||
//
|
||||
// Copyright (C) 2006-2008 Benoit Jacob <jacob@math.jussieu.fr>
|
||||
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
||||
//
|
||||
// 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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user