[eigen3] 02/04: Fix compilation in check_for_aliasing. (Closes: #835411)
Anton Gladky
gladk at moszumanska.debian.org
Sat Sep 3 20:18:13 UTC 2016
This is an automated email from the git hooks/post-receive script.
gladk pushed a commit to branch master
in repository eigen3.
commit c5cb3dffed2ff990e6843719be2d016bf8a8413d
Author: Gael Guennebaud <g.gael at free.fr>
Date: Sat Sep 3 22:10:17 2016 +0200
Fix compilation in check_for_aliasing. (Closes: #835411)
---
debian/patches/10_grammer_tweak.patch | 34 ---------------
.../20_fix_FTBFS_in_check_for_aliasing.patch | 50 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 51 insertions(+), 34 deletions(-)
diff --git a/debian/patches/10_grammer_tweak.patch b/debian/patches/10_grammer_tweak.patch
deleted file mode 100644
index 8bb9682..0000000
--- a/debian/patches/10_grammer_tweak.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Michael R. Crusoe <crusoe at ucdavis.edu>
-Description: Correct grammer error found by lintian which can leak into other
-projects.
---- eigen3.orig/Eigen/src/Core/DenseBase.h
-+++ eigen3/Eigen/src/Core/DenseBase.h
-@@ -246,7 +246,7 @@
- {
- EIGEN_ONLY_USED_FOR_DEBUG(newSize);
- eigen_assert(newSize == this->size()
-- && "DenseBase::resize() does not actually allow to resize.");
-+ && "DenseBase::resize() does not actually allow one to resize.");
- }
- /** Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are
- * Matrix::resize() and Array::resize(). The present method only asserts that the new size equals the old size, and does
-@@ -258,7 +258,7 @@
- EIGEN_ONLY_USED_FOR_DEBUG(rows);
- EIGEN_ONLY_USED_FOR_DEBUG(cols);
- eigen_assert(rows == this->rows() && cols == this->cols()
-- && "DenseBase::resize() does not actually allow to resize.");
-+ && "DenseBase::resize() does not actually allow one to resize.");
- }
-
- #ifndef EIGEN_PARSED_BY_DOXYGEN
---- eigen3.orig/Eigen/src/SparseCore/SparseSelfAdjointView.h
-+++ eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h
-@@ -153,7 +153,7 @@
- EIGEN_ONLY_USED_FOR_DEBUG(rows);
- EIGEN_ONLY_USED_FOR_DEBUG(cols);
- eigen_assert(rows == this->rows() && cols == this->cols()
-- && "SparseSelfadjointView::resize() does not actually allow to resize.");
-+ && "SparseSelfadjointView::resize() does not actually allow one to resize.");
- }
-
- protected:
diff --git a/debian/patches/20_fix_FTBFS_in_check_for_aliasing.patch b/debian/patches/20_fix_FTBFS_in_check_for_aliasing.patch
new file mode 100644
index 0000000..0bceccf
--- /dev/null
+++ b/debian/patches/20_fix_FTBFS_in_check_for_aliasing.patch
@@ -0,0 +1,50 @@
+# HG changeset patch
+# User Gael Guennebaud <g.gael at free.fr>
+# Date 1471961950 -7200
+# Node ID a89a95507d613a28da1a4180cb7fb4a77cee4a55
+# Parent 947d8ade3b0f94058f8fc30e609945f7018715d0
+Fix compilation in check_for_aliasing due to ambiguous specializations
+
+Index: eigen3/Eigen/src/Core/util/BlasUtil.h
+===================================================================
+--- eigen3.orig/Eigen/src/Core/util/BlasUtil.h
++++ eigen3/Eigen/src/Core/util/BlasUtil.h
+@@ -315,6 +315,11 @@ struct blas_traits<CwiseBinaryOp<scalar_
+ static inline Scalar extractScalarFactor(const XprType& x)
+ { return Base::extractScalarFactor(x.lhs()) * x.rhs().functor().m_other; }
+ };
++template<typename Scalar, typename Plain1, typename Plain2>
++struct blas_traits<CwiseBinaryOp<scalar_product_op<Scalar>, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1>,
++ const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain2> > >
++ : blas_traits<CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1> >
++{};
+
+ // pop opposite
+ template<typename Scalar, typename NestedXpr>
+Index: eigen3/test/adjoint.cpp
+===================================================================
+--- eigen3.orig/test/adjoint.cpp
++++ eigen3/test/adjoint.cpp
+@@ -169,7 +169,7 @@ void test_adjoint()
+ // test a large static matrix only once
+ CALL_SUBTEST_7( adjoint(Matrix<float, 100, 100>()) );
+
+-#ifdef EIGEN_TEST_PART_4
++#ifdef EIGEN_TEST_PART_13
+ {
+ MatrixXcf a(10,10), b(10,10);
+ VERIFY_RAISES_ASSERT(a = a.transpose());
+@@ -187,6 +187,13 @@ void test_adjoint()
+ a.transpose() = a.adjoint();
+ a.transpose() += a.adjoint();
+ a.transpose() += a.adjoint() + b;
++
++ // regression tests for check_for_aliasing
++ MatrixXd c(10,10);
++ c = 1.0 * MatrixXd::Ones(10,10) + c;
++ c = MatrixXd::Ones(10,10) * 1.0 + c;
++ c = c + MatrixXd::Ones(10,10) .cwiseProduct( MatrixXd::Zero(10,10) );
++ c = MatrixXd::Ones(10,10) * MatrixXd::Zero(10,10);
+ }
+ #endif
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 170ae42..6ce9c03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
08_fix_path_FindEigen3.patch
10_vectorization.patch
12_grammer_tweak.patch
+20_fix_FTBFS_in_check_for_aliasing.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/eigen3.git
More information about the debian-science-commits
mailing list