Skip to content

Commit 661c321

Browse files
authored
[upstream_utils] Restore Eigen intellisense fix (#7404)
This reverts commit d1de766. Intellisense is still broken on Windows Athena target with the error `incomplete type "Eigen::Matrix<double, 3, 3, 0, 3, 3>" is not allowed`.
1 parent d1de766 commit 661c321

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Peter Johnson <[email protected]>
3+
Date: Fri, 20 Jan 2023 23:41:56 -0800
4+
Subject: [PATCH 2/2] Intellisense fix
5+
6+
---
7+
Eigen/src/Core/util/ConfigureVectorization.h | 7 +++++++
8+
1 file changed, 7 insertions(+)
9+
10+
diff --git a/Eigen/src/Core/util/ConfigureVectorization.h b/Eigen/src/Core/util/ConfigureVectorization.h
11+
index 47ddd4f8ae33405f2a6600dc33bd3d07a668e63f..d0fd181ecfdeb9a80e065b1d81e8860d6a6ad57c 100644
12+
--- a/Eigen/src/Core/util/ConfigureVectorization.h
13+
+++ b/Eigen/src/Core/util/ConfigureVectorization.h
14+
@@ -174,6 +174,13 @@
15+
16+
//----------------------------------------------------------------------
17+
18+
+// Disable vectorization in intellisense
19+
+#ifdef __INTELLISENSE__
20+
+#ifndef EIGEN_DONT_VECTORIZE
21+
+#define EIGEN_DONT_VECTORIZE
22+
+#endif
23+
+#endif
24+
+
25+
// if alignment is disabled, then disable vectorization. Note: EIGEN_MAX_ALIGN_BYTES is the proper check, it takes into
26+
// account both the user's will (EIGEN_MAX_ALIGN_BYTES,EIGEN_DONT_ALIGN) and our own platform checks
27+
#if EIGEN_MAX_ALIGN_BYTES == 0

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@
174174

175175
//----------------------------------------------------------------------
176176

177+
// Disable vectorization in intellisense
178+
#ifdef __INTELLISENSE__
179+
#ifndef EIGEN_DONT_VECTORIZE
180+
#define EIGEN_DONT_VECTORIZE
181+
#endif
182+
#endif
183+
177184
// if alignment is disabled, then disable vectorization. Note: EIGEN_MAX_ALIGN_BYTES is the proper check, it takes into
178185
// account both the user's will (EIGEN_MAX_ALIGN_BYTES,EIGEN_DONT_ALIGN) and our own platform checks
179186
#if EIGEN_MAX_ALIGN_BYTES == 0

0 commit comments

Comments
 (0)