From 4bac6fbe1ea9414f009d8dcb3d98cab7fdf109d1 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Mon, 21 Jun 2010 18:39:24 +0200 Subject: [PATCH] The intrin.h header needs to be included after cmath in order to prevent warnigns. Fixed (hopefully) final Index realted warnings. --- Eigen/Core | 9 +++++---- test/geo_alignedbox.cpp | 11 +++++++---- test/map.cpp | 3 ++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Eigen/Core b/Eigen/Core index 896f2c8b4..685ca1f4d 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -118,10 +118,6 @@ #endif #endif -#ifdef _MSC_VER - #include // required for __cpuid -#endif - #if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE) #define EIGEN_HAS_OPENMP #endif @@ -148,6 +144,11 @@ #include #endif +// required for __cpuid, needs to be included after cmath +#ifdef _MSC_VER + #include +#endif + #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS) #define EIGEN_EXCEPTIONS #endif diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp index 9c347df00..d1164b193 100644 --- a/test/geo_alignedbox.cpp +++ b/test/geo_alignedbox.cpp @@ -35,12 +35,13 @@ template void alignedbox(const BoxType& _box) /* this test covers the following files: AlignedBox.h */ - typedef typename BoxType::Index Index; - const Index dim = _box.dim(); + typedef typename BoxType::Index Index; typedef typename BoxType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; typedef Matrix VectorType; + const Index dim = _box.dim(); + VectorType p0 = VectorType::Random(dim); VectorType p1 = VectorType::Random(dim); while( p1 == p0 ){ @@ -82,12 +83,14 @@ template void alignedbox(const BoxType& _box) template void alignedboxCastTests(const BoxType& _box) { - // casting - const int dim = _box.dim(); + // casting + typedef typename BoxType::Index Index; typedef typename BoxType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; typedef Matrix VectorType; + const Index dim = _box.dim(); + VectorType p0 = VectorType::Random(dim); VectorType p1 = VectorType::Random(dim); diff --git a/test/map.cpp b/test/map.cpp index 98d513588..fa4427ba3 100644 --- a/test/map.cpp +++ b/test/map.cpp @@ -26,9 +26,10 @@ template void map_class_vector(const VectorType& m) { + typedef typename VectorType::Index Index; typedef typename VectorType::Scalar Scalar; - int size = m.size(); + Index size = m.size(); // test Map.h Scalar* array1 = ei_aligned_new(size);