aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/Core/products/TriangularMatrixVector.h2
-rw-r--r--test/nomalloc.cpp2
-rw-r--r--test/product.h6
3 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/products/TriangularMatrixVector.h b/Eigen/src/Core/products/TriangularMatrixVector.h
index 291177445..fc3188cd8 100644
--- a/Eigen/src/Core/products/TriangularMatrixVector.h
+++ b/Eigen/src/Core/products/TriangularMatrixVector.h
@@ -95,7 +95,7 @@ struct ei_product_triangular_vector_selector<Lhs,Rhs,Result,Mode,ConjLhs,ConjRhs
int s = IsLowerTriangular ? pi : (HasUnitDiag ? i+1 : i);
int r = IsLowerTriangular ? k+1 : actualPanelWidth-k;
if ((!HasUnitDiag) || (--r)>0)
- res.coeffRef(i) += alpha * (cjLhs.row(i).segment(s,r).cwise() * cjRhs.segment(s,r).transpose()).sum();
+ res.coeffRef(i) += alpha * (cjLhs.row(i).segment(s,r).cwiseProduct(cjRhs.segment(s,r).transpose())).sum();
if (HasUnitDiag)
res.coeffRef(i) += alpha * cjRhs.coeff(i);
}
diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp
index 1a917192b..12b09efa2 100644
--- a/test/nomalloc.cpp
+++ b/test/nomalloc.cpp
@@ -64,7 +64,7 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2);
VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));
- VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.cwise() * m1);
+ VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.array()*m1);
if (MatrixType::RowsAtCompileTime<EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD) {
// If the matrices are too large, we have better to use the optimized GEMM
// routines which allocates temporaries. However, on some platforms
diff --git a/test/product.h b/test/product.h
index 40773ad90..1dcc636e3 100644
--- a/test/product.h
+++ b/test/product.h
@@ -15,7 +15,7 @@
//
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
+// FOR A PARTICULAR PURPOSE.f See the GNU Lesser General Public License or the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
@@ -29,8 +29,8 @@
template<typename Derived1, typename Derived2>
bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = precision<typename Derived1::RealScalar>())
{
- return !((m1-m2).cwise().abs2().maxCoeff() < epsilon * epsilon
- * std::max(m1.cwise().abs2().maxCoeff(), m2.cwise().abs2().maxCoeff()));
+ return !((m1-m2).cwiseAbs2().maxCoeff() < epsilon * epsilon
+ * std::max(m1.cwiseAbs2().maxCoeff(), m2.cwiseAbs2().maxCoeff()));
}
template<typename MatrixType> void product(const MatrixType& m)