# HG changeset patch # User jwe # Date 941661676 0 # Node ID 5187390bfde6409fa16f4f519ae6f57bae7ad5a4 # Parent 15cddaacbc2d734004ebd52201d693233fce6025 [project @ 1999-11-03 20:41:16 by jwe] diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,11 @@ +1999-11-03 John W. Eaton + + * dbleSCHUR.cc (SCHUR::init): IWORK is always referenced by dgeesx. + Don't forget to pass length of third string argument to dgeesx. + + * CmplxSCHUR.cc (ComplexSCHUR::init): Don't forget to pass length + of third string argument to zgeesx. + 1999-11-02 John W. Eaton * DiagArray2.cc (DiagArray2::operator () (int, int)): diff --git a/liboctave/CmplxSCHUR.cc b/liboctave/CmplxSCHUR.cc --- a/liboctave/CmplxSCHUR.cc +++ b/liboctave/CmplxSCHUR.cc @@ -40,7 +40,7 @@ const int&, int&, Complex*, Complex*, const int&, double&, double&, Complex*, const int&, double*, int*, - int&, long, long); + int&, long, long, long); } static int @@ -68,6 +68,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'; @@ -106,18 +109,13 @@ Array work (lwork); Complex *pwork = work.fortran_vec (); - // bwork is not referenced for non-ordered Schur. - - Array bwork; - - if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd') - bwork.resize (n); - + // BWORK is not referenced for non-ordered Schur. + Array bwork ((ord_char == 'N' || ord_char == 'n') ? 0 : n); int *pbwork = bwork.fortran_vec (); F77_XFCN (zgeesx, ZGEESX, (&jobvs, &sort, selector, &sense, n, s, n, sdim, pw, q, n, rconde, rcondv, pwork, - lwork, prwork, pbwork, info, 1L, 1L)); + lwork, prwork, pbwork, info, 1L, 1L, 1L)); if (f77_exception_encountered) (*current_liboctave_error_handler) ("unrecoverable error in zgeesx"); diff --git a/liboctave/dbleSCHUR.cc b/liboctave/dbleSCHUR.cc --- a/liboctave/dbleSCHUR.cc +++ b/liboctave/dbleSCHUR.cc @@ -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 work (lwork); double *pwork = work.fortran_vec (); - // These are not referenced for the non-ordered Schur routine. - - Array bwork; - Array iwork; + // BWORK is not referenced for the non-ordered Schur routine. + Array 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 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");