diff liboctave/dMatrix.cc @ 7532:493bb0de3199

avoid another xGELSD workspace query bug
author John W. Eaton <jwe@octave.org>
date Tue, 26 Feb 2008 02:47:56 -0500
parents 8c32f95c2639
children f9983d2761df
line wrap: on
line diff
--- a/liboctave/dMatrix.cc	Tue Feb 26 02:16:32 2008 -0500
+++ b/liboctave/dMatrix.cc	Tue Feb 26 02:47:56 2008 -0500
@@ -2095,6 +2095,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;
+	}
 
       lwork = static_cast<octave_idx_type> (work(0));
       work.resize (lwork);