eigen3/eigen3_logp.patch
DistroBaker cbf51d37bc Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/eigen3.git#c3963e2383405e51d9264c59cefa4fb84bfe7147
2021-01-19 12:30:41 +00:00

28 lines
936 B
Diff

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