From ad5d1029f8b8d0154f13772f4679aef0326d4027 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 1 Nov 2024 11:18:18 +0100 Subject: [PATCH] install headers in default path /usr/include/eigen3 [release 3.4.0-2mamba;Thu Oct 31 2024] --- eigen3-3.2.10-fix-pkgconfig-includedir.patch | 8 ---- eigen3-3.3.5-disable-DGMRES.patch | 12 ----- ...-3.4.0-fix-vectorized-reduction-half.patch | 46 +++++++++++++++++++ eigen3.spec | 30 ++++++------ 4 files changed, 61 insertions(+), 35 deletions(-) delete mode 100644 eigen3-3.2.10-fix-pkgconfig-includedir.patch delete mode 100644 eigen3-3.3.5-disable-DGMRES.patch create mode 100644 eigen3-3.4.0-fix-vectorized-reduction-half.patch diff --git a/eigen3-3.2.10-fix-pkgconfig-includedir.patch b/eigen3-3.2.10-fix-pkgconfig-includedir.patch deleted file mode 100644 index b7bc17a..0000000 --- a/eigen3-3.2.10-fix-pkgconfig-includedir.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- eigen3-3.2.10/eigen/eigen3.pc.in.orig 2016-10-23 23:58:56.714454040 +0200 -+++ eigen3-3.2.10/eigen/eigen3.pc.in 2016-10-23 23:59:02.068510229 +0200 -@@ -6,4 +6,4 @@ - Requires: - Version: @EIGEN_VERSION_NUMBER@ - Libs: --Cflags: -I${prefix}/@INCLUDE_INSTALL_DIR@ -+Cflags: -I@INCLUDE_INSTALL_DIR@ diff --git a/eigen3-3.3.5-disable-DGMRES.patch b/eigen3-3.3.5-disable-DGMRES.patch deleted file mode 100644 index a4be925..0000000 --- a/eigen3-3.3.5-disable-DGMRES.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nru eigen3-3.3.5.orig/eigen/unsupported/Eigen/IterativeSolvers eigen3-3.3.5/eigen/unsupported/Eigen/IterativeSolvers ---- eigen3-3.3.5.orig/eigen/unsupported/Eigen/IterativeSolvers 2018-07-23 11:33:42.000000000 +0200 -+++ eigen3-3.3.5/eigen/unsupported/Eigen/IterativeSolvers 2018-08-22 20:35:02.966001027 +0200 -@@ -33,7 +33,7 @@ - #include "../../Eigen/Jacobi" - #include "../../Eigen/Householder" - #include "src/IterativeSolvers/GMRES.h" --#include "src/IterativeSolvers/DGMRES.h" -+//#include "src/IterativeSolvers/DGMRES.h" - //#include "src/IterativeSolvers/SSORPreconditioner.h" - #include "src/IterativeSolvers/MINRES.h" - diff --git a/eigen3-3.4.0-fix-vectorized-reduction-half.patch b/eigen3-3.4.0-fix-vectorized-reduction-half.patch new file mode 100644 index 0000000..217eef2 --- /dev/null +++ b/eigen3-3.4.0-fix-vectorized-reduction-half.patch @@ -0,0 +1,46 @@ +From d0e3791b1a0e2db9edd5f1d1befdb2ac5a40efe0 Mon Sep 17 00:00:00 2001 +From: Alex Druinsky +Date: Wed, 20 Oct 2021 16:03:12 -0700 +Subject: [PATCH] Fix vectorized reductions for Eigen::half + +Fixes compiler errors in expressions that look like + + Eigen::Matrix::Random().maxCoeff() + +The error comes from the code that creates the initial value for +vectorized reductions. The fix is to specify the scalar type of the +reduction's initial value. + +The cahnge is necessary for Eigen::half because unlike other types, +Eigen::half scalars cannot be implicitly created from integers. +--- + Eigen/src/Core/PartialReduxEvaluator.h | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/Eigen/src/Core/PartialReduxEvaluator.h b/Eigen/src/Core/PartialReduxEvaluator.h +index 4040ae726f..a179688815 100644 +--- a/Eigen/src/Core/PartialReduxEvaluator.h ++++ b/Eigen/src/Core/PartialReduxEvaluator.h +@@ -56,12 +56,17 @@ struct packetwise_redux_traits + /* Value to be returned when size==0 , by default let's return 0 */ + template + EIGEN_DEVICE_FUNC +-PacketType packetwise_redux_empty_value(const Func& ) { return pset1(0); } ++PacketType packetwise_redux_empty_value(const Func& ) { ++ const typename unpacket_traits::type zero(0); ++ return pset1(zero); ++} + + /* For products the default is 1 */ + template + EIGEN_DEVICE_FUNC +-PacketType packetwise_redux_empty_value(const scalar_product_op& ) { return pset1(1); } ++PacketType packetwise_redux_empty_value(const scalar_product_op& ) { ++ return pset1(Scalar(1)); ++} + + /* Perform the actual reduction */ + template URL: https://eigen.tuxfamily.org/index.php?title=Main_Page Source: https://gitlab.com/libeigen/eigen.git/%{version}/eigen-%{version}.tar.bz2 -Patch0: eigen3-3.2.10-fix-pkgconfig-includedir.patch -Patch1: eigen3-3.3.5-disable-DGMRES.patch +Patch0: eigen3-3.4.0-fix-vectorized-reduction-half.patch License: LGPL, MPL ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END @@ -33,18 +32,14 @@ This package contains static libraries and header files needed for development. %prep %setup -q -n eigen-%{version} -#% patch 0 -p2 -#% patch 1 -p2 +%patch 0 -p1 -b .fix-vectorized-reduction-half %build -%cmake -d build - -# -DINCLUDE_INSTALL_DIR=include/eigen3 +%cmake -d build \ + -DINCLUDE_INSTALL_DIR=%{_includedir}/eigen3 %make -make doc - %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall -C build @@ -54,11 +49,13 @@ make doc %files devel %defattr(-,root,root) -%dir %{_includedir}/Eigen -%{_includedir}/Eigen/* -%dir %{_includedir}/unsupported/Eigen -%{_includedir}/unsupported/Eigen/* -%{_includedir}/signature_of_eigen3_matrix_library +%dir %{_includedir}/eigen3 +%dir %{_includedir}/eigen3/Eigen +%{_includedir}/eigen3/Eigen/* +%dir %{_includedir}/eigen3/unsupported +%dir %{_includedir}/eigen3/unsupported/Eigen +%{_includedir}/eigen3/unsupported/Eigen/* +%{_includedir}/eigen3/signature_of_eigen3_matrix_library %dir %{_datadir}/eigen3 %dir %{_datadir}/eigen3/cmake %{_datadir}/eigen3/cmake/*.cmake @@ -66,6 +63,9 @@ make doc %doc COPYING.* %changelog +* Thu Oct 31 2024 Silvan Calarco 3.4.0-2mamba +- install headers in default path /usr/include/eigen3 + * Mon Feb 26 2024 Silvan Calarco 3.4.0-1mamba - update to 3.4.0