install headers in default path /usr/include/eigen3 [release 3.4.0-2mamba;Thu Oct 31 2024]

This commit is contained in:
Silvan Calarco 2024-11-01 11:18:18 +01:00
parent c4643dca04
commit ad5d1029f8
4 changed files with 61 additions and 35 deletions

View File

@ -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@

View File

@ -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"

View File

@ -0,0 +1,46 @@
From d0e3791b1a0e2db9edd5f1d1befdb2ac5a40efe0 Mon Sep 17 00:00:00 2001
From: Alex Druinsky <adruinsky@google.com>
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<Eigen::half, 3, 1>::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<typename PacketType,typename Func>
EIGEN_DEVICE_FUNC
-PacketType packetwise_redux_empty_value(const Func& ) { return pset1<PacketType>(0); }
+PacketType packetwise_redux_empty_value(const Func& ) {
+ const typename unpacket_traits<PacketType>::type zero(0);
+ return pset1<PacketType>(zero);
+}
/* For products the default is 1 */
template<typename PacketType,typename Scalar>
EIGEN_DEVICE_FUNC
-PacketType packetwise_redux_empty_value(const scalar_product_op<Scalar,Scalar>& ) { return pset1<PacketType>(1); }
+PacketType packetwise_redux_empty_value(const scalar_product_op<Scalar,Scalar>& ) {
+ return pset1<PacketType>(Scalar(1));
+}
/* Perform the actual reduction */
template<typename Func, typename Evaluator,
--
GitLab

View File

@ -1,6 +1,6 @@
Name: eigen3 Name: eigen3
Version: 3.4.0 Version: 3.4.0
Release: 1mamba Release: 2mamba
Summary: A C++ template library for linear algebra Summary: A C++ template library for linear algebra
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -8,8 +8,7 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://eigen.tuxfamily.org/index.php?title=Main_Page URL: https://eigen.tuxfamily.org/index.php?title=Main_Page
Source: https://gitlab.com/libeigen/eigen.git/%{version}/eigen-%{version}.tar.bz2 Source: https://gitlab.com/libeigen/eigen.git/%{version}/eigen-%{version}.tar.bz2
Patch0: eigen3-3.2.10-fix-pkgconfig-includedir.patch Patch0: eigen3-3.4.0-fix-vectorized-reduction-half.patch
Patch1: eigen3-3.3.5-disable-DGMRES.patch
License: LGPL, MPL License: LGPL, MPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
@ -33,18 +32,14 @@ This package contains static libraries and header files needed for development.
%prep %prep
%setup -q -n eigen-%{version} %setup -q -n eigen-%{version}
#% patch 0 -p2 %patch 0 -p1 -b .fix-vectorized-reduction-half
#% patch 1 -p2
%build %build
%cmake -d build %cmake -d build \
-DINCLUDE_INSTALL_DIR=%{_includedir}/eigen3
# -DINCLUDE_INSTALL_DIR=include/eigen3
%make %make
make doc
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build %makeinstall -C build
@ -54,11 +49,13 @@ make doc
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/Eigen %dir %{_includedir}/eigen3
%{_includedir}/Eigen/* %dir %{_includedir}/eigen3/Eigen
%dir %{_includedir}/unsupported/Eigen %{_includedir}/eigen3/Eigen/*
%{_includedir}/unsupported/Eigen/* %dir %{_includedir}/eigen3/unsupported
%{_includedir}/signature_of_eigen3_matrix_library %dir %{_includedir}/eigen3/unsupported/Eigen
%{_includedir}/eigen3/unsupported/Eigen/*
%{_includedir}/eigen3/signature_of_eigen3_matrix_library
%dir %{_datadir}/eigen3 %dir %{_datadir}/eigen3
%dir %{_datadir}/eigen3/cmake %dir %{_datadir}/eigen3/cmake
%{_datadir}/eigen3/cmake/*.cmake %{_datadir}/eigen3/cmake/*.cmake
@ -66,6 +63,9 @@ make doc
%doc COPYING.* %doc COPYING.*
%changelog %changelog
* Thu Oct 31 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-2mamba
- install headers in default path /usr/include/eigen3
* Mon Feb 26 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-1mamba * Mon Feb 26 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-1mamba
- update to 3.4.0 - update to 3.4.0