mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 18:19:34 +08:00

(needed by the new product implementation) * Make the packet* members template to support aligned and unaligned access. This makes Block vectorizable. Combined with ReferencableBit, we should be able to determine at runtime (in some specific cases) if an aligned vectorization is possible or not. * Improved the new product implementation to robustly handle all cases, it now passes all the tests. * Renamed the packet version ei_predux to ei_preduxp to avoid name collision.
88 lines
2.2 KiB
Plaintext
88 lines
2.2 KiB
Plaintext
#ifndef EIGEN_CORE_H
|
|
#define EIGEN_CORE_H
|
|
|
|
#define EIGEN_WIP_PRODUCT
|
|
|
|
#ifndef EIGEN_DONT_VECTORIZE
|
|
#if ((defined __SSE2__) && ( (!defined __GNUC__) || (__GNUC__>=4 && __GNUC_MINOR__>=2)))
|
|
#define EIGEN_VECTORIZE
|
|
#define EIGEN_VECTORIZE_SSE
|
|
#include <emmintrin.h>
|
|
#include <xmmintrin.h>
|
|
// SSE3:
|
|
#include <pmmintrin.h>
|
|
// SSSE3:
|
|
//#include <tmmintrin.h>
|
|
#endif
|
|
#ifdef __ALTIVEC__ // There are zero chances of both __SSE2__ AND __ALTIVEC__ been defined
|
|
#define EIGEN_VECTORIZE
|
|
#define EIGEN_VECTORIZE_ALTIVEC
|
|
#include <altivec.h>
|
|
// We _need_ to #undef bool as it's defined in <altivec.h> for some reason.
|
|
#undef bool
|
|
#endif
|
|
#endif
|
|
|
|
#include <cstdlib>
|
|
#include <cmath>
|
|
#include <complex>
|
|
#include <cassert>
|
|
#include <iostream>
|
|
|
|
#ifdef EIGEN_VECTORIZE
|
|
// it seems we cannot assume posix_memalign is defined in the stdlib header
|
|
extern "C" int posix_memalign (void **, size_t, size_t) throw ();
|
|
#endif
|
|
|
|
namespace Eigen {
|
|
|
|
#include "src/Core/util/Macros.h"
|
|
#include "src/Core/util/Constants.h"
|
|
#include "src/Core/util/ForwardDeclarations.h"
|
|
#include "src/Core/util/Meta.h"
|
|
|
|
#include "src/Core/NumTraits.h"
|
|
#include "src/Core/MathFunctions.h"
|
|
#include "src/Core/PacketMath.h"
|
|
#if defined EIGEN_VECTORIZE_SSE
|
|
#include "src/Core/PacketMath_SSE.h"
|
|
#elif defined EIGEN_VECTORIZE_ALTIVEC
|
|
#include "src/Core/PacketMath_Altivec.h"
|
|
#endif
|
|
|
|
#include "src/Core/Functors.h"
|
|
#include "src/Core/MatrixBase.h"
|
|
#include "src/Core/Coeffs.h"
|
|
#include "src/Core/Assign.h"
|
|
#include "src/Core/MatrixStorage.h"
|
|
#include "src/Core/Matrix.h"
|
|
#include "src/Core/Lazy.h"
|
|
#include "src/Core/Temporary.h"
|
|
#include "src/Core/CwiseBinaryOp.h"
|
|
#include "src/Core/CwiseUnaryOp.h"
|
|
#include "src/Core/CwiseNullaryOp.h"
|
|
#ifdef EIGEN_WIP_PRODUCT
|
|
#include "src/Core/ProductWIP.h"
|
|
#else
|
|
#include "src/Core/Product.h"
|
|
#endif
|
|
#include "src/Core/Block.h"
|
|
#include "src/Core/Minor.h"
|
|
#include "src/Core/Transpose.h"
|
|
#include "src/Core/Dot.h"
|
|
#include "src/Core/DiagonalMatrix.h"
|
|
#include "src/Core/DiagonalCoeffs.h"
|
|
#include "src/Core/Redux.h"
|
|
#include "src/Core/Visitor.h"
|
|
#include "src/Core/Fuzzy.h"
|
|
#include "src/Core/Map.h"
|
|
#include "src/Core/IO.h"
|
|
#include "src/Core/Swap.h"
|
|
#include "src/Core/CommaInitializer.h"
|
|
#include "src/Core/Triangular.h"
|
|
#include "src/Core/TriangularAssign.h"
|
|
|
|
} // namespace Eigen
|
|
|
|
#endif // EIGEN_CORE_H
|