Mercurial > hg > octave-terminal
changeset 10779:add87b12e63c
implement proper CGELSD/ZGELSD RWORK size formulas, as found in lapack SVN
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 09 Jul 2010 14:12:59 +0200 |
parents | 6035bf68a755 |
children | 6e7590d003dc |
files | liboctave/CMatrix.cc liboctave/ChangeLog liboctave/fCMatrix.cc |
diffstat | 3 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -2646,10 +2646,9 @@ if (nlvl < 0) nlvl = 0; - nlvl += 1; // FIXME: workaround for bug in LAPACK 3.1.1 - octave_idx_type lrwork = minmn*(10 + 2*smlsiz + 8*nlvl) - + 3*smlsiz*nrhs + (smlsiz+1)*(smlsiz+1); + + 3*smlsiz*nrhs + std::max ((smlsiz+1)*(smlsiz+1), + n*(1+nrhs) + 2*nrhs); if (lrwork < 1) lrwork = 1; Array<double> rwork (lrwork, 1);
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2010-07-09 Jaroslav Hajek <highegg@gmail.com> + + * CMatrix.cc (ComplexMatrix::lssolve (const ComplexMatrix&)): + Undo 10708:2786b7ae3f80, implement proper correction. + * fCMatrix.cc (FloatComplexMatrix::lssolve (const FloatComplexMatrix&)): + Ditto. + 2010-06-28 Jaroslav Hajek <highegg@gmail.com> * dim-vector.h (dim_vector::scalar_1x1): New method.
--- a/liboctave/fCMatrix.cc +++ b/liboctave/fCMatrix.cc @@ -2639,10 +2639,9 @@ if (nlvl < 0) nlvl = 0; - nlvl += 1; // FIXME: workaround for bug in LAPACK 3.1.1 - octave_idx_type lrwork = minmn*(10 + 2*smlsiz + 8*nlvl) - + 3*smlsiz*nrhs + (smlsiz+1)*(smlsiz+1); + + 3*smlsiz*nrhs + std::max ((smlsiz+1)*(smlsiz+1), + n*(1+nrhs) + 2*nrhs); if (lrwork < 1) lrwork = 1; Array<float> rwork (lrwork, 1);