Skip to content

Commit a7e7f69

Browse files
authored
[upstream_utils] Upgrade to Eigen 5.0.0 (#8240)
1 parent ee0a8a1 commit a7e7f69

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

upstream_utils/eigen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def eigen_inclusions(dp: Path, f: str):
7777
"SparseLU",
7878
"SparseQR",
7979
"StdVector",
80+
"Version",
8081
"misc",
8182
"plugins",
8283
]
@@ -144,8 +145,7 @@ def copy_upstream_src(wpilib_root: Path):
144145
def main():
145146
name = "eigen"
146147
url = "https://gitlab.com/libeigen/eigen.git"
147-
# master on 2025-09-08
148-
tag = "e0a59e5a66e6d16fa93ab4f5e48bf539205e837f"
148+
tag = "5.0.0"
149149

150150
eigen = Lib(name, url, tag, copy_upstream_src)
151151
eigen.main()

wpimath/src/main/native/thirdparty/eigen/include/Eigen/Core

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#ifndef EIGEN_CORE_MODULE_H
1212
#define EIGEN_CORE_MODULE_H
1313

14+
// Eigen version information.
15+
#include "Version"
16+
1417
// first thing Eigen does: stop the compiler from reporting useless warnings.
1518
#include "src/Core/util/DisableStupidWarnings.h"
1619

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#ifndef EIGEN_VERSION_H
2+
#define EIGEN_VERSION_H
3+
4+
// The "WORLD" version will forever remain "3" for the "Eigen3" library.
5+
#define EIGEN_WORLD_VERSION 3
6+
// As of Eigen3 5.0.0, we have moved to Semantic Versioning (semver.org).
7+
#define EIGEN_MAJOR_VERSION 5
8+
#define EIGEN_MINOR_VERSION 0
9+
#define EIGEN_PATCH_VERSION 0
10+
#define EIGEN_PRERELEASE_VERSION "dev"
11+
#define EIGEN_BUILD_VERSION "master"
12+
#define EIGEN_VERSION_STRING "5.0.0-dev+master"
13+
14+
#endif // EIGEN_VERSION_H

wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@
1717
// Eigen version and basic defaults
1818
//------------------------------------------------------------------------------------------
1919

20-
#define EIGEN_WORLD_VERSION 3
21-
#define EIGEN_MAJOR_VERSION 4
22-
#define EIGEN_MINOR_VERSION 90
23-
2420
#define EIGEN_VERSION_AT_LEAST(x, y, z) \
25-
(EIGEN_WORLD_VERSION > x || \
26-
(EIGEN_WORLD_VERSION >= x && (EIGEN_MAJOR_VERSION > y || (EIGEN_MAJOR_VERSION >= y && EIGEN_MINOR_VERSION >= z))))
21+
(EIGEN_MAJOR_VERSION > x || \
22+
(EIGEN_MAJOR_VERSION >= x && (EIGEN_MINOR_VERSION > y || (EIGEN_MINOR_VERSION >= y && EIGEN_PATCH_VERSION >= z))))
2723

2824
#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
2925
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::RowMajor

0 commit comments

Comments
 (0)