Mercurial > octave
diff liboctave/dbleSCHUR.cc @ 3334:5187390bfde6
[project @ 1999-11-03 20:41:16 by jwe]
author | jwe |
---|---|
date | Wed, 03 Nov 1999 20:41:16 +0000 |
parents | 8b262e771614 |
children | d14c483b3c12 |
line wrap: on
line diff
--- a/liboctave/dbleSCHUR.cc Wed Nov 03 19:54:52 1999 +0000 +++ b/liboctave/dbleSCHUR.cc Wed Nov 03 20:41:16 1999 +0000 @@ -42,7 +42,7 @@ int&, double*, double*, double*, const int&, double&, double&, double*, const int&, int*, const int&, int*, - int&, long, long); + int&, long, long, long); } static int @@ -69,6 +69,9 @@ return -1; } + // Workspace requirements may need to be fixed if any of the + // following change. + char jobvs = 'V'; char sense = 'N'; char sort = 'N'; @@ -108,25 +111,17 @@ Array<double> work (lwork); double *pwork = work.fortran_vec (); - // These are not referenced for the non-ordered Schur routine. - - Array<int> bwork; - Array<int> iwork; + // BWORK is not referenced for the non-ordered Schur routine. + Array<int> bwork ((ord_char == 'N' || ord_char == 'n') ? 0 : n); + int *pbwork = bwork.fortran_vec (); - if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd') - { - bwork.resize (n); - iwork.resize (liwork); - } - - int *pbwork = bwork.fortran_vec (); + Array<int> iwork (liwork); int *piwork = iwork.fortran_vec (); - F77_XFCN (dgeesx, DGEESX, (&jobvs, &sort, selector, &sense, n, s, n, sdim, pwr, pwi, q, n, rconde, rcondv, pwork, lwork, piwork, liwork, pbwork, - info, 1L, 1L)); + info, 1L, 1L, 1L)); if (f77_exception_encountered) (*current_liboctave_error_handler) ("unrecoverable error in dgeesx");