Skip to content

Commit

Permalink
Merge branch 'upstream-Eigen3' into update_eigen_to_master
Browse files Browse the repository at this point in the history
# By Eigen Upstream
* upstream-Eigen3:
  Eigen3 2023-10-24 (a4f9510a)
  • Loading branch information
phcerdan committed Oct 24, 2023
2 parents 4114b27 + c00ac7c commit f1c48dc
Show file tree
Hide file tree
Showing 391 changed files with 36,198 additions and 14,951 deletions.
348 changes: 217 additions & 131 deletions Modules/ThirdParty/Eigen3/src/itkeigen/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Modules/ThirdParty/Eigen3/src/itkeigen/COPYING.MPL2
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Exhibit A - Source Code Form License Notice

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
file, You can obtain one at https://mozilla.org/MPL/2.0/.

If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
Expand Down
16 changes: 2 additions & 14 deletions Modules/ThirdParty/Eigen3/src/itkeigen/COPYING.README
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,5 @@ Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
http://www.mozilla.org/MPL/2.0/
http://www.mozilla.org/MPL/2.0/FAQ.html

Some files contain third-party code under BSD or LGPL licenses, whence the other
COPYING.* files here.

All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later.
For this reason, the COPYING.LGPL file contains the LGPL 2.1 text.

If you want to guarantee that the Eigen code that you are #including is licensed
under the MPL2 and possibly more permissive licenses (like BSD), #define this
preprocessor symbol:
EIGEN_MPL2_ONLY
For example, with most compilers, you could add this to your project CXXFLAGS:
-DEIGEN_MPL2_ONLY
This will cause a compilation error to be generated if you #include any code that is
LGPL licensed.
Some files contain third-party code under BSD or other MPL2-compatible licenses,
whence the other COPYING.* files here.
8 changes: 3 additions & 5 deletions Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Cholesky
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@
* \endcode
*/

// IWYU pragma: begin_exports
#include "src/Cholesky/LLT.h"
#include "src/Cholesky/LDLT.h"
#ifdef EIGEN_USE_LAPACKE
#ifdef EIGEN_USE_MKL
#include "mkl_lapacke.h"
#else
#include "src/misc/lapacke.h"
#endif
#include "src/misc/lapacke_helpers.h"
#include "src/Cholesky/LLT_LAPACKE.h"
#endif
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
4 changes: 3 additions & 1 deletion Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/CholmodSupport
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extern "C" {
* This module provides an interface to the Cholmod library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> package.
* It provides the two following main factorization classes:
* - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
* - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
* - class CholmodDecomposition: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
*
* For the sake of completeness, this module also propose the two following classes:
* - class CholmodSimplicialLLT
Expand All @@ -40,7 +40,9 @@ extern "C" {
*
*/

// IWYU pragma: begin_exports
#include "src/CholmodSupport/CholmodSupport.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
72 changes: 52 additions & 20 deletions Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Core
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_CORE_H
#define EIGEN_CORE_H
#ifndef EIGEN_CORE_MODULE_H
#define EIGEN_CORE_MODULE_H

#if defined(ITK_EIGEN_MANGLE)
#define Eigen itkeigen
#endif

// first thing Eigen does: stop the compiler from reporting useless warnings.
#include "src/Core/util/DisableStupidWarnings.h"
Expand All @@ -34,16 +38,16 @@
#include <new>
#endif

// Disable the ipa-cp-clone optimization flag with MinGW 6.x or newer (enabled by default with -O3)
// Disable the ipa-cp-clone optimization flag with MinGW 6.x or older (enabled by default with -O3)
// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details.
#if EIGEN_COMP_MINGW && EIGEN_GNUC_AT_LEAST(4,6) && EIGEN_GNUC_AT_MOST(5,5)
#if EIGEN_COMP_MINGW && EIGEN_GNUC_STRICT_LESS_THAN(6,0,0)
#pragma GCC optimize ("-fno-ipa-cp-clone")
#endif

// Prevent ICC from specializing std::complex operators that silently fail
// on device. This allows us to use our own device-compatible specializations
// instead.
#if defined(EIGEN_COMP_ICC) && defined(EIGEN_GPU_COMPILE_PHASE) \
#if EIGEN_COMP_ICC && defined(EIGEN_GPU_COMPILE_PHASE) \
&& !defined(_OVERRIDE_COMPLEX_SPECIALIZATION_)
#define _OVERRIDE_COMPLEX_SPECIALIZATION_ 1
#endif
Expand All @@ -67,6 +71,7 @@
#endif

#ifdef EIGEN_HAS_OPENMP
#include <atomic>
#include <omp.h>
#endif

Expand All @@ -81,10 +86,9 @@
#include <cstddef>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <functional>
#include <sstream>
#ifndef EIGEN_NO_IO
#include <sstream>
#include <iosfwd>
#endif
#include <cstring>
Expand All @@ -94,14 +98,11 @@
// for min/max:
#include <algorithm>

#if EIGEN_HAS_CXX11
#include <array>
#endif
#include <vector>

// for std::is_nothrow_move_assignable
#ifdef EIGEN_INCLUDE_TYPE_TRAITS
#include <type_traits>
#endif

// for outputting debug info
#ifdef EIGEN_DEBUG_ASSIGN
Expand Down Expand Up @@ -159,14 +160,27 @@ using std::ptrdiff_t;
* \endcode
*/

#ifdef EIGEN_USE_LAPACKE
#ifdef EIGEN_USE_MKL
#include "mkl_lapacke.h"
#else
#include "src/misc/lapacke.h"
#endif
#endif

// IWYU pragma: begin_exports
#include "src/Core/util/Constants.h"
#include "src/Core/util/Meta.h"
#include "src/Core/util/Assert.h"
#include "src/Core/util/ForwardDeclarations.h"
#include "src/Core/util/StaticAssert.h"
#include "src/Core/util/XprHelper.h"
#include "src/Core/util/Memory.h"
#include "src/Core/util/IntegralConstant.h"
#include "src/Core/util/Serializer.h"
#include "src/Core/util/SymbolicIndex.h"
#include "src/Core/util/EmulateArray.h"
#include "src/Core/util/MoreMeta.h"

#include "src/Core/NumTraits.h"
#include "src/Core/MathFunctions.h"
Expand All @@ -176,10 +190,12 @@ using std::ptrdiff_t;
// Generic half float support
#include "src/Core/arch/Default/Half.h"
#include "src/Core/arch/Default/BFloat16.h"
#include "src/Core/arch/Default/TypeCasting.h"
#include "src/Core/arch/Default/GenericPacketMathFunctionsFwd.h"

#if defined EIGEN_VECTORIZE_AVX512
#if defined EIGEN_VECTORIZE_AVX512FP16
#include "src/Core/arch/AVX512/PacketMathFP16.h"
#endif
#include "src/Core/arch/SSE/PacketMath.h"
#include "src/Core/arch/SSE/TypeCasting.h"
#include "src/Core/arch/SSE/Complex.h"
Expand All @@ -192,6 +208,7 @@ using std::ptrdiff_t;
#include "src/Core/arch/SSE/MathFunctions.h"
#include "src/Core/arch/AVX/MathFunctions.h"
#include "src/Core/arch/AVX512/MathFunctions.h"
#include "src/Core/arch/AVX512/TrsmKernel.h"
#elif defined EIGEN_VECTORIZE_AVX
// Use AVX for floats and doubles, SSE for integers
#include "src/Core/arch/SSE/PacketMath.h"
Expand All @@ -209,6 +226,7 @@ using std::ptrdiff_t;
#include "src/Core/arch/SSE/Complex.h"
#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
#include "src/Core/arch/AltiVec/PacketMath.h"
#include "src/Core/arch/AltiVec/TypeCasting.h"
#include "src/Core/arch/AltiVec/MathFunctions.h"
#include "src/Core/arch/AltiVec/Complex.h"
#elif defined EIGEN_VECTORIZE_NEON
Expand All @@ -228,6 +246,8 @@ using std::ptrdiff_t;
#include "src/Core/arch/MSA/PacketMath.h"
#include "src/Core/arch/MSA/MathFunctions.h"
#include "src/Core/arch/MSA/Complex.h"
#elif defined EIGEN_VECTORIZE_HVX
#include "src/Core/arch/HVX/PacketMath.h"
#endif

#if defined EIGEN_VECTORIZE_GPU
Expand All @@ -237,7 +257,6 @@ using std::ptrdiff_t;
#endif

#if defined(EIGEN_USE_SYCL)
#include "src/Core/arch/SYCL/SyclMemoryModel.h"
#include "src/Core/arch/SYCL/InteropHeaders.h"
#if !defined(EIGEN_DONT_VECTORIZE_SYCL)
#include "src/Core/arch/SYCL/PacketMath.h"
Expand All @@ -257,10 +276,14 @@ using std::ptrdiff_t;
#include "src/Core/functors/StlFunctors.h"
#include "src/Core/functors/AssignmentFunctors.h"

// Specialized functors to enable the processing of complex numbers
// on CUDA devices
#ifdef EIGEN_CUDACC
#include "src/Core/arch/CUDA/Complex.h"
// Specialized functors for GPU.
#ifdef EIGEN_GPUCC
#include "src/Core/arch/GPU/Complex.h"
#endif

// Specializations of vectorized activation functions for NEON.
#ifdef EIGEN_VECTORIZE_NEON
#include "src/Core/arch/NEON/UnaryFunctors.h"
#endif

#include "src/Core/util/IndexedViewHelper.h"
Expand Down Expand Up @@ -315,6 +338,7 @@ using std::ptrdiff_t;
#include "src/Core/DiagonalMatrix.h"
#include "src/Core/Diagonal.h"
#include "src/Core/DiagonalProduct.h"
#include "src/Core/SkewSymmetricMatrix3.h"
#include "src/Core/Redux.h"
#include "src/Core/Visitor.h"
#include "src/Core/Fuzzy.h"
Expand Down Expand Up @@ -347,13 +371,20 @@ using std::ptrdiff_t;
#include "src/Core/CoreIterators.h"
#include "src/Core/ConditionEstimator.h"

#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
#if defined(EIGEN_VECTORIZE_VSX)
#include "src/Core/arch/AltiVec/MatrixProduct.h"
#elif defined EIGEN_VECTORIZE_NEON
#include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
#endif

#include "src/Core/BooleanRedux.h"
#if defined(EIGEN_VECTORIZE_AVX512)
#include "src/Core/arch/AVX512/GemmKernel.h"
#endif

#if defined(EIGEN_VECTORIZE_HVX)
#include "src/Core/arch/HVX/GeneralBlockPanelKernel.h"
#endif

#include "src/Core/Select.h"
#include "src/Core/VectorwiseOp.h"
#include "src/Core/PartialReduxEvaluator.h"
Expand All @@ -379,7 +410,8 @@ using std::ptrdiff_t;
#endif

#include "src/Core/GlobalFunctions.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

#endif // EIGEN_CORE_H
#endif // EIGEN_CORE_MODULE_H
3 changes: 3 additions & 0 deletions Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Eigenvalues
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*/

#include "src/misc/RealSvd2x2.h"

// IWYU pragma: begin_exports
#include "src/Eigenvalues/Tridiagonalization.h"
#include "src/Eigenvalues/RealSchur.h"
#include "src/Eigenvalues/EigenSolver.h"
Expand All @@ -54,6 +56,7 @@
#include "src/Eigenvalues/ComplexSchur_LAPACKE.h"
#include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h"
#endif
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
3 changes: 2 additions & 1 deletion Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Geometry
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
* \endcode
*/

// IWYU pragma: begin_exports
#include "src/Geometry/OrthoMethods.h"
#include "src/Geometry/EulerAngles.h"

#include "src/Geometry/Homogeneous.h"
#include "src/Geometry/RotationBase.h"
#include "src/Geometry/Rotation2D.h"
Expand All @@ -53,6 +53,7 @@
#if (defined EIGEN_VECTORIZE_SSE) || (defined EIGEN_VECTORIZE_NEON)
#include "src/Geometry/arch/Geometry_SIMD.h"
#endif
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
2 changes: 2 additions & 0 deletions Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Householder
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
* \endcode
*/

// IWYU pragma: begin_exports
#include "src/Householder/Householder.h"
#include "src/Householder/HouseholderSequence.h"
#include "src/Householder/BlockHouseholder.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
* - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices.
* - IncompleteLUT - incomplete LU factorization with dual thresholding
*
* Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport.
* Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport, AccelerateSupport.
*
\code
#include <Eigen/IterativeLinearSolvers>
\endcode
*/

// IWYU pragma: begin_exports
#include "src/IterativeLinearSolvers/SolveWithGuess.h"
#include "src/IterativeLinearSolvers/IterativeSolverBase.h"
#include "src/IterativeLinearSolvers/BasicPreconditioners.h"
Expand All @@ -42,6 +43,7 @@
#include "src/IterativeLinearSolvers/BiCGSTAB.h"
#include "src/IterativeLinearSolvers/IncompleteLUT.h"
#include "src/IterativeLinearSolvers/IncompleteCholesky.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
2 changes: 2 additions & 0 deletions Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Jacobi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
* - MatrixBase::applyOnTheRight().
*/

// IWYU pragma: begin_exports
#include "src/Jacobi/Jacobi.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
9 changes: 4 additions & 5 deletions Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/LU
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@

#include "src/misc/Kernel.h"
#include "src/misc/Image.h"

// IWYU pragma: begin_exports
#include "src/LU/FullPivLU.h"
#include "src/LU/PartialPivLU.h"
#ifdef EIGEN_USE_LAPACKE
#ifdef EIGEN_USE_MKL
#include "mkl_lapacke.h"
#else
#include "src/misc/lapacke.h"
#endif
#include "src/misc/lapacke_helpers.h"
#include "src/LU/PartialPivLU_LAPACKE.h"
#endif
#include "src/LU/Determinant.h"
Expand All @@ -41,6 +39,7 @@
#if defined EIGEN_VECTORIZE_SSE || defined EIGEN_VECTORIZE_NEON
#include "src/LU/arch/InverseSize4.h"
#endif
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
3 changes: 2 additions & 1 deletion Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/MetisSupport
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ extern "C" {
* It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink
*/


// IWYU pragma: begin_exports
#include "src/MetisSupport/MetisSupport.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

Expand Down
Loading

0 comments on commit f1c48dc

Please sign in to comment.