Skip to content

Commit 8e44e7d

Browse files
kwrobothjmjohnson
authored andcommitted
Eigen3 2026-05-10 (d477c5cf)
Code extracted from: https://github.com/InsightSoftwareConsortium/eigen at commit d477c5cf9f76583054b9efddaecce1b3c1a5962f (for/itk-20260509-599d71ab-p2-prose).
1 parent bc87d16 commit 8e44e7d

440 files changed

Lines changed: 5919 additions & 2705 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.

CMakeLists.txt

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

47
project(Eigen3)
58

69
# ITK doesn't compile anything here, just generates targets for the INTERFACE library.
7-
if(FALSE)
10+
#[[ # ITK - START DISABLE UPSTREAM EIGEN LOGIC
811
912
cmake_minimum_required(VERSION 3.10.0)
1013
@@ -828,7 +831,7 @@ message(STATUS "")
828831
message(STATUS "Configured Eigen ${EIGEN_VERSION_STRING}")
829832
message(STATUS "")
830833
831-
endif() # Regular CMakeLists of Eigen ends here
834+
#]] # ITK -STOP DISABLE UPSTREAM EIGEN LOGIC
832835

833836
###############################################################################
834837
################################ ITK ##########################################
@@ -949,8 +952,7 @@ add_library (ITKInternalEigen3::Eigen ALIAS eigen_internal)
949952
# This would wrongly enforce EIGEN_MPL2_ONLY to other libraries using Eigen.
950953
# We wrap this definition in ITK_USE_EIGEN_MPL2_ONLY, and only enabling it internally in the dashboards and CI,
951954
# to avoid introducing GPL code from Eigen3 internally in ITK.
952-
option(ITK_USE_EIGEN_MPL2_ONLY "Set compile definition EIGEN_MPL2_ONLY for ITKInternalEigen3." OFF)
953-
mark_as_advanced(ITK_USE_EIGEN_MPL2_ONLY)
955+
# (ITK_USE_EIGEN_MPL2_ONLY is declared once near line 844 of this file.)
954956

955957
if(ITK_USE_EIGEN_MPL2_ONLY)
956958
target_compile_definitions (eigen_internal INTERFACE "EIGEN_MPL2_ONLY")
@@ -961,12 +963,15 @@ endif()
961963
# INSTALL: headers require pre-prend itkeigen/Eigen/X.
962964
target_include_directories (eigen_internal SYSTEM INTERFACE
963965
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
964-
# $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..>
965966
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
966967
)
967968

968969
# Export as title case Eigen
969970
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()
970975
install (TARGETS eigen_internal EXPORT ITKInternalEigen3Targets)
971976

972977
set(EIGEN3_TARGETS_FILE ITKInternalEigen3Targets.cmake)

Eigen/AccelerateSupport

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_ACCELERATESUPPORT_MODULE_H
911
#define EIGEN_ACCELERATESUPPORT_MODULE_H

Eigen/Cholesky

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_CHOLESKY_MODULE_H
911
#define EIGEN_CHOLESKY_MODULE_H

Eigen/CholmodSupport

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
911
#define EIGEN_CHOLMODSUPPORT_MODULE_H

Eigen/Core

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// This Source Code Form is subject to the terms of the Mozilla
88
// Public License v. 2.0. If a copy of the MPL was not distributed
99
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10+
// SPDX-License-Identifier: MPL-2.0
1011

1112
#ifndef EIGEN_CORE_MODULE_H
1213
#define EIGEN_CORE_MODULE_H
@@ -49,7 +50,6 @@
4950
#include "src/Core/util/MKL_support.h"
5051
#include "src/Core/util/AOCL_Support.h"
5152

52-
5353
// EIGEN_HAS_GPU_FP16 is now always true when compiling with CUDA or HIP.
5454
// Use EIGEN_GPUCC (compile-time) or EIGEN_GPU_COMPILE_PHASE (device phase) instead.
5555
// TODO: Remove EIGEN_HAS_GPU_BF16 similarly once HIP bf16 guards are cleaned up.
@@ -152,8 +152,8 @@
152152

153153
namespace Eigen {
154154

155-
using std::size_t;
156155
using std::ptrdiff_t;
156+
using std::size_t;
157157

158158
} // namespace Eigen
159159

@@ -275,9 +275,10 @@ using std::ptrdiff_t;
275275
#include "src/Core/arch/SVE/TypeCasting.h"
276276
#include "src/Core/arch/SVE/MathFunctions.h"
277277
#elif defined EIGEN_VECTORIZE_RVV10
278+
#include "src/Core/arch/RVV10/PacketMathDecl.h"
278279
#include "src/Core/arch/RVV10/PacketMath.h"
279-
#include "src/Core/arch/RVV10/PacketMath4.h"
280280
#include "src/Core/arch/RVV10/PacketMath2.h"
281+
#include "src/Core/arch/RVV10/PacketMath4.h"
281282
#include "src/Core/arch/RVV10/TypeCasting.h"
282283
#include "src/Core/arch/RVV10/MathFunctions.h"
283284
#if defined EIGEN_VECTORIZE_RVV10FP16
@@ -286,6 +287,10 @@ using std::ptrdiff_t;
286287
#if defined EIGEN_VECTORIZE_RVV10BF16
287288
#include "src/Core/arch/RVV10/PacketMathBF16.h"
288289
#endif
290+
#if EIGEN_RISCV64_DEFAULT_LMUL == 1
291+
#include "src/Core/arch/RVV10/Complex.h"
292+
#include "src/Core/arch/RVV10/Complex2.h"
293+
#endif
289294
#elif defined EIGEN_VECTORIZE_ZVECTOR
290295
#include "src/Core/arch/ZVector/PacketMath.h"
291296
#include "src/Core/arch/ZVector/MathFunctions.h"

Eigen/Dense

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_DENSE_MODULE_H
911
#define EIGEN_DENSE_MODULE_H

Eigen/Eigen

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_EIGEN_MODULE_H
911
#define EIGEN_EIGEN_MODULE_H

Eigen/Eigenvalues

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_EIGENVALUES_MODULE_H
911
#define EIGEN_EIGENVALUES_MODULE_H

Eigen/Geometry

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_GEOMETRY_MODULE_H
911
#define EIGEN_GEOMETRY_MODULE_H
@@ -23,7 +25,8 @@
2325
* - \link Quaternion quaternions \endlink
2426
* - cross products (\ref MatrixBase::cross(), \ref MatrixBase::cross3())
2527
* - orthogonal vector generation (MatrixBase::unitOrthogonal)
26-
* - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink
28+
* - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes
29+
* \endlink
2730
* - \link AlignedBox axis aligned bounding boxes \endlink
2831
* - \link umeyama() least-square transformation fitting \endlink
2932
* \code

Eigen/Householder

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// This Source Code Form is subject to the terms of the Mozilla
55
// Public License v. 2.0. If a copy of the MPL was not distributed
66
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
// SPDX-FileCopyrightText: The Eigen Authors
8+
// SPDX-License-Identifier: MPL-2.0
79

810
#ifndef EIGEN_HOUSEHOLDER_MODULE_H
911
#define EIGEN_HOUSEHOLDER_MODULE_H

0 commit comments

Comments
 (0)