├── use-system-installation-of-eigen.cmake
├── .gitignore
├── README.md
├── StdVector.patch
├── package.xml
├── cmake
└── eigen-extras.cmake.in
├── LICENSE
├── DisableTests.patch
├── FixWarning.patch
└── CMakeLists.txt
/use-system-installation-of-eigen.cmake:
--------------------------------------------------------------------------------
1 | set(USE_SYSTEM_EIGEN "AUTO")
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Compiled Dynamic libraries
8 | *.so
9 | *.dylib
10 | *.dll
11 |
12 | # Compiled Static libraries
13 | *.lai
14 | *.la
15 | *.a
16 | *.lib
17 |
18 | # Executables
19 | *.exe
20 | *.out
21 | *.app
22 | *~
23 |
24 | # Bloom.
25 | debian
26 | obj*
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Pull in a recent version of Eigen from upstream or find a system installation
2 | ```
3 | eigen_catkin
4 | ```
5 |
6 | To debug or analyze the effects of this library on your catkin workspace : https://github.com/ethz-asl/eigen_catkin_tools.
7 |
8 | For an overview of the possible reasons for segfaults / compiler errors / other issues see this wikipage: https://github.com/ethz-asl/eigen_catkin/wiki/Eigen-Memory-Issues
9 |
--------------------------------------------------------------------------------
/StdVector.patch:
--------------------------------------------------------------------------------
1 | --- Eigen/StdVector
2 | +++ Eigen/StdVector
3 | @@ -14,6 +14,8 @@
4 | #include "Core"
5 | #include
6 |
7 | +#if __cplusplus < 201103L
8 | +
9 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */
10 |
11 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...)
12 | @@ -24,4 +26,6 @@
13 |
14 | #endif
15 |
16 | +#endif
17 | +
18 | #endif // EIGEN_STDVECTOR_MODULE_H
19 |
--------------------------------------------------------------------------------
/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | eigen_catkin
4 | 3.2.12
5 | eigen_catkin
6 | Thomas Schneider
7 | ASL
8 | New BSD
9 |
10 | catkin
11 | catkin_simple
12 |
13 | cmake_modules
14 |
15 |
--------------------------------------------------------------------------------
/cmake/eigen-extras.cmake.in:
--------------------------------------------------------------------------------
1 | if("@INSTALLSPACE@" STREQUAL "TRUE" AND "@USE_SYSTEM_EIGEN@" STREQUAL "OFF")
2 | set(@PROJECT_NAME@_INCLUDE_DIRS ${@PROJECT_NAME@_INCLUDE_DIRS}/eigen3)
3 | endif()
4 |
5 | # The following eigen_catkin_enforce macro can be called in a depending
6 | # project's CMakeLists.txt file (Below findpackage eigen_catkin or the
7 | # catkin_simple() call.
8 | # It will ensure that eigen_catkin's lib Eigen will be included instead
9 | # of any other possible candidate (like a system installation of Eigen).
10 | #
11 | # It is possible to get that right by careful treatment of workspace layer
12 | # order but calling this macro is easier.
13 | macro(eigen_catkin_enforce)
14 | include_directories(BEFORE ${@PROJECT_NAME@_INCLUDE_DIRS})
15 | endmacro()
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014-2019, Autonomous Systems Lab, ETH Zurich
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in the
12 | documentation and/or other materials provided with the distribution.
13 |
14 | 3. Neither the name of the Autonomous Systems Lab, ETH Zurich nor the
15 | names of its contributors may be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/DisableTests.patch:
--------------------------------------------------------------------------------
1 | --- CMakeLists.txt
2 | +++ CMakeLists.txt
3 | @@ -416,16 +416,15 @@ add_subdirectory(Eigen)
4 |
5 | add_subdirectory(doc EXCLUDE_FROM_ALL)
6 |
7 | -include(EigenConfigureTesting)
8 | +option(BUILD_TESTING "Enable creation of Eigen tests." ON)
9 | +if(BUILD_TESTING)
10 | + include(EigenConfigureTesting)
11 |
12 | -# fixme, not sure this line is still needed:
13 | -enable_testing() # must be called from the root CMakeLists, see man page
14 | -
15 | -
16 | -if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
17 | - add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
18 | -else()
19 | - add_subdirectory(test EXCLUDE_FROM_ALL)
20 | + if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
21 | + add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
22 | + else()
23 | + add_subdirectory(test EXCLUDE_FROM_ALL)
24 | + endif()
25 | endif()
26 |
27 | if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
28 | @@ -461,7 +460,9 @@ endif(NOT WIN32)
29 |
30 | configure_file(scripts/cdashtesting.cmake.in cdashtesting.cmake @ONLY)
31 |
32 | -ei_testing_print_summary()
33 | +if(BUILD_TESTING)
34 | + ei_testing_print_summary()
35 | +endif()
36 |
37 | message(STATUS "")
38 | message(STATUS "Configured Eigen ${EIGEN_VERSION_NUMBER}")
39 | diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt
40 | index d0efb4188..9887d5804 100644
41 | --- blas/CMakeLists.txt
42 | +++ blas/CMakeLists.txt
43 | @@ -45,10 +45,12 @@ install(TARGETS eigen_blas eigen_blas_static
44 |
45 | if(EIGEN_Fortran_COMPILER_WORKS)
46 |
47 | -if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
48 | - add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
49 | -else()
50 | - add_subdirectory(testing EXCLUDE_FROM_ALL)
51 | +if(BUILD_TESTING)
52 | + if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
53 | + add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
54 | + else()
55 | + add_subdirectory(testing EXCLUDE_FROM_ALL)
56 | + endif()
57 | endif()
58 |
59 | endif()
60 | diff --git a/unsupported/CMakeLists.txt b/unsupported/CMakeLists.txt
61 | index 4fef40a86..9a5666105 100644
62 | --- unsupported/CMakeLists.txt
63 | +++ unsupported/CMakeLists.txt
64 | @@ -1,7 +1,9 @@
65 | add_subdirectory(Eigen)
66 | add_subdirectory(doc EXCLUDE_FROM_ALL)
67 | -if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
68 | - add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
69 | -else()
70 | - add_subdirectory(test EXCLUDE_FROM_ALL)
71 | +if(BUILD_TESTING)
72 | + if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
73 | + add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
74 | + else()
75 | + add_subdirectory(test EXCLUDE_FROM_ALL)
76 | + endif()
77 | endif()
78 |
--------------------------------------------------------------------------------
/FixWarning.patch:
--------------------------------------------------------------------------------
1 | --- Eigen/src/Core/AssignEvaluator.h 2019-12-25 13:19:30.927689094 +0100
2 | +++ Eigen/src/Core/AssignEvaluator.h 2019-12-25 13:19:32.779688334 +0100
3 | @@ -83,11 +83,11 @@
4 | && int(OuterStride)!=Dynamic && int(OuterStride)%int(InnerPacketSize)==0
5 | && (EIGEN_UNALIGNED_VECTORIZE || int(JointAlignment)>=int(InnerRequiredAlignment)),
6 | MayLinearize = bool(StorageOrdersAgree) && (int(DstFlags) & int(SrcFlags) & LinearAccessBit),
7 | - MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
8 | + MayLinearVectorize = bool(MightVectorize) && MayLinearize && (DstHasDirectAccess!=0)
9 | && (EIGEN_UNALIGNED_VECTORIZE || (int(DstAlignment)>=int(LinearRequiredAlignment)) || MaxSizeAtCompileTime == Dynamic),
10 | /* If the destination isn't aligned, we have to do runtime checks and we don't unroll,
11 | so it's only good for large enough sizes. */
12 | - MaySliceVectorize = bool(MightVectorize) && bool(DstHasDirectAccess)
13 | + MaySliceVectorize = bool(MightVectorize) && (DstHasDirectAccess!=0)
14 | && (int(InnerMaxSize)==Dynamic || int(InnerMaxSize)>=(EIGEN_UNALIGNED_VECTORIZE?InnerPacketSize:(3*InnerPacketSize)))
15 | /* slice vectorization can be slow, so we only want it if the slices are big, which is
16 | indicated by InnerMaxSize rather than InnerSize, think of the case of a dynamic block
17 | --- Eigen/src/Core/products/GeneralMatrixVector.h 2017-06-15 09:10:20.000000000 +0200
18 | +++ Eigen/src/Core/products/GeneralMatrixVector.h 2019-12-25 13:59:41.286547822 +0100
19 | @@ -183,8 +183,8 @@
20 | alignmentPattern = AllAligned;
21 | }
22 |
23 | - const Index offset1 = (FirstAligned && alignmentStep==1)?3:1;
24 | - const Index offset3 = (FirstAligned && alignmentStep==1)?1:3;
25 | + const Index offset1 = (FirstAligned!=0 && alignmentStep==1)?3:1;
26 | + const Index offset3 = (FirstAligned!=0 && alignmentStep==1)?1:3;
27 |
28 | Index columnBound = ((cols-skipColumns)/columnsAtOnce)*columnsAtOnce + skipColumns;
29 | for (Index i=skipColumns; i