Backport fix for conflicting declarations of log1p
This commit is contained in:
parent
4b109fe7a8
commit
c3963e2383
@ -18,13 +18,17 @@
|
||||
|
||||
Name: eigen3
|
||||
Version: 3.3.9
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A lightweight C++ template library for vector and matrix math
|
||||
|
||||
License: MPLv2.0 and LGPLv2+ and BSD
|
||||
URL: http://eigen.tuxfamily.org/index.php?title=Main_Page
|
||||
Source0: https://gitlab.com/libeigen/eigen/-/archive/%{version}/eigen-%{version}.tar.bz2
|
||||
|
||||
# Backport fix for conflicting declarations of log1p
|
||||
# https://gitlab.com/libeigen/eigen/-/commit/d55d392e7b1136655b4223bea8e99cb2fe0a8afd.patch
|
||||
Patch0: eigen3_logp.patch
|
||||
|
||||
BuildRequires: %{blaslib}-devel
|
||||
BuildRequires: fftw-devel
|
||||
BuildRequires: glew-devel
|
||||
@ -112,6 +116,9 @@ rm -f %{_vpath_builddir}/doc/html/unsupported/installdox
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 19 2021 Sandro Mani <manisandro@gmail.com> - 3.3.9-2
|
||||
- Backport fix for conflicting declarations of log1p
|
||||
|
||||
* Sun Dec 06 2020 Sandro Mani <manisandro@gmail.com> - 3.3.9-1
|
||||
- Update to 3.3.9
|
||||
|
||||
|
27
eigen3_logp.patch
Normal file
27
eigen3_logp.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -rupN --no-dereference eigen-3.3.9/Eigen/src/Core/MathFunctions.h eigen-3.3.9-new/Eigen/src/Core/MathFunctions.h
|
||||
--- eigen-3.3.9/Eigen/src/Core/MathFunctions.h 2020-12-04 22:53:41.000000000 +0100
|
||||
+++ eigen-3.3.9-new/Eigen/src/Core/MathFunctions.h 2021-01-19 12:32:05.328624222 +0100
|
||||
@@ -485,12 +485,22 @@ struct log1p_impl {
|
||||
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)
|
||||
#if EIGEN_HAS_CXX11_MATH
|
||||
using std::log1p;
|
||||
- #endif
|
||||
+ #else
|
||||
using std_fallback::log1p;
|
||||
+ #endif
|
||||
return log1p(x);
|
||||
}
|
||||
};
|
||||
|
||||
+// Specialization for complex types that are not supported by std::log1p.
|
||||
+template <typename RealScalar>
|
||||
+struct log1p_impl<std::complex<RealScalar> > {
|
||||
+ EIGEN_DEVICE_FUNC static inline std::complex<RealScalar> run(
|
||||
+ const std::complex<RealScalar>& x) {
|
||||
+ EIGEN_STATIC_ASSERT_NON_INTEGER(RealScalar)
|
||||
+ return std_fallback::log1p(x);
|
||||
+ }
|
||||
+};
|
||||
|
||||
template<typename Scalar>
|
||||
struct log1p_retval
|
Loading…
Reference in New Issue
Block a user