aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/nomalloc.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-08-06 12:20:02 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-08-06 12:20:02 +0200
commit56d00779db6975fea0821a71abf6323f98a1f4c0 (patch)
tree2e49e38c08bc6be41702a21b0987cd0b0c49e8fe /test/nomalloc.cpp
parent6b2ab13ac54aff7ff15046d05b3f060a3f1f2044 (diff)
more product refactoring
Diffstat (limited to 'test/nomalloc.cpp')
-rw-r--r--test/nomalloc.cpp7
1 files changed, 6 insertions, 1 deletions
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()