Compare commits

...

7 Commits

3 changed files with 86 additions and 25 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

@ -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,20 +1,19 @@
Name: eigen3
Version: 3.3.3
Release: 1mamba
Version: 3.4.0
Release: 2mamba
Summary: A C++ template library for linear algebra
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Davide Madrisan <davide.madrisan@gmail.com>
URL: http://eigen.tuxfamily.org
Source: http://bitbucket.org/eigen/eigen/get/%{version}.tar.bz2
Patch0: eigen3-3.2.10-fix-pkgconfig-includedir.patch
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
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.4.0-fix-vectorized-reduction-half.patch
License: LGPL, MPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: doxygen
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Eigen is a C++ template library for linear algebra: vectors, matrices, and related algorithms.
@ -27,25 +26,22 @@ Provides: eigen-devel = %{?epoch:%epoch:}%{version}-%{release}
%description devel
Eigen is a C++ template library for linear algebra: vectors, matrices, and related algorithms.
This package contains static libraries and header files need for development.
This package contains static libraries and header files needed for development.
#% debug_package
%prep
%setup -q -c
mv eigen-* eigen
%patch0 -p1
%setup -q -n eigen-%{version}
%patch 0 -p1 -b .fix-vectorized-reduction-half
%build
cd eigen
%cmake -d build \
-DINCLUDE_INSTALL_DIR=%{_includedir}/eigen3
%make
cd ..
make doc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd eigen
%makeinstall -C build
%clean
@ -53,14 +49,41 @@ cd eigen
%files devel
%defattr(-,root,root)
%{_includedir}/eigen3/
%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
%{_datadir}/pkgconfig/eigen3.pc
%doc eigen/COPYING.*
%doc COPYING.*
%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
- update to 3.4.0
* Wed Dec 12 2018 Automatic Build System <autodist@mambasoft.it> 3.3.7-1mamba
- automatic version update by autodist
* Mon Dec 10 2018 Automatic Build System <autodist@mambasoft.it> 3.3.6-1mamba
- automatic version update by autodist
* Wed Aug 22 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.5-2mamba
- disable including unsupported DGMRES.h header causing kde step build fail
* Tue Jul 24 2018 Automatic Build System <autodist@mambasoft.it> 3.3.5-1mamba
- automatic version update by autodist
* Thu Jun 15 2017 Automatic Build System <autodist@mambasoft.it> 3.3.4-1mamba
- automatic version update by autodist
* Fri Feb 24 2017 Automatic Build System <autodist@mambasoft.it> 3.3.3-1mamba
- automatic version update by autodist