From 28dde19e40a3d758faa94f0fc228857f7b3192ea Mon Sep 17 00:00:00 2001 From: Adolfo Rodriguez Tsouroukdissian Date: Wed, 21 Apr 2010 17:15:57 +0200 Subject: - Added problem size constructor to decompositions that did not have one. It preallocates member data structures. - Updated unit tests to check above constructor. - In the compute() method of decompositions: Made temporary matrices/vectors class members to avoid heap allocations during compute() (when dynamic matrices are used, of course). These changes can speed up decomposition computation time when a solver instance is used to solve multiple same-sized problems. An added benefit is that the compute() method can now be invoked in contexts were heap allocations are forbidden, such as in real-time control loops. CAVEAT: Not all of the decompositions in the Eigenvalues module have a heap-allocation-free compute() method. A future patch may address this issue, but some required API changes need to be incorporated first. --- test/qr_colpivoting.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/qr_colpivoting.cpp') diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp index 0ca897b52..a34feedd9 100644 --- a/test/qr_colpivoting.cpp +++ b/test/qr_colpivoting.cpp @@ -157,4 +157,7 @@ void test_qr_colpivoting() CALL_SUBTEST_2(qr_verify_assert()); CALL_SUBTEST_6(qr_verify_assert()); CALL_SUBTEST_3(qr_verify_assert()); + + // Test problem size constructors + CALL_SUBTEST_9(ColPivHouseholderQR(10, 20)); } -- cgit v1.2.3