diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-02-27 19:04:22 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-02-27 19:04:22 -0500 |
commit | 27f52502581b559e5804b4b6dd42774791d2ca1c (patch) | |
tree | 2ae96a500557817bf0b97d9b6cce9a5326840c57 | |
parent | e84f7e07e9ef5a4f5200c7ca6a501df95bcc188e (diff) |
Only include <iosfwd> unless either EIGEN_DEBUG_ASSIGN is defined or we're in eigen2 support mode
-rw-r--r-- | Eigen/Core | 7 | ||||
-rw-r--r-- | Eigen/Eigen2Support | 6 | ||||
-rw-r--r-- | Eigen/src/Core/Assign.h | 2 | ||||
-rw-r--r-- | test/vectorization_logic.cpp | 1 |
4 files changed, 14 insertions, 2 deletions
diff --git a/Eigen/Core b/Eigen/Core index 1af04a7ee..3abf6e254 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -119,13 +119,18 @@ #include <complex> #include <cassert> #include <functional> -#include <iostream> +#include <iosfwd> #include <cstring> #include <string> #include <limits> // for min/max: #include <algorithm> +// for outputting debug info +#ifdef EIGEN_DEBUG_ASSIGN +#include<iostream> +#endif + #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS) #define EIGEN_EXCEPTIONS #endif diff --git a/Eigen/Eigen2Support b/Eigen/Eigen2Support index bd6306aff..26b547b9b 100644 --- a/Eigen/Eigen2Support +++ b/Eigen/Eigen2Support @@ -26,7 +26,7 @@ #define EIGEN2SUPPORT_H #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H)) -#error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before any other Eigen header +#error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header #endif #include "src/Core/util/DisableMSVCWarnings.h" @@ -36,6 +36,7 @@ namespace Eigen { /** \defgroup Eigen2Support_Module Eigen2 support module * This module provides a couple of deprecated functions improving the compatibility with Eigen2. * + * To use it, define EIGEN2_SUPPORT before including any Eigen header * \code * #define EIGEN2_SUPPORT * \endcode @@ -51,4 +52,7 @@ namespace Eigen { #include "src/Core/util/EnableMSVCWarnings.h" +// Eigen2 used to include iostream +#include<iostream> + #endif // EIGEN2SUPPORT_H diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index f806ba572..eb7bca1da 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -105,6 +105,7 @@ public: : int(NoUnrolling) }; +#ifdef EIGEN_DEBUG_ASSIGN static void debug() { EIGEN_DEBUG_VAR(DstIsAligned) @@ -125,6 +126,7 @@ public: EIGEN_DEBUG_VAR(MayUnrollInner) EIGEN_DEBUG_VAR(Unrolling) } +#endif }; /*************************************************************************** diff --git a/test/vectorization_logic.cpp b/test/vectorization_logic.cpp index ae9911831..94a8a5c96 100644 --- a/test/vectorization_logic.cpp +++ b/test/vectorization_logic.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_DEBUG_ASSIGN #include "main.h" #include <typeinfo> |