Mercurial > hg > octave-terminal
changeset 11661:ef2b2df1ed9a release-3-0-x
avoid another xGELSD workspace query bug
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2008 02:51:32 -0500 |
parents | 6adc43cce4c6 |
children | a4d0680f4dda |
files | liboctave/CMatrix.cc liboctave/ChangeLog liboctave/dMatrix.cc |
diffstat | 3 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -2567,6 +2567,13 @@ if (std::real (work(0)) < lworkaround) work(0) = lworkaround; } + else if (m >= n) + { + octave_idx_type lworkaround = 2*m + m*nrhs; + + if (std::real (work(0)) < lworkaround) + work(0) = lworkaround; + } if (f77_exception_encountered) (*current_liboctave_error_handler)
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2008-02-26 John W. Eaton <jwe@octave.org> + + * dMatrix.cc (Matrix::lssolve): Avoid another dgelsd lwork query bug. + * CMatrix.cc (ComplexMatrix::lssolve): Likewise, for zgelsd + 2008-02-15 John W. Eaton <jwe@octave.org> * dMatrix.cc (Matrix::lssolve): Check n > mnthr, not n > m when
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -2176,6 +2176,14 @@ if (work(0) < lworkaround) work(0) = lworkaround; } + else if (m >= n) + { + octave_idx_type lworkaround + = 12*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + (smlsiz+1)*(smlsiz+1); + + if (work(0) < lworkaround) + work(0) = lworkaround; + } if (f77_exception_encountered) (*current_liboctave_error_handler)