diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-08-06 12:20:02 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-08-06 12:20:02 +0200 |
commit | 56d00779db6975fea0821a71abf6323f98a1f4c0 (patch) | |
tree | 2e49e38c08bc6be41702a21b0987cd0b0c49e8fe /test | |
parent | 6b2ab13ac54aff7ff15046d05b3f060a3f1f2044 (diff) |
more product refactoring
Diffstat (limited to 'test')
-rw-r--r-- | test/geo_transformations.cpp | 1 | ||||
-rw-r--r-- | test/nomalloc.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/geo_transformations.cpp b/test/geo_transformations.cpp index a4f75e384..914dbaf74 100644 --- a/test/geo_transformations.cpp +++ b/test/geo_transformations.cpp @@ -148,7 +148,6 @@ template<typename Scalar, int Mode> void transformations(void) Transform3 tmat3(mat3), tmat4(mat4); if(Mode!=int(AffineCompact)) tmat4.matrix()(3,3) = Scalar(1); - std::cerr << tmat3.matrix() << "\n\n" << tmat4.matrix() << "\n\n"; VERIFY_IS_APPROX(tmat3.matrix(), tmat4.matrix()); Scalar a3 = ei_random<Scalar>(-Scalar(M_PI), Scalar(M_PI)); diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp index ee14ae07b..a96bb23da 100644 --- a/test/nomalloc.cpp +++ b/test/nomalloc.cpp @@ -65,7 +65,12 @@ 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*m1.transpose())*m2, m1*(m1.transpose()*m2)); + 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 + // these temporaries are allocated on the stack using alloca. + VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); + } } void test_nomalloc() |