# HG changeset patch # User Jaroslav Hajek # Date 1279785243 -7200 # Node ID 2c2d4a2f104716a536804b6ce11e72fc175809ce # Parent 5b68000faac16c1ab66402dd832de933d77275dd fix workspace bug workaround for xGELSD (since 7486:6a6d2abe51ff) diff --git a/liboctave/CMatrix.cc b/liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -2653,7 +2653,7 @@ // through 3.1.1 when n >= mnthr. The obtuse formula below // should provide sufficient workspace for ZGELSD to operate // efficiently. - if (n >= mnthr) + if (n > m && n >= mnthr) { octave_idx_type addend = m; diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2010-07-22 Jaroslav Hajek + + * dMatrix.cc (Matrix::lssolve): Fix decision test for workaround. + * fMatrix.cc (FloatMatrix::lssolve): Ditto. + * CMatrix.cc (ComplexMatrix::lssolve): Ditto. + * fCMatrix.cc (FloatComplexMatrix::lssolve): Ditto. + 2010-07-20 Jaroslav Hajek * dim-vector.cc (dim_vector::dim_max): New static const member. diff --git a/liboctave/dMatrix.cc b/liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -2294,7 +2294,7 @@ // through 3.1.1 when n >= mnthr. The obtuse formula below // should provide sufficient workspace for DGELSD to operate // efficiently. - if (n >= mnthr) + if (n > m && n >= mnthr) { const octave_idx_type wlalsd = 9*m + 2*m*smlsiz + 8*m*nlvl + m*nrhs + (smlsiz+1)*(smlsiz+1); diff --git a/liboctave/fCMatrix.cc b/liboctave/fCMatrix.cc --- a/liboctave/fCMatrix.cc +++ b/liboctave/fCMatrix.cc @@ -2646,7 +2646,7 @@ // through 3.1.1 when n >= mnthr. The obtuse formula below // should provide sufficient workspace for ZGELSD to operate // efficiently. - if (n >= mnthr) + if (n > m && n >= mnthr) { octave_idx_type addend = m; diff --git a/liboctave/fMatrix.cc b/liboctave/fMatrix.cc --- a/liboctave/fMatrix.cc +++ b/liboctave/fMatrix.cc @@ -2293,7 +2293,7 @@ // through 3.1.1 when n >= mnthr. The obtuse formula below // should provide sufficient workspace for DGELSD to operate // efficiently. - if (n >= mnthr) + if (n > m && n >= mnthr) { const octave_idx_type wlalsd = 9*m + 2*m*smlsiz + 8*m*nlvl + m*nrhs + (smlsiz+1)*(smlsiz+1);