aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/nomalloc.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-24 21:44:24 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-24 21:44:24 +0200
commit566867428c6134381c846d98ab86f9d2cc89a3c2 (patch)
tree89c8807654b80eb9a27d3e9286265a8b88377054 /test/nomalloc.cpp
parente039edcb422e3b5c6c0c06e1a5ba69a22695ebe8 (diff)
- add a low level mechanism to provide preallocated memory to gemm
- ensure static allocation for the product of "large" fixed size matrix
Diffstat (limited to 'test/nomalloc.cpp')
-rw-r--r--test/nomalloc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp
index f37dcd1b2..7d3b77e4e 100644
--- a/test/nomalloc.cpp
+++ b/test/nomalloc.cpp
@@ -100,9 +100,7 @@ void ctms_decompositions()
const Matrix A(Matrix::Random(size, size));
const ComplexMatrix complexA(ComplexMatrix::Random(size, size));
-// const Matrix saA = A.adjoint() * A; // NOTE: This product allocates on the stack. The two following lines are a kludgy workaround
- Matrix saA(Matrix::Constant(size, size, 1.0));
- saA.diagonal().setConstant(2.0);
+ const Matrix saA = A.adjoint() * A;
// Cholesky module
Eigen::LLT<Matrix> LLT; LLT.compute(A);