4// first thing Eigen does: prevent MSVC from committing suicide
5#include "src/Core/util/DisableMSVCWarnings.h"
8 #include <malloc.h> // for _aligned_malloc -- need it regardless of whether vectorization is enabled
9 #if (_MSC_VER >= 1500) // 2008 or later
10 // Remember that usage of defined() in a #define is undefined by the standard.
11 // a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP.
12 #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(_M_X64)
13 #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER
18// FIXME: this check should not be against __QNXNTO__, which is also defined
19// while compiling with GCC for QNX target. Better solution is welcome!
20#if defined(__GNUC__) && !defined(__QNXNTO__)
21 #define EIGEN_GNUC_AT_LEAST(x,y) ((__GNUC__>=x && __GNUC_MINOR__>=y) || __GNUC__>x)
23 #define EIGEN_GNUC_AT_LEAST(x,y) 0
26// Remember that usage of defined() in a #define is undefined by the standard
27#if (defined __SSE2__) && ( (!defined __GNUC__) || EIGEN_GNUC_AT_LEAST(4,2) )
28 #define EIGEN_SSE2_BUT_NOT_OLD_GCC
31#if !defined(EIGEN_DONT_VECTORIZE) && !defined(EIGEN_DONT_ALIGN)
32 #if defined (EIGEN_SSE2_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER)
33 #define EIGEN_VECTORIZE
34 #define EIGEN_VECTORIZE_SSE
35 #include <emmintrin.h>
36 #include <xmmintrin.h>
38 #include <pmmintrin.h>
41 #include <tmmintrin.h>
43 #elif defined __ALTIVEC__
44 #define EIGEN_VECTORIZE
45 #define EIGEN_VECTORIZE_ALTIVEC
47 // We need to #undef all these ugly tokens defined in <altivec.h>
48 // => use __vector instead of vector
66#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
67 #define EIGEN_EXCEPTIONS
70#ifdef EIGEN_EXCEPTIONS
74// this needs to be done after all possible windows C header includes and before any Eigen source includes
75// (system C++ includes are supposed to be able to deal with this already):
76// windows.h defines min and max macros which would make Eigen fail to compile.
77#if defined(min) || defined(max)
78#error The preprocessor symbols 'min' or 'max' are defined. If you are compiling on Windows, do #define NOMINMAX to prevent windows.h from defining these symbols.
83// we use size_t frequently and we'll never remember to prepend it with std:: everytime just to
84// ensure QNX/QCC support
87/** \defgroup Core_Module Core module
88 * This is the main module of Eigen providing dense matrix and vector support
89 * (both fixed and dynamic size) with all the features corresponding to a BLAS library
93 * #include <Eigen/Core>
97#include "src/Core/util/Macros.h"
98#include "src/Core/util/Constants.h"
99#include "src/Core/util/ForwardDeclarations.h"
100#include "src/Core/util/Meta.h"
101#include "src/Core/util/XprHelper.h"
102#include "src/Core/util/StaticAssert.h"
103#include "src/Core/util/Memory.h"
105#include "src/Core/NumTraits.h"
106#include "src/Core/MathFunctions.h"
107#include "src/Core/GenericPacketMath.h"
109#if defined EIGEN_VECTORIZE_SSE
110 #include "src/Core/arch/SSE/PacketMath.h"
111#elif defined EIGEN_VECTORIZE_ALTIVEC
112 #include "src/Core/arch/AltiVec/PacketMath.h"
115#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
116#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 16
119#include "src/Core/Functors.h"
120#include "src/Core/MatrixBase.h"
121#include "src/Core/Coeffs.h"
123#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874
124 // at least confirmed with Doxygen 1.5.5 and 1.5.6
125 #include "src/Core/Assign.h"
128#include "src/Core/MatrixStorage.h"
129#include "src/Core/NestByValue.h"
130#include "src/Core/Flagged.h"
131#include "src/Core/Matrix.h"
132#include "src/Core/Cwise.h"
133#include "src/Core/CwiseBinaryOp.h"
134#include "src/Core/CwiseUnaryOp.h"
135#include "src/Core/CwiseNullaryOp.h"
136#include "src/Core/Dot.h"
137#include "src/Core/Product.h"
138#include "src/Core/DiagonalProduct.h"
139#include "src/Core/SolveTriangular.h"
140#include "src/Core/MapBase.h"
141#include "src/Core/Map.h"
142#include "src/Core/Block.h"
143#include "src/Core/Minor.h"
144#include "src/Core/Transpose.h"
145#include "src/Core/DiagonalMatrix.h"
146#include "src/Core/DiagonalCoeffs.h"
147#include "src/Core/Sum.h"
148#include "src/Core/Redux.h"
149#include "src/Core/Visitor.h"
150#include "src/Core/Fuzzy.h"
151#include "src/Core/IO.h"
152#include "src/Core/Swap.h"
153#include "src/Core/CommaInitializer.h"
154#include "src/Core/Part.h"
155#include "src/Core/CacheFriendlyProduct.h"
159#include "src/Core/util/EnableMSVCWarnings.h"
161#endif // EIGEN_CORE_H