/specs/lapack/lapack-20010525.patch
Patch | 12261 lines | 12261 code | 0 blank | 0 comment | 0 complexity | cd0e9eb45b508c610a2f84b421ec52a7 MD5 | raw file
Possible License(s): CC0-1.0, AGPL-3.0, GPL-2.0
Large files files are truncated, but you can click here to view the full file
- diff -uNr LAPACK.orig/BLAS/TESTING/cblat2.f LAPACK/BLAS/TESTING/cblat2.f
- --- LAPACK.orig/BLAS/TESTING/cblat2.f Thu Nov 4 14:23:26 1999
- +++ LAPACK/BLAS/TESTING/cblat2.f Fri May 25 15:57:46 2001
- @@ -64,6 +64,10 @@
- * Richard Hanson, Sandia National Labs.
- * Jeremy Du Croz, NAG Central Office.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- @@ -126,7 +130,7 @@
- *
- READ( NIN, FMT = * )SUMMRY
- READ( NIN, FMT = * )NOUT
- - OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
- + OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )
- NOUTC = NOUT
- *
- * Read name and unit number for snapshot output file and open file.
- @@ -135,7 +139,7 @@
- READ( NIN, FMT = * )NTRA
- TRACE = NTRA.GE.0
- IF( TRACE )THEN
- - OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
- + OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )
- END IF
- * Read the flag that directs rewinding of the snapshot file.
- READ( NIN, FMT = * )REWI
- diff -uNr LAPACK.orig/BLAS/TESTING/cblat3.f LAPACK/BLAS/TESTING/cblat3.f
- --- LAPACK.orig/BLAS/TESTING/cblat3.f Thu Nov 4 14:23:26 1999
- +++ LAPACK/BLAS/TESTING/cblat3.f Fri May 25 15:58:08 2001
- @@ -46,6 +46,10 @@
- * Jeremy Du Croz, Numerical Algorithms Group Ltd.
- * Sven Hammarling, Numerical Algorithms Group Ltd.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- diff -uNr LAPACK.orig/BLAS/TESTING/dblat2.f LAPACK/BLAS/TESTING/dblat2.f
- --- LAPACK.orig/BLAS/TESTING/dblat2.f Thu Nov 4 14:23:27 1999
- +++ LAPACK/BLAS/TESTING/dblat2.f Fri May 25 15:57:41 2001
- @@ -63,6 +63,10 @@
- * Richard Hanson, Sandia National Labs.
- * Jeremy Du Croz, NAG Central Office.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- @@ -121,7 +125,7 @@
- *
- READ( NIN, FMT = * )SUMMRY
- READ( NIN, FMT = * )NOUT
- - OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
- + OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )
- NOUTC = NOUT
- *
- * Read name and unit number for snapshot output file and open file.
- @@ -130,7 +134,7 @@
- READ( NIN, FMT = * )NTRA
- TRACE = NTRA.GE.0
- IF( TRACE )THEN
- - OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
- + OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )
- END IF
- * Read the flag that directs rewinding of the snapshot file.
- READ( NIN, FMT = * )REWI
- diff -uNr LAPACK.orig/BLAS/TESTING/dblat3.f LAPACK/BLAS/TESTING/dblat3.f
- --- LAPACK.orig/BLAS/TESTING/dblat3.f Thu Nov 4 14:23:27 1999
- +++ LAPACK/BLAS/TESTING/dblat3.f Fri May 25 15:58:04 2001
- @@ -43,6 +43,10 @@
- * Jeremy Du Croz, Numerical Algorithms Group Ltd.
- * Sven Hammarling, Numerical Algorithms Group Ltd.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- @@ -96,7 +100,7 @@
- *
- READ( NIN, FMT = * )SUMMRY
- READ( NIN, FMT = * )NOUT
- - OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
- + OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )
- NOUTC = NOUT
- *
- * Read name and unit number for snapshot output file and open file.
- @@ -105,7 +109,7 @@
- READ( NIN, FMT = * )NTRA
- TRACE = NTRA.GE.0
- IF( TRACE )THEN
- - OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
- + OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )
- END IF
- * Read the flag that directs rewinding of the snapshot file.
- READ( NIN, FMT = * )REWI
- diff -uNr LAPACK.orig/BLAS/TESTING/sblat2.f LAPACK/BLAS/TESTING/sblat2.f
- --- LAPACK.orig/BLAS/TESTING/sblat2.f Thu Nov 4 14:23:26 1999
- +++ LAPACK/BLAS/TESTING/sblat2.f Fri May 25 15:57:34 2001
- @@ -63,6 +63,10 @@
- * Richard Hanson, Sandia National Labs.
- * Jeremy Du Croz, NAG Central Office.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- @@ -121,7 +125,7 @@
- *
- READ( NIN, FMT = * )SUMMRY
- READ( NIN, FMT = * )NOUT
- - OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
- + OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )
- NOUTC = NOUT
- *
- * Read name and unit number for snapshot output file and open file.
- @@ -130,7 +134,7 @@
- READ( NIN, FMT = * )NTRA
- TRACE = NTRA.GE.0
- IF( TRACE )THEN
- - OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
- + OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )
- END IF
- * Read the flag that directs rewinding of the snapshot file.
- READ( NIN, FMT = * )REWI
- diff -uNr LAPACK.orig/BLAS/TESTING/sblat3.f LAPACK/BLAS/TESTING/sblat3.f
- --- LAPACK.orig/BLAS/TESTING/sblat3.f Thu Nov 4 14:23:26 1999
- +++ LAPACK/BLAS/TESTING/sblat3.f Fri May 25 15:58:00 2001
- @@ -43,6 +43,10 @@
- * Jeremy Du Croz, Numerical Algorithms Group Ltd.
- * Sven Hammarling, Numerical Algorithms Group Ltd.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- diff -uNr LAPACK.orig/BLAS/TESTING/zblat2.f LAPACK/BLAS/TESTING/zblat2.f
- --- LAPACK.orig/BLAS/TESTING/zblat2.f Thu Nov 4 14:23:27 1999
- +++ LAPACK/BLAS/TESTING/zblat2.f Fri May 25 15:57:52 2001
- @@ -64,6 +64,10 @@
- * Richard Hanson, Sandia National Labs.
- * Jeremy Du Croz, NAG Central Office.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- @@ -127,7 +131,7 @@
- *
- READ( NIN, FMT = * )SUMMRY
- READ( NIN, FMT = * )NOUT
- - OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
- + OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )
- NOUTC = NOUT
- *
- * Read name and unit number for snapshot output file and open file.
- @@ -136,7 +140,7 @@
- READ( NIN, FMT = * )NTRA
- TRACE = NTRA.GE.0
- IF( TRACE )THEN
- - OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
- + OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )
- END IF
- * Read the flag that directs rewinding of the snapshot file.
- READ( NIN, FMT = * )REWI
- diff -uNr LAPACK.orig/BLAS/TESTING/zblat3.f LAPACK/BLAS/TESTING/zblat3.f
- --- LAPACK.orig/BLAS/TESTING/zblat3.f Thu Nov 4 14:23:27 1999
- +++ LAPACK/BLAS/TESTING/zblat3.f Fri May 25 15:58:16 2001
- @@ -46,6 +46,10 @@
- * Jeremy Du Croz, Numerical Algorithms Group Ltd.
- * Sven Hammarling, Numerical Algorithms Group Ltd.
- *
- +* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
- +* can be run multiple times without deleting generated
- +* output files (susan)
- +*
- * .. Parameters ..
- INTEGER NIN
- PARAMETER ( NIN = 5 )
- @@ -104,7 +108,7 @@
- *
- READ( NIN, FMT = * )SUMMRY
- READ( NIN, FMT = * )NOUT
- - OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
- + OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )
- NOUTC = NOUT
- *
- * Read name and unit number for snapshot output file and open file.
- @@ -113,7 +117,7 @@
- READ( NIN, FMT = * )NTRA
- TRACE = NTRA.GE.0
- IF( TRACE )THEN
- - OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
- + OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )
- END IF
- * Read the flag that directs rewinding of the snapshot file.
- READ( NIN, FMT = * )REWI
- @@ -1962,6 +1966,7 @@
- * 3-19-92: Initialize ALPHA, BETA, RALPHA, and RBETA (eca)
- * 3-19-92: Fix argument 12 in calls to ZSYMM and ZHEMM
- * with INFOT = 9 (eca)
- +* 10-9-00: Declared INTRINSIC DCMPLX (susan)
- *
- * .. Scalar Arguments ..
- INTEGER ISNUM, NOUT
- @@ -1980,6 +1985,8 @@
- * .. External Subroutines ..
- EXTERNAL ZGEMM, ZHEMM, ZHER2K, ZHERK, CHKXER, ZSYMM,
- $ ZSYR2K, ZSYRK, ZTRMM, ZTRSM
- +* .. Intrinsic Functions ..
- + INTRINSIC DCMPLX
- * .. Common blocks ..
- COMMON /INFOC/INFOT, NOUTC, OK, LERR
- * .. Executable Statements ..
- diff -uNr LAPACK.orig/INSTALL/make.inc.LINUX LAPACK/INSTALL/make.inc.LINUX
- --- LAPACK.orig/INSTALL/make.inc.LINUX Thu Nov 4 14:23:30 1999
- +++ LAPACK/INSTALL/make.inc.LINUX Fri May 25 15:58:36 2001
- @@ -17,7 +17,7 @@
- # desired load options for your machine.
- #
- FORTRAN = g77
- -OPTS = -funroll-all-loops -fno-f2c -O3
- +OPTS = -funroll-all-loops -O3
- DRVOPTS = $(OPTS)
- NOOPT =
- LOADER = g77
- diff -uNr LAPACK.orig/SRC/cbdsqr.f LAPACK/SRC/cbdsqr.f
- --- LAPACK.orig/SRC/cbdsqr.f Thu Nov 4 14:23:31 1999
- +++ LAPACK/SRC/cbdsqr.f Fri May 25 15:59:05 2001
- @@ -4,7 +4,7 @@
- * -- LAPACK routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* October 31, 1999
- +* April 25, 2001
- *
- * .. Scalar Arguments ..
- CHARACTER UPLO
- @@ -18,14 +18,26 @@
- * Purpose
- * =======
- *
- -* CBDSQR computes the singular value decomposition (SVD) of a real
- -* N-by-N (upper or lower) bidiagonal matrix B: B = Q * S * P' (P'
- -* denotes the transpose of P), where S is a diagonal matrix with
- -* non-negative diagonal elements (the singular values of B), and Q
- -* and P are orthogonal matrices.
- -*
- -* The routine computes S, and optionally computes U * Q, P' * VT,
- -* or Q' * C, for given complex input matrices U, VT, and C.
- +* CBDSQR computes the singular values and, optionally, the right and/or
- +* left singular vectors from the singular value decomposition (SVD) of
- +* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
- +* zero-shift QR algorithm. The SVD of B has the form
- +*
- +* B = Q * S * P**H
- +*
- +* where S is the diagonal matrix of singular values, Q is an orthogonal
- +* matrix of left singular vectors, and P is an orthogonal matrix of
- +* right singular vectors. If left singular vectors are requested, this
- +* subroutine actually returns U*Q instead of Q, and, if right singular
- +* vectors are requested, this subroutine returns P**H*VT instead of
- +* P**H, for given complex input matrices U and VT. When U and VT are
- +* the unitary matrices that reduce a general matrix A to bidiagonal
- +* form: A = U*B*VT, as computed by CGEBRD, then
- +*
- +* A = (U*Q) * S * (P**H*VT)
- +*
- +* is the SVD of A. Optionally, the subroutine may also compute Q**H*C
- +* for a given complex input matrix C.
- *
- * See "Computing Small Singular Values of Bidiagonal Matrices With
- * Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
- @@ -61,18 +73,17 @@
- * order.
- *
- * E (input/output) REAL array, dimension (N)
- -* On entry, the elements of E contain the
- -* offdiagonal elements of of the bidiagonal matrix whose SVD
- -* is desired. On normal exit (INFO = 0), E is destroyed.
- -* If the algorithm does not converge (INFO > 0), D and E
- +* On entry, the N-1 offdiagonal elements of the bidiagonal
- +* matrix B.
- +* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
- * will contain the diagonal and superdiagonal elements of a
- * bidiagonal matrix orthogonally equivalent to the one given
- * as input. E(N) is used for workspace.
- *
- * VT (input/output) COMPLEX array, dimension (LDVT, NCVT)
- * On entry, an N-by-NCVT matrix VT.
- -* On exit, VT is overwritten by P' * VT.
- -* VT is not referenced if NCVT = 0.
- +* On exit, VT is overwritten by P**H * VT.
- +* Not referenced if NCVT = 0.
- *
- * LDVT (input) INTEGER
- * The leading dimension of the array VT.
- @@ -81,21 +92,22 @@
- * U (input/output) COMPLEX array, dimension (LDU, N)
- * On entry, an NRU-by-N matrix U.
- * On exit, U is overwritten by U * Q.
- -* U is not referenced if NRU = 0.
- +* Not referenced if NRU = 0.
- *
- * LDU (input) INTEGER
- * The leading dimension of the array U. LDU >= max(1,NRU).
- *
- * C (input/output) COMPLEX array, dimension (LDC, NCC)
- * On entry, an N-by-NCC matrix C.
- -* On exit, C is overwritten by Q' * C.
- -* C is not referenced if NCC = 0.
- +* On exit, C is overwritten by Q**H * C.
- +* Not referenced if NCC = 0.
- *
- * LDC (input) INTEGER
- * The leading dimension of the array C.
- * LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
- *
- -* RWORK (workspace) REAL array, dimension (4*N)
- +* RWORK (workspace) REAL array, dimension (2*N)
- +* if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
- *
- * INFO (output) INTEGER
- * = 0: successful exit
- diff -uNr LAPACK.orig/SRC/cgebd2.f LAPACK/SRC/cgebd2.f
- --- LAPACK.orig/SRC/cgebd2.f Thu Nov 4 14:24:07 1999
- +++ LAPACK/SRC/cgebd2.f Fri May 25 15:59:27 2001
- @@ -3,7 +3,7 @@
- * -- LAPACK routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* September 30, 1994
- +* May 7, 2001
- *
- * .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- @@ -172,8 +172,9 @@
- *
- * Apply H(i)' to A(i:m,i+1:n) from the left
- *
- - CALL CLARF( 'Left', M-I+1, N-I, A( I, I ), 1,
- - $ CONJG( TAUQ( I ) ), A( I, I+1 ), LDA, WORK )
- + IF( I.LT.N )
- + $ CALL CLARF( 'Left', M-I+1, N-I, A( I, I ), 1,
- + $ CONJG( TAUQ( I ) ), A( I, I+1 ), LDA, WORK )
- A( I, I ) = D( I )
- *
- IF( I.LT.N ) THEN
- @@ -215,8 +216,9 @@
- *
- * Apply G(i) to A(i+1:m,i:n) from the right
- *
- - CALL CLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, TAUP( I ),
- - $ A( MIN( I+1, M ), I ), LDA, WORK )
- + IF( I.LT.M )
- + $ CALL CLARF( 'Right', M-I, N-I+1, A( I, I ), LDA,
- + $ TAUP( I ), A( MIN( I+1, M ), I ), LDA, WORK )
- CALL CLACGV( N-I+1, A( I, I ), LDA )
- A( I, I ) = D( I )
- *
- diff -uNr LAPACK.orig/SRC/cgees.f LAPACK/SRC/cgees.f
- --- LAPACK.orig/SRC/cgees.f Thu Nov 4 14:24:08 1999
- +++ LAPACK/SRC/cgees.f Fri May 25 15:59:55 2001
- @@ -5,6 +5,7 @@
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- * June 30, 1999
- +* 8-15-00: Improve consistency of WS calculations (eca)
- *
- * .. Scalar Arguments ..
- CHARACTER JOBVS, SORT
- @@ -89,10 +90,9 @@
- * The dimension of the array WORK. LWORK >= max(1,2*N).
- * For good performance, LWORK must generally be larger.
- *
- -* If LWORK = -1, then a workspace query is assumed; the routine
- -* only calculates the optimal size of the WORK array, returns
- -* this value as the first entry of the WORK array, and no error
- -* message related to LWORK is issued by XERBLA.
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- *
- * RWORK (workspace) REAL array, dimension (N)
- *
- @@ -120,11 +120,13 @@
- * =====================================================================
- *
- * .. Parameters ..
- + INTEGER LQUERV
- + PARAMETER ( LQUERV = -1 )
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
- * ..
- * .. Local Scalars ..
- - LOGICAL LQUERY, SCALEA, WANTST, WANTVS
- + LOGICAL SCALEA, WANTST, WANTVS
- INTEGER HSWORK, I, IBAL, ICOND, IERR, IEVAL, IHI, ILO,
- $ ITAU, IWRK, K, MAXB, MAXWRK, MINWRK
- REAL ANRM, BIGNUM, CSCALE, EPS, S, SEP, SMLNUM
- @@ -150,7 +152,6 @@
- * Test the input arguments
- *
- INFO = 0
- - LQUERY = ( LWORK.EQ.-1 )
- WANTVS = LSAME( JOBVS, 'V' )
- WANTST = LSAME( SORT, 'S' )
- IF( ( .NOT.WANTVS ) .AND. ( .NOT.LSAME( JOBVS, 'N' ) ) ) THEN
- @@ -177,7 +178,7 @@
- * the worst case.)
- *
- MINWRK = 1
- - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN
- + IF( INFO.EQ.0 ) THEN
- MAXWRK = N + N*ILAENV( 1, 'CGEHRD', ' ', N, 1, N, 0 )
- MINWRK = MAX( 1, 2*N )
- IF( .NOT.WANTVS ) THEN
- @@ -196,19 +197,17 @@
- MAXWRK = MAX( MAXWRK, HSWORK, 1 )
- END IF
- WORK( 1 ) = MAXWRK
- + IF( LWORK.LT.MINWRK .AND. LWORK.NE.LQUERV )
- + $ INFO = -12
- END IF
- - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
- - INFO = -12
- - END IF
- +*
- +* Quick returns
- +*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGEES ', -INFO )
- RETURN
- - ELSE IF( LQUERY ) THEN
- - RETURN
- END IF
- -*
- -* Quick return if possible
- -*
- + IF( LWORK.EQ.LQUERV ) RETURN
- IF( N.EQ.0 ) THEN
- SDIM = 0
- RETURN
- diff -uNr LAPACK.orig/SRC/cgeesx.f LAPACK/SRC/cgeesx.f
- --- LAPACK.orig/SRC/cgeesx.f Thu Nov 4 14:24:08 1999
- +++ LAPACK/SRC/cgeesx.f Fri May 25 16:00:18 2001
- @@ -6,6 +6,7 @@
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- * June 30, 1999
- +* 8-15-00: Do WS calculations if LWORK = -1 (eca)
- *
- * .. Scalar Arguments ..
- CHARACTER JOBVS, SENSE, SORT
- @@ -119,6 +120,10 @@
- * this routine. Note that 2*SDIM*(N-SDIM) <= N*N/2.
- * For good performance, LWORK must generally be larger.
- *
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- +*
- * RWORK (workspace) REAL array, dimension (N)
- *
- * BWORK (workspace) LOGICAL array, dimension (N)
- @@ -144,6 +149,8 @@
- * =====================================================================
- *
- * .. Parameters ..
- + INTEGER LQUERV
- + PARAMETER ( LQUERV = -1 )
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
- * ..
- @@ -211,7 +218,7 @@
- * in the code.)
- *
- MINWRK = 1
- - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 ) ) THEN
- + IF( INFO.EQ.0 ) THEN
- MAXWRK = N + N*ILAENV( 1, 'CGEHRD', ' ', N, 1, N, 0 )
- MINWRK = MAX( 1, 2*N )
- IF( .NOT.WANTVS ) THEN
- @@ -229,18 +236,24 @@
- HSWORK = MAX( K*( K+2 ), 2*N )
- MAXWRK = MAX( MAXWRK, HSWORK, 1 )
- END IF
- +*
- +* Estimate the workspace needed by CTRSEN.
- +*
- + IF( WANTST ) THEN
- + MAXWRK = MAX( MAXWRK, (N*N+1)/2 )
- + END IF
- WORK( 1 ) = MAXWRK
- + IF( LWORK.LT.MINWRK .AND. LWORK.NE.LQUERV )
- + & INFO = -15
- END IF
- - IF( LWORK.LT.MINWRK ) THEN
- - INFO = -15
- - END IF
- +*
- +* Quick returns
- +*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGEESX', -INFO )
- RETURN
- END IF
- -*
- -* Quick return if possible
- -*
- + IF( LWORK.EQ.LQUERV ) RETURN
- IF( N.EQ.0 ) THEN
- SDIM = 0
- RETURN
- diff -uNr LAPACK.orig/SRC/cgeev.f LAPACK/SRC/cgeev.f
- --- LAPACK.orig/SRC/cgeev.f Thu Nov 4 14:24:08 1999
- +++ LAPACK/SRC/cgeev.f Fri May 25 16:00:48 2001
- @@ -5,6 +5,7 @@
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- * June 30, 1999
- +* 8-15-00: Improve consistency of WS calculations (eca)
- *
- * .. Scalar Arguments ..
- CHARACTER JOBVL, JOBVR
- @@ -85,10 +86,9 @@
- * The dimension of the array WORK. LWORK >= max(1,2*N).
- * For good performance, LWORK must generally be larger.
- *
- -* If LWORK = -1, then a workspace query is assumed; the routine
- -* only calculates the optimal size of the WORK array, returns
- -* this value as the first entry of the WORK array, and no error
- -* message related to LWORK is issued by XERBLA.
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- *
- * RWORK (workspace) REAL array, dimension (2*N)
- *
- @@ -103,11 +103,13 @@
- * =====================================================================
- *
- * .. Parameters ..
- + INTEGER LQUERV
- + PARAMETER ( LQUERV = -1 )
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
- * ..
- * .. Local Scalars ..
- - LOGICAL LQUERY, SCALEA, WANTVL, WANTVR
- + LOGICAL SCALEA, WANTVL, WANTVR
- CHARACTER SIDE
- INTEGER HSWORK, I, IBAL, IERR, IHI, ILO, IRWORK, ITAU,
- $ IWRK, K, MAXB, MAXWRK, MINWRK, NOUT
- @@ -136,7 +138,6 @@
- * Test the input arguments
- *
- INFO = 0
- - LQUERY = ( LWORK.EQ.-1 )
- WANTVL = LSAME( JOBVL, 'V' )
- WANTVR = LSAME( JOBVR, 'V' )
- IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN
- @@ -165,7 +166,7 @@
- * the worst case.)
- *
- MINWRK = 1
- - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN
- + IF( INFO.EQ.0 ) THEN
- MAXWRK = N + N*ILAENV( 1, 'CGEHRD', ' ', N, 1, N, 0 )
- IF( ( .NOT.WANTVL ) .AND. ( .NOT.WANTVR ) ) THEN
- MINWRK = MAX( 1, 2*N )
- @@ -185,19 +186,17 @@
- MAXWRK = MAX( MAXWRK, HSWORK, 2*N )
- END IF
- WORK( 1 ) = MAXWRK
- + IF( LWORK.LT.MINWRK .AND. LWORK.NE.LQUERV )
- + $ INFO = -12
- END IF
- - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
- - INFO = -12
- - END IF
- +*
- +* Quick returns
- +*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGEEV ', -INFO )
- RETURN
- - ELSE IF( LQUERY ) THEN
- - RETURN
- END IF
- -*
- -* Quick return if possible
- -*
- + IF( LWORK.EQ.LQUERV ) RETURN
- IF( N.EQ.0 )
- $ RETURN
- *
- diff -uNr LAPACK.orig/SRC/cgeevx.f LAPACK/SRC/cgeevx.f
- --- LAPACK.orig/SRC/cgeevx.f Thu Nov 4 14:24:08 1999
- +++ LAPACK/SRC/cgeevx.f Fri May 25 16:01:10 2001
- @@ -6,6 +6,7 @@
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- * June 30, 1999
- +* 8-15-00: Improve consistency of WS calculations (eca)
- *
- * .. Scalar Arguments ..
- CHARACTER BALANC, JOBVL, JOBVR, SENSE
- @@ -166,10 +167,9 @@
- * LWORK >= N*N+2*N.
- * For good performance, LWORK must generally be larger.
- *
- -* If LWORK = -1, then a workspace query is assumed; the routine
- -* only calculates the optimal size of the WORK array, returns
- -* this value as the first entry of the WORK array, and no error
- -* message related to LWORK is issued by XERBLA.
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- *
- * RWORK (workspace) REAL array, dimension (2*N)
- *
- @@ -184,12 +184,14 @@
- * =====================================================================
- *
- * .. Parameters ..
- + INTEGER LQUERV
- + PARAMETER ( LQUERV = -1 )
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
- * ..
- * .. Local Scalars ..
- - LOGICAL LQUERY, SCALEA, WANTVL, WANTVR, WNTSNB, WNTSNE,
- - $ WNTSNN, WNTSNV
- + LOGICAL SCALEA, WANTVL, WANTVR, WNTSNB, WNTSNE, WNTSNN,
- + $ WNTSNV
- CHARACTER JOB, SIDE
- INTEGER HSWORK, I, ICOND, IERR, ITAU, IWRK, K, MAXB,
- $ MAXWRK, MINWRK, NOUT
- @@ -219,7 +221,6 @@
- * Test the input arguments
- *
- INFO = 0
- - LQUERY = ( LWORK.EQ.-1 )
- WANTVL = LSAME( JOBVL, 'V' )
- WANTVR = LSAME( JOBVR, 'V' )
- WNTSNN = LSAME( SENSE, 'N' )
- @@ -259,7 +260,7 @@
- * the worst case.)
- *
- MINWRK = 1
- - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN
- + IF( INFO.EQ.0 ) THEN
- MAXWRK = N + N*ILAENV( 1, 'CGEHRD', ' ', N, 1, N, 0 )
- IF( ( .NOT.WANTVL ) .AND. ( .NOT.WANTVR ) ) THEN
- MINWRK = MAX( 1, 2*N )
- @@ -293,19 +294,17 @@
- MAXWRK = MAX( MAXWRK, 2*N, 1 )
- END IF
- WORK( 1 ) = MAXWRK
- + IF( LWORK.LT.MINWRK .AND. LWORK.NE.LQUERV )
- + $ INFO = -20
- END IF
- - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
- - INFO = -20
- - END IF
- +*
- +* Quick returns
- +*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGEEVX', -INFO )
- RETURN
- - ELSE IF( LQUERY ) THEN
- - RETURN
- END IF
- -*
- -* Quick return if possible
- -*
- + IF( LWORK.EQ.LQUERV ) RETURN
- IF( N.EQ.0 )
- $ RETURN
- *
- diff -uNr LAPACK.orig/SRC/cgegs.f LAPACK/SRC/cgegs.f
- --- LAPACK.orig/SRC/cgegs.f Thu Nov 4 14:24:08 1999
- +++ LAPACK/SRC/cgegs.f Fri May 25 16:01:59 2001
- @@ -5,7 +5,7 @@
- * -- LAPACK driver routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* June 30, 1999
- +* April 26, 2001
- *
- * .. Scalar Arguments ..
- CHARACTER JOBVSL, JOBVSR
- @@ -23,83 +23,70 @@
- *
- * This routine is deprecated and has been replaced by routine CGGES.
- *
- -* CGEGS computes for a pair of N-by-N complex nonsymmetric matrices A,
- -* B: the generalized eigenvalues (alpha, beta), the complex Schur
- -* form (A, B), and optionally left and/or right Schur vectors
- -* (VSL and VSR).
- -*
- -* (If only the generalized eigenvalues are needed, use the driver CGEGV
- -* instead.)
- -*
- -* A generalized eigenvalue for a pair of matrices (A,B) is, roughly
- -* speaking, a scalar w or a ratio alpha/beta = w, such that A - w*B
- -* is singular. It is usually represented as the pair (alpha,beta),
- -* as there is a reasonable interpretation for beta=0, and even for
- -* both being zero. A good beginning reference is the book, "Matrix
- -* Computations", by G. Golub & C. van Loan (Johns Hopkins U. Press)
- -*
- -* The (generalized) Schur form of a pair of matrices is the result of
- -* multiplying both matrices on the left by one unitary matrix and
- -* both on the right by another unitary matrix, these two unitary
- -* matrices being chosen so as to bring the pair of matrices into
- -* upper triangular form with the diagonal elements of B being
- -* non-negative real numbers (this is also called complex Schur form.)
- -*
- -* The left and right Schur vectors are the columns of VSL and VSR,
- -* respectively, where VSL and VSR are the unitary matrices
- -* which reduce A and B to Schur form:
- -*
- -* Schur form of (A,B) = ( (VSL)**H A (VSR), (VSL)**H B (VSR) )
- +* CGEGS computes the eigenvalues, Schur form, and, optionally, the
- +* left and or/right Schur vectors of a complex matrix pair (A,B).
- +* Given two square matrices A and B, the generalized Schur
- +* factorization has the form
- +*
- +* A = Q*S*Z**H, B = Q*T*Z**H
- +*
- +* where Q and Z are unitary matrices and S and T are upper triangular.
- +* The columns of Q are the left Schur vectors
- +* and the columns of Z are the right Schur vectors.
- +*
- +* If only the eigenvalues of (A,B) are needed, the driver routine
- +* CGEGV should be used instead. See CGEGV for a description of the
- +* eigenvalues of the generalized nonsymmetric eigenvalue problem
- +* (GNEP).
- *
- * Arguments
- * =========
- *
- * JOBVSL (input) CHARACTER*1
- * = 'N': do not compute the left Schur vectors;
- -* = 'V': compute the left Schur vectors.
- +* = 'V': compute the left Schur vectors (returned in VSL).
- *
- * JOBVSR (input) CHARACTER*1
- * = 'N': do not compute the right Schur vectors;
- -* = 'V': compute the right Schur vectors.
- +* = 'V': compute the right Schur vectors (returned in VSR).
- *
- * N (input) INTEGER
- * The order of the matrices A, B, VSL, and VSR. N >= 0.
- *
- * A (input/output) COMPLEX array, dimension (LDA, N)
- -* On entry, the first of the pair of matrices whose generalized
- -* eigenvalues and (optionally) Schur vectors are to be
- -* computed.
- -* On exit, the generalized Schur form of A.
- +* On entry, the matrix A.
- +* On exit, the upper triangular matrix S from the generalized
- +* Schur factorization.
- *
- * LDA (input) INTEGER
- * The leading dimension of A. LDA >= max(1,N).
- *
- * B (input/output) COMPLEX array, dimension (LDB, N)
- -* On entry, the second of the pair of matrices whose
- -* generalized eigenvalues and (optionally) Schur vectors are
- -* to be computed.
- -* On exit, the generalized Schur form of B.
- +* On entry, the matrix B.
- +* On exit, the upper triangular matrix T from the generalized
- +* Schur factorization.
- *
- * LDB (input) INTEGER
- * The leading dimension of B. LDB >= max(1,N).
- *
- * ALPHA (output) COMPLEX array, dimension (N)
- +* The complex scalars alpha that define the eigenvalues of
- +* GNEP. ALPHA(j) = S(j,j), the diagonal element of the Schur
- +* form of A.
- +*
- * BETA (output) COMPLEX array, dimension (N)
- -* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
- -* generalized eigenvalues. ALPHA(j), j=1,...,N and BETA(j),
- -* j=1,...,N are the diagonals of the complex Schur form (A,B)
- -* output by CGEGS. The BETA(j) will be non-negative real.
- -*
- -* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
- -* underflow, and BETA(j) may even be zero. Thus, the user
- -* should avoid naively computing the ratio alpha/beta.
- -* However, ALPHA will be always less than and usually
- -* comparable with norm(A) in magnitude, and BETA always less
- -* than and usually comparable with norm(B).
- +* The non-negative real scalars beta that define the
- +* eigenvalues of GNEP. BETA(j) = T(j,j), the diagonal element
- +* of the triangular factor T.
- +*
- +* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
- +* represent the j-th eigenvalue of the matrix pair (A,B), in
- +* one of the forms lambda = alpha/beta or mu = beta/alpha.
- +* Since either lambda or mu may overflow, they should not,
- +* in general, be computed.
- *
- * VSL (output) COMPLEX array, dimension (LDVSL,N)
- -* If JOBVSL = 'V', VSL will contain the left Schur vectors.
- -* (See "Purpose", above.)
- +* If JOBVSL = 'V', the matrix of left Schur vectors Q.
- * Not referenced if JOBVSL = 'N'.
- *
- * LDVSL (input) INTEGER
- @@ -107,8 +94,7 @@
- * if JOBVSL = 'V', LDVSL >= N.
- *
- * VSR (output) COMPLEX array, dimension (LDVSR,N)
- -* If JOBVSR = 'V', VSR will contain the right Schur vectors.
- -* (See "Purpose", above.)
- +* If JOBVSR = 'V', the matrix of right Schur vectors Z.
- * Not referenced if JOBVSR = 'N'.
- *
- * LDVSR (input) INTEGER
- diff -uNr LAPACK.orig/SRC/cgegv.f LAPACK/SRC/cgegv.f
- --- LAPACK.orig/SRC/cgegv.f Thu Nov 4 14:24:08 1999
- +++ LAPACK/SRC/cgegv.f Fri May 25 16:02:21 2001
- @@ -4,7 +4,7 @@
- * -- LAPACK driver routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* June 30, 1999
- +* April 26, 2001
- *
- * .. Scalar Arguments ..
- CHARACTER JOBVL, JOBVR
- @@ -22,22 +22,28 @@
- *
- * This routine is deprecated and has been replaced by routine CGGEV.
- *
- -* CGEGV computes for a pair of N-by-N complex nonsymmetric matrices A
- -* and B, the generalized eigenvalues (alpha, beta), and optionally,
- -* the left and/or right generalized eigenvectors (VL and VR).
- -*
- -* A generalized eigenvalue for a pair of matrices (A,B) is, roughly
- -* speaking, a scalar w or a ratio alpha/beta = w, such that A - w*B
- -* is singular. It is usually represented as the pair (alpha,beta),
- -* as there is a reasonable interpretation for beta=0, and even for
- -* both being zero. A good beginning reference is the book, "Matrix
- -* Computations", by G. Golub & C. van Loan (Johns Hopkins U. Press)
- -*
- -* A right generalized eigenvector corresponding to a generalized
- -* eigenvalue w for a pair of matrices (A,B) is a vector r such
- -* that (A - w B) r = 0 . A left generalized eigenvector is a vector
- -* l such that l**H * (A - w B) = 0, where l**H is the
- -* conjugate-transpose of l.
- +* CGEGV computes the eigenvalues and, optionally, the left and/or right
- +* eigenvectors of a complex matrix pair (A,B).
- +* Given two square matrices A and B,
- +* the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
- +* eigenvalues lambda and corresponding (non-zero) eigenvectors x such
- +* that
- +* A*x = lambda*B*x.
- +*
- +* An alternate form is to find the eigenvalues mu and corresponding
- +* eigenvectors y such that
- +* mu*A*y = B*y.
- +*
- +* These two forms are equivalent with mu = 1/lambda and x = y if
- +* neither lambda nor mu is zero. In order to deal with the case that
- +* lambda or mu is zero or small, two values alpha and beta are returned
- +* for each eigenvalue, such that lambda = alpha/beta and
- +* mu = beta/alpha.
- +*
- +* The vectors x and y in the above equations are right eigenvectors of
- +* the matrix pair (A,B). Vectors u and v satisfying
- +* u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
- +* are left eigenvectors of (A,B).
- *
- * Note: this routine performs "full balancing" on A and B -- see
- * "Further Details", below.
- @@ -47,56 +53,62 @@
- *
- * JOBVL (input) CHARACTER*1
- * = 'N': do not compute the left generalized eigenvectors;
- -* = 'V': compute the left generalized eigenvectors.
- +* = 'V': compute the left generalized eigenvectors (returned
- +* in VL).
- *
- * JOBVR (input) CHARACTER*1
- * = 'N': do not compute the right generalized eigenvectors;
- -* = 'V': compute the right generalized eigenvectors.
- +* = 'V': compute the right generalized eigenvectors (returned
- +* in VR).
- *
- * N (input) INTEGER
- * The order of the matrices A, B, VL, and VR. N >= 0.
- *
- * A (input/output) COMPLEX array, dimension (LDA, N)
- -* On entry, the first of the pair of matrices whose
- -* generalized eigenvalues and (optionally) generalized
- -* eigenvectors are to be computed.
- -* On exit, the contents will have been destroyed. (For a
- -* description of the contents of A on exit, see "Further
- -* Details", below.)
- +* On entry, the matrix A.
- +* If JOBVL = 'V' or JOBVR = 'V', then on exit A
- +* contains the Schur form of A from the generalized Schur
- +* factorization of the pair (A,B) after balancing. If no
- +* eigenvectors were computed, then only the diagonal elements
- +* of the Schur form will be correct. See CGGHRD and CHGEQZ
- +* for details.
- *
- * LDA (input) INTEGER
- * The leading dimension of A. LDA >= max(1,N).
- *
- * B (input/output) COMPLEX array, dimension (LDB, N)
- -* On entry, the second of the pair of matrices whose
- -* generalized eigenvalues and (optionally) generalized
- -* eigenvectors are to be computed.
- -* On exit, the contents will have been destroyed. (For a
- -* description of the contents of B on exit, see "Further
- -* Details", below.)
- +* On entry, the matrix B.
- +* If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
- +* upper triangular matrix obtained from B in the generalized
- +* Schur factorization of the pair (A,B) after balancing.
- +* If no eigenvectors were computed, then only the diagonal
- +* elements of B will be correct. See CGGHRD and CHGEQZ for
- +* details.
- *
- * LDB (input) INTEGER
- * The leading dimension of B. LDB >= max(1,N).
- *
- * ALPHA (output) COMPLEX array, dimension (N)
- -* BETA (output) COMPLEX array, dimension (N)
- -* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
- -* generalized eigenvalues.
- +* The complex scalars alpha that define the eigenvalues of
- +* GNEP.
- *
- -* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
- -* underflow, and BETA(j) may even be zero. Thus, the user
- -* should avoid naively computing the ratio alpha/beta.
- -* However, ALPHA will be always less than and usually
- -* comparable with norm(A) in magnitude, and BETA always less
- -* than and usually comparable with norm(B).
- +* BETA (output) COMPLEX array, dimension (N)
- +* The complex scalars beta that define the eigenvalues of GNEP.
- +*
- +* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
- +* represent the j-th eigenvalue of the matrix pair (A,B), in
- +* one of the forms lambda = alpha/beta or mu = beta/alpha.
- +* Since either lambda or mu may overflow, they should not,
- +* in general, be computed.
- +
- *
- * VL (output) COMPLEX array, dimension (LDVL,N)
- -* If JOBVL = 'V', the left generalized eigenvectors. (See
- -* "Purpose", above.)
- -* Each eigenvector will be scaled so the largest component
- -* will have abs(real part) + abs(imag. part) = 1, *except*
- -* that for eigenvalues with alpha=beta=0, a zero vector will
- -* be returned as the corresponding eigenvector.
- +* If JOBVL = 'V', the left eigenvectors u(j) are stored
- +* in the columns of VL, in the same order as their eigenvalues.
- +* Each eigenvector is scaled so that its largest component has
- +* abs(real part) + abs(imag. part) = 1, except for eigenvectors
- +* corresponding to an eigenvalue with alpha = beta = 0, which
- +* are set to zero.
- * Not referenced if JOBVL = 'N'.
- *
- * LDVL (input) INTEGER
- @@ -104,12 +116,12 @@
- * if JOBVL = 'V', LDVL >= N.
- *
- * VR (output) COMPLEX array, dimension (LDVR,N)
- -* If JOBVR = 'V', the right generalized eigenvectors. (See
- -* "Purpose", above.)
- -* Each eigenvector will be scaled so the largest component
- -* will have abs(real part) + abs(imag. part) = 1, *except*
- -* that for eigenvalues with alpha=beta=0, a zero vector will
- -* be returned as the corresponding eigenvector.
- +* If JOBVR = 'V', the right eigenvectors x(j) are stored
- +* in the columns of VR, in the same order as their eigenvalues.
- +* Each eigenvector is scaled so that its largest component has
- +* abs(real part) + abs(imag. part) = 1, except for eigenvectors
- +* corresponding to an eigenvalue with alpha = beta = 0, which
- +* are set to zero.
- * Not referenced if JOBVR = 'N'.
- *
- * LDVR (input) INTEGER
- diff -uNr LAPACK.orig/SRC/cgelsd.f LAPACK/SRC/cgelsd.f
- --- LAPACK.orig/SRC/cgelsd.f Thu Nov 4 14:26:25 1999
- +++ LAPACK/SRC/cgelsd.f Fri May 25 16:03:27 2001
- @@ -4,7 +4,8 @@
- * -- LAPACK driver routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* October 31, 1999
- +* June 30, 1999
- +* 8-15-00: Improve consistency of WS calculations (eca)
- *
- * .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
- @@ -64,7 +65,8 @@
- *
- * A (input/output) COMPLEX array, dimension (LDA,N)
- * On entry, the M-by-N matrix A.
- -* On exit, A has been destroyed.
- +* On exit, the first min(m,n) rows of A are overwritten with
- +* its right singular vectors, stored rowwise.
- *
- * LDA (input) INTEGER
- * The leading dimension of the array A. LDA >= max(1,M).
- @@ -96,32 +98,24 @@
- * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
- *
- * LWORK (input) INTEGER
- -* The dimension of the array WORK. LWORK must be at least 1.
- +* The dimension of the array WORK. LWORK >= 1.
- * The exact minimum amount of workspace needed depends on M,
- -* N and NRHS. As long as LWORK is at least
- -* 2 * N + N * NRHS
- -* if M is greater than or equal to N or
- -* 2 * M + M * NRHS
- -* if M is less than N, the code will execute correctly.
- +* N and NRHS.
- +* If M >= N, LWORK >= 2*N + N*NRHS.
- +* If M < N, LWORK >= 2*M + M*NRHS.
- * For good performance, LWORK should generally be larger.
- *
- -* If LWORK = -1, then a workspace query is assumed; the routine
- -* only calculates the optimal size of the WORK array, returns
- -* this value as the first entry of the WORK array, and no error
- -* message related to LWORK is issued by XERBLA.
- -*
- -*
- -* RWORK (workspace) REAL array, dimension at least
- -* 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
- -* (SMLSIZ+1)**2
- -* if M is greater than or equal to N or
- -* 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
- -* (SMLSIZ+1)**2
- -* if M is less than N, the code will execute correctly.
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- +*
- +* RWORK (workspace) REAL array, dimension (LRWORK)
- +* If M >= N, LRWORK >= 8*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS.
- +* If M < N, LRWORK >= 8*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS.
- * SMLSIZ is returned by ILAENV and is equal to the maximum
- * size of the subproblems at the bottom of the computation
- * tree (usually about 25), and
- -* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
- +* NLVL = INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1
- *
- * IWORK (workspace) INTEGER array, dimension (LIWORK)
- * LIWORK >= 3 * MINMN * NLVL + 11 * MINMN,
- @@ -145,13 +139,14 @@
- * =====================================================================
- *
- * .. Parameters ..
- + INTEGER LQUERV
- + PARAMETER ( LQUERV = -1 )
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
- COMPLEX CZERO
- PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ) )
- * ..
- * .. Local Scalars ..
- - LOGICAL LQUERY
- INTEGER IASCL, IBSCL, IE, IL, ITAU, ITAUP, ITAUQ,
- $ LDWORK, MAXMN, MAXWRK, MINMN, MINWRK, MM,
- $ MNTHR, NRWORK, NWORK, SMLSIZ
- @@ -179,7 +174,6 @@
- MINMN = MIN( M, N )
- MAXMN = MAX( M, N )
- MNTHR = ILAENV( 6, 'CGELSD', ' ', M, N, NRHS, -1 )
- - LQUERY = ( LWORK.EQ.-1 )
- IF( M.LT.0 ) THEN
- INFO = -1
- ELSE IF( N.LT.0 ) THEN
- @@ -263,20 +257,17 @@
- END IF
- MINWRK = MIN( MINWRK, MAXWRK )
- WORK( 1 ) = CMPLX( MAXWRK, 0 )
- - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
- - INFO = -12
- - END IF
- + IF( LWORK.LT.MINWRK .AND. LWORK.NE.LQUERV )
- + $ INFO = -12
- END IF
- *
- +* Quick returns
- +*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGELSD', -INFO )
- RETURN
- - ELSE IF( LQUERY ) THEN
- - GO TO 10
- END IF
- -*
- -* Quick return if possible.
- -*
- + IF( LWORK.EQ.LQUERV ) RETURN
- IF( M.EQ.0 .OR. N.EQ.0 ) THEN
- RANK = 0
- RETURN
- diff -uNr LAPACK.orig/SRC/cgelss.f LAPACK/SRC/cgelss.f
- --- LAPACK.orig/SRC/cgelss.f Thu Nov 4 14:24:09 1999
- +++ LAPACK/SRC/cgelss.f Fri May 25 16:03:50 2001
- @@ -4,7 +4,7 @@
- * -- LAPACK driver routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* October 31, 1999
- +* April 25, 2001
- *
- * .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
- @@ -87,10 +87,9 @@
- * LWORK >= 2*min(M,N) + max(M,N,NRHS)
- * For good performance, LWORK should generally be larger.
- *
- -* If LWORK = -1, then a workspace query is assumed; the routine
- -* only calculates the optimal size of the WORK array, returns
- -* this value as the first entry of the WORK array, and no error
- -* message related to LWORK is issued by XERBLA.
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- *
- * RWORK (workspace) REAL array, dimension (5*min(M,N))
- *
- @@ -164,7 +163,7 @@
- * immediately following subroutine, as returned by ILAENV.)
- *
- MINWRK = 1
- - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN
- + IF( INFO.EQ.0 ) THEN
- MAXWRK = 0
- MM = M
- IF( M.GE.N .AND. M.GE.MNTHR ) THEN
- @@ -235,19 +234,18 @@
- MINWRK = MAX( MINWRK, 1 )
- MAXWRK = MAX( MINWRK, MAXWRK )
- WORK( 1 ) = MAXWRK
- + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY )
- + $ INFO = -12
- END IF
- *
- - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY )
- - $ INFO = -12
- +* Quick returns
- +*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGELSS', -INFO )
- RETURN
- ELSE IF( LQUERY ) THEN
- RETURN
- END IF
- -*
- -* Quick return if possible
- -*
- IF( M.EQ.0 .OR. N.EQ.0 ) THEN
- RANK = 0
- RETURN
- @@ -512,8 +510,8 @@
- DO 40 I = 1, NRHS, CHUNK
- BL = MIN( NRHS-I+1, CHUNK )
- CALL CGEMM( 'C', 'N', M, BL, M, CONE, WORK( IL ), LDWORK,
- - $ B( 1, I ), LDB, CZERO, WORK( IWORK ), N )
- - CALL CLACPY( 'G', M, BL, WORK( IWORK ), N, B( 1, I ),
- + $ B( 1, I ), LDB, CZERO, WORK( IWORK ), M )
- + CALL CLACPY( 'G', M, BL, WORK( IWORK ), M, B( 1, I ),
- $ LDB )
- 40 CONTINUE
- ELSE
- diff -uNr LAPACK.orig/SRC/cgesdd.f LAPACK/SRC/cgesdd.f
- --- LAPACK.orig/SRC/cgesdd.f Thu Nov 11 20:32:54 1999
- +++ LAPACK/SRC/cgesdd.f Fri May 25 16:08:03 2001
- @@ -1,10 +1,11 @@
- - SUBROUTINE CGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
- - $ LWORK, RWORK, IWORK, INFO )
- + SUBROUTINE CGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
- + $ WORK, LWORK, RWORK, IWORK, INFO )
- *
- * -- LAPACK driver routine (version 3.0) --
- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- * Courant Institute, Argonne National Lab, and Rice University
- -* October 31, 1999
- +* June 30, 1999
- +* 8-15-00: Improve consistency of WS calculations (eca)
- *
- * .. Scalar Arguments ..
- CHARACTER JOBZ
- @@ -119,12 +120,14 @@
- * if JOBZ = 'S' or 'A',
- * LWORK >= min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
- * For good performance, LWORK should generally be larger.
- -* If LWORK < 0 but other input arguments are legal, WORK(1)
- -* returns the optimal LWORK.
- +*
- +* If LWORK = -1, a workspace query is assumed. The optimal
- +* size for the WORK array is calculated and stored in WORK(1),
- +* and no other work except argument checking is performed.
- *
- * RWORK (workspace) REAL array, dimension (LRWORK)
- -* If JOBZ = 'N', LRWORK >= 7*min(M,N).
- -* Otherwise, LRWORK >= 5*min(M,N)*min(M,N) + 5*min(M,N)
- +* If JOBZ = 'N', LRWORK >= 5*min(M,N).
- +* Otherwise, LRWORK >= 5*min(M,N)*min(M,N) + 7*min(M,N)
- *
- * IWORK (workspace) INTEGER array, dimension (8*min(M,N))
- *
- @@ -143,14 +146,16 @@
- * =====================================================================
- *
- * .. Parameters ..
- + INTEGER LQUERV
- + PARAMETER ( LQUERV = -1 )
- COMPLEX CZERO, CONE
- - PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ),
- - $ CONE = ( 1.0E0, 0.0E0 ) )
- + PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ),
- + $ CONE = ( 1.0E+0, 0.0E+0 ) )
- REAL ZERO, ONE
- - PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
- + PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
- * ..
- * .. Local Scalars ..
- - LOGICAL LQUERY, WNTQA, WNTQAS, WNTQ…
Large files files are truncated, but you can click here to view the full file