From 566867428c6134381c846d98ab86f9d2cc89a3c2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 24 Jun 2010 21:44:24 +0200 Subject: - add a low level mechanism to provide preallocated memory to gemm - ensure static allocation for the product of "large" fixed size matrix --- test/nomalloc.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/nomalloc.cpp') 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 LLT; LLT.compute(A); -- cgit v1.2.3