Skip to content

Commit cff5c14

Browse files
committed
Merge branch 'upstream-Eigen3' into eigen-fork-update-verify-2026-05-10
# By Eigen Upstream * upstream-Eigen3: Eigen3 2026-05-11 (for/itk-eigen-5.0.1)
2 parents 59176b1 + 35c8dc6 commit cff5c14

314 files changed

Lines changed: 20768 additions & 24287 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Modules/ThirdParty/Eigen3/src/itkeigen/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: The Eigen Authors
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
# Same version of ITK cmake_minimum_required
25
cmake_minimum_required(VERSION 3.16.3)
36

@@ -965,6 +968,10 @@ target_include_directories (eigen_internal SYSTEM INTERFACE
965968

966969
# Export as title case Eigen
967970
set_target_properties (eigen_internal PROPERTIES EXPORT_NAME Eigen)
971+
# Issue InsightSoftwareConsortium/ITK#6239: ship eigen_internal in ITKTargets.cmake when building inside ITK.
972+
if(DEFINED ITK3P_INSTALL_EXPORT_NAME)
973+
install (TARGETS eigen_internal EXPORT ${ITK3P_INSTALL_EXPORT_NAME})
974+
endif()
968975
install (TARGETS eigen_internal EXPORT ITKInternalEigen3Targets)
969976

970977
set(EIGEN3_TARGETS_FILE ITKInternalEigen3Targets.cmake)

Modules/ThirdParty/Eigen3/src/itkeigen/COPYING.MPL2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Mozilla Public License Version 2.0
3535
means any form of the work other than Source Code Form.
3636

3737
1.7. "Larger Work"
38-
means a work that combines Covered Software with other material, in
38+
means a work that combines Covered Software with other material, in
3939
a separate file or files, that is not Covered Software.
4040

4141
1.8. "License"
Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
Eigen is primarily licensed under the Mozilla Public License 2.0.
2-
See LICENSE, COPYING.MPL2, and these links:
3-
https://www.mozilla.org/MPL/2.0/
4-
https://www.mozilla.org/MPL/2.0/FAQ.html
1+
Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
2+
http://www.mozilla.org/MPL/2.0/
3+
http://www.mozilla.org/MPL/2.0/FAQ.html
54

6-
Some files contain third-party code under permissive or otherwise
7-
MPL2-compatible licenses, hence the other COPYING.* files here. These
8-
include Apache-2.0, BSD-style notices, the MINPACK license, and the MORSE
9-
CMake module BSD-style notice in cmake/MORSE-Copyright.txt.
10-
11-
Note that some optional external dependencies (e.g. FFTW, MPFR C++)
12-
are distributed under different licenses, including the GPL. Refer to
13-
the individual source files and their respective COPYING files for
14-
details.
5+
Some files contain third-party code under BSD or other MPL2-compatible licenses,
6+
whence the other COPYING.* files here.

Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Cholesky

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "src/Core/util/DisableStupidWarnings.h"
1515

1616
/** \defgroup Cholesky_Module Cholesky module
17+
*
18+
*
1719
*
1820
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
1921
* Those decompositions are also accessible via the following methods:

Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/CholmodSupport

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* For the sake of completeness, this module also propose the two following classes:
2727
* - class CholmodSimplicialLLT
2828
* - class CholmodSimplicialLDLT
29-
* Note that these classes do not bring any particular advantage compared to the built-in
29+
* Note that these classes does not bring any particular advantage compared to the built-in
3030
* SimplicialLLT and SimplicialLDLT factorization classes.
3131
*
3232
* \code

Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Core

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
#include <new>
3737
#endif
3838

39+
// Disable the ipa-cp-clone optimization flag with MinGW 6.x or older (enabled by default with -O3)
40+
// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details.
41+
#if EIGEN_COMP_MINGW && EIGEN_GNUC_STRICT_LESS_THAN(6, 0, 0)
42+
#pragma GCC optimize("-fno-ipa-cp-clone")
43+
#endif
44+
3945
// Prevent ICC from specializing std::complex operators that silently fail
4046
// on device. This allows us to use our own device-compatible specializations
4147
// instead.
@@ -47,12 +53,10 @@
4753
// this include file manages BLAS and MKL related macros
4854
// and inclusion of their respective header files
4955
#include "src/Core/util/MKL_support.h"
50-
#include "src/Core/util/AOCL_Support.h"
51-
5256

53-
// EIGEN_HAS_GPU_FP16 is now always true when compiling with CUDA or HIP.
54-
// Use EIGEN_GPUCC (compile-time) or EIGEN_GPU_COMPILE_PHASE (device phase) instead.
55-
// TODO: Remove EIGEN_HAS_GPU_BF16 similarly once HIP bf16 guards are cleaned up.
57+
#if defined(EIGEN_HAS_CUDA_FP16) || defined(EIGEN_HAS_HIP_FP16)
58+
#define EIGEN_HAS_GPU_FP16
59+
#endif
5660

5761
#if defined(EIGEN_HAS_CUDA_BF16) || defined(EIGEN_HAS_HIP_BF16)
5862
#define EIGEN_HAS_GPU_BF16
@@ -67,7 +71,8 @@
6771
#include <omp.h>
6872
#endif
6973

70-
#if !EIGEN_COMP_ARM
74+
// MSVC for windows mobile does not have the errno.h file
75+
#if !(EIGEN_COMP_MSVC && EIGEN_OS_WINCE) && !EIGEN_COMP_ARM
7176
#define EIGEN_HAS_ERRNO
7277
#endif
7378

@@ -96,9 +101,6 @@
96101
// for std::is_nothrow_move_assignable
97102
#include <type_traits>
98103

99-
// for std::move, std::forward, std::declval
100-
#include <utility>
101-
102104
// for std::this_thread::yield().
103105
#if !defined(EIGEN_USE_BLAS) && (defined(EIGEN_HAS_OPENMP) || defined(EIGEN_GEMM_THREADPOOL))
104106
#include <thread>
@@ -121,18 +123,10 @@
121123

122124
// required for __cpuid, needs to be included after cmath
123125
// also required for _BitScanReverse on Windows on ARM
124-
#if EIGEN_COMP_MSVC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM64)
126+
#if EIGEN_COMP_MSVC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM64) && !EIGEN_OS_WINCE
125127
#include <intrin.h>
126128
#endif
127129

128-
// Required for querying cache sizes on Linux and macOS.
129-
#if EIGEN_OS_LINUX
130-
#include <unistd.h>
131-
#elif EIGEN_OS_MAC
132-
#include <sys/types.h>
133-
#include <sys/sysctl.h>
134-
#endif
135-
136130
#if defined(EIGEN_USE_SYCL)
137131
#undef min
138132
#undef max
@@ -142,6 +136,7 @@
142136
#include <CL/sycl.hpp>
143137
#include <map>
144138
#include <thread>
139+
#include <utility>
145140
#ifndef EIGEN_SYCL_LOCAL_THREAD_DIM0
146141
#define EIGEN_SYCL_LOCAL_THREAD_DIM0 16
147142
#endif
@@ -150,9 +145,19 @@
150145
#endif
151146
#endif
152147

148+
#if defined EIGEN2_SUPPORT_STAGE40_FULL_EIGEN3_STRICTNESS || defined EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API || \
149+
defined EIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS || defined EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API || \
150+
defined EIGEN2_SUPPORT
151+
// This will generate an error message:
152+
#error Eigen2-support is only available up to version 3.2. Please go to "http://eigen.tuxfamily.org/index.php?title=Eigen2" for further information
153+
#endif
154+
153155
namespace Eigen {
154156

157+
// we use size_t frequently and we'll never remember to prepend it with std:: every time just to
158+
// ensure QNX/QCC support
155159
using std::size_t;
160+
// gcc 4.6.0 wants std:: for ptrdiff_t
156161
using std::ptrdiff_t;
157162

158163
} // namespace Eigen
@@ -170,8 +175,6 @@ using std::ptrdiff_t;
170175
#ifdef EIGEN_USE_LAPACKE
171176
#ifdef EIGEN_USE_MKL
172177
#include "mkl_lapacke.h"
173-
#elif defined(EIGEN_LAPACKE_SYSTEM)
174-
#include <lapacke.h>
175178
#else
176179
#include "src/misc/lapacke.h"
177180
#endif
@@ -202,13 +205,6 @@ using std::ptrdiff_t;
202205
#include "src/Core/arch/Default/BFloat16.h"
203206
#include "src/Core/arch/Default/GenericPacketMathFunctionsFwd.h"
204207

205-
#if defined(EIGEN_VECTORIZE_GENERIC) && !defined(EIGEN_DONT_VECTORIZE)
206-
#include "src/Core/arch/clang/PacketMath.h"
207-
#include "src/Core/arch/clang/TypeCasting.h"
208-
#include "src/Core/arch/clang/Complex.h"
209-
#include "src/Core/arch/clang/Reductions.h"
210-
#include "src/Core/arch/clang/MathFunctions.h"
211-
#else
212208
#if defined EIGEN_VECTORIZE_AVX512
213209
#include "src/Core/arch/SSE/PacketMath.h"
214210
#include "src/Core/arch/SSE/Reductions.h"
@@ -274,18 +270,6 @@ using std::ptrdiff_t;
274270
#include "src/Core/arch/SVE/PacketMath.h"
275271
#include "src/Core/arch/SVE/TypeCasting.h"
276272
#include "src/Core/arch/SVE/MathFunctions.h"
277-
#elif defined EIGEN_VECTORIZE_RVV10
278-
#include "src/Core/arch/RVV10/PacketMath.h"
279-
#include "src/Core/arch/RVV10/PacketMath4.h"
280-
#include "src/Core/arch/RVV10/PacketMath2.h"
281-
#include "src/Core/arch/RVV10/TypeCasting.h"
282-
#include "src/Core/arch/RVV10/MathFunctions.h"
283-
#if defined EIGEN_VECTORIZE_RVV10FP16
284-
#include "src/Core/arch/RVV10/PacketMathFP16.h"
285-
#endif
286-
#if defined EIGEN_VECTORIZE_RVV10BF16
287-
#include "src/Core/arch/RVV10/PacketMathBF16.h"
288-
#endif
289273
#elif defined EIGEN_VECTORIZE_ZVECTOR
290274
#include "src/Core/arch/ZVector/PacketMath.h"
291275
#include "src/Core/arch/ZVector/MathFunctions.h"
@@ -313,8 +297,6 @@ using std::ptrdiff_t;
313297
#endif
314298
#endif
315299

316-
#endif // #ifndef EIGEN_VECTORIZE_GENERIC
317-
318300
#include "src/Core/arch/Default/Settings.h"
319301
// This file provides generic implementations valid for scalar as well
320302
#include "src/Core/arch/Default/GenericPacketMathFunctions.h"
@@ -358,12 +340,13 @@ using std::ptrdiff_t;
358340
#include "src/Core/DenseStorage.h"
359341
#include "src/Core/NestByValue.h"
360342

343+
// #include "src/Core/ForceAlignedAccess.h"
344+
361345
#include "src/Core/ReturnByValue.h"
362346
#include "src/Core/NoAlias.h"
363347
#include "src/Core/PlainObjectBase.h"
364348
#include "src/Core/Matrix.h"
365349
#include "src/Core/Array.h"
366-
#include "src/Core/StructuredBindings.h"
367350
#include "src/Core/Fill.h"
368351
#include "src/Core/CwiseTernaryOp.h"
369352
#include "src/Core/CwiseBinaryOp.h"
@@ -424,28 +407,23 @@ using std::ptrdiff_t;
424407
#include "src/Core/CoreIterators.h"
425408
#include "src/Core/ConditionEstimator.h"
426409

427-
#if !defined(EIGEN_VECTORIZE_GENERIC)
428410
#if defined(EIGEN_VECTORIZE_VSX)
429411
#include "src/Core/arch/AltiVec/MatrixProduct.h"
430412
#elif defined EIGEN_VECTORIZE_NEON
431413
#include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
432414
#elif defined EIGEN_VECTORIZE_LSX
433415
#include "src/Core/arch/LSX/GeneralBlockPanelKernel.h"
434-
#elif defined EIGEN_VECTORIZE_RVV10
435-
#include "src/Core/arch/RVV10/GeneralBlockPanelKernel.h"
436416
#endif
437417

438418
#if defined(EIGEN_VECTORIZE_AVX512)
439419
#include "src/Core/arch/AVX512/GemmKernel.h"
440420
#endif
441-
#endif
442421

443422
#include "src/Core/Select.h"
444423
#include "src/Core/VectorwiseOp.h"
445424
#include "src/Core/PartialReduxEvaluator.h"
446425
#include "src/Core/Random.h"
447426
#include "src/Core/Replicate.h"
448-
#include "src/Core/ConcatOp.h"
449427
#include "src/Core/Reverse.h"
450428
#include "src/Core/ArrayWrapper.h"
451429
#include "src/Core/StlIterators.h"
@@ -465,10 +443,6 @@ using std::ptrdiff_t;
465443
#include "src/Core/Assign_MKL.h"
466444
#endif
467445

468-
#ifdef EIGEN_USE_AOCL_VML
469-
#include "src/Core/Assign_AOCL.h"
470-
#endif
471-
472446
#include "src/Core/GlobalFunctions.h"
473447
// IWYU pragma: end_exports
474448

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
// This file is part of Eigen, a lightweight C++ template library
2-
// for linear algebra.
3-
//
4-
// This Source Code Form is subject to the terms of the Mozilla
5-
// Public License v. 2.0. If a copy of the MPL was not distributed
6-
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7-
8-
#ifndef EIGEN_DENSE_MODULE_H
9-
#define EIGEN_DENSE_MODULE_H
10-
111
#include "Core"
122
#include "LU"
133
#include "Cholesky"
144
#include "QR"
155
#include "SVD"
166
#include "Geometry"
177
#include "Eigenvalues"
18-
19-
#endif // EIGEN_DENSE_MODULE_H
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
1-
// This file is part of Eigen, a lightweight C++ template library
2-
// for linear algebra.
3-
//
4-
// This Source Code Form is subject to the terms of the Mozilla
5-
// Public License v. 2.0. If a copy of the MPL was not distributed
6-
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7-
8-
#ifndef EIGEN_EIGEN_MODULE_H
9-
#define EIGEN_EIGEN_MODULE_H
10-
111
#include "Dense"
122
#include "Sparse"
13-
14-
#endif // EIGEN_EIGEN_MODULE_H

Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Eigenvalues

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111
#include "Core"
1212

1313
#include "Cholesky"
14+
#include "Jacobi"
15+
#include "Householder"
1416
#include "LU"
1517
#include "Geometry"
16-
#include "Sparse" // Needed by ComplexQZ.
1718

1819
#include "src/Core/util/DisableStupidWarnings.h"
1920

2021
/** \defgroup Eigenvalues_Module Eigenvalues module
22+
*
23+
*
2124
*
2225
* This module mainly provides various eigenvalue solvers.
2326
* This module also provides some MatrixBase methods, including:
@@ -29,6 +32,8 @@
2932
* \endcode
3033
*/
3134

35+
#include "src/misc/RealSvd2x2.h"
36+
3237
// IWYU pragma: begin_exports
3338
#include "src/Eigenvalues/Tridiagonalization.h"
3439
#include "src/Eigenvalues/RealSchur.h"
@@ -39,14 +44,11 @@
3944
#include "src/Eigenvalues/ComplexSchur.h"
4045
#include "src/Eigenvalues/ComplexEigenSolver.h"
4146
#include "src/Eigenvalues/RealQZ.h"
42-
#include "src/Eigenvalues/ComplexQZ.h"
4347
#include "src/Eigenvalues/GeneralizedEigenSolver.h"
4448
#include "src/Eigenvalues/MatrixBaseEigenvalues.h"
4549
#ifdef EIGEN_USE_LAPACKE
4650
#ifdef EIGEN_USE_MKL
4751
#include "mkl_lapacke.h"
48-
#elif defined(EIGEN_LAPACKE_SYSTEM)
49-
#include <lapacke.h>
5052
#else
5153
#include "src/misc/lapacke.h"
5254
#endif

Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Geometry

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "SVD"
1414
#include "LU"
15+
#include <limits>
1516

1617
#include "src/Core/util/DisableStupidWarnings.h"
1718

@@ -47,13 +48,10 @@
4748
#include "src/Geometry/AlignedBox.h"
4849
#include "src/Geometry/Umeyama.h"
4950

50-
#ifndef EIGEN_VECTORIZE_GENERIC
51-
// TODO(rmlarsen): Make these work with generic vectorization if possible.
5251
// Use the SSE optimized version whenever possible.
5352
#if (defined EIGEN_VECTORIZE_SSE) || (defined EIGEN_VECTORIZE_NEON)
5453
#include "src/Geometry/arch/Geometry_SIMD.h"
5554
#endif
56-
#endif
5755
// IWYU pragma: end_exports
5856

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

0 commit comments

Comments
 (0)