aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-12-10 22:15:22 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-12-10 22:15:22 +0100
commit9facdaf7b9fa65d7f669af0bfabd34e23698f446 (patch)
tree13151c4dcc9e4be6de01a7c539fd4d6a180d0d97 /test
parent7caf751fddf51aacb1a2fbea8f2a92bd3492b0e1 (diff)
some compilation fixes
Diffstat (limited to 'test')
-rw-r--r--test/nomalloc.cpp2
-rw-r--r--test/product.h6
2 files changed, 4 insertions, 4 deletions
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)