--- rpl/lapack/lapack/dgetsls.f 2018/05/29 07:17:53 1.4 +++ rpl/lapack/lapack/dgetsls.f 2023/08/07 08:38:50 1.6 @@ -1,3 +1,5 @@ +*> \brief \b DGETSLS +* * Definition: * =========== * @@ -152,18 +154,15 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date June 2017 -* *> \ingroup doubleGEsolve * * ===================================================================== SUBROUTINE DGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.1) -- +* -- LAPACK driver routine -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -182,16 +181,15 @@ * .. * .. Local Scalars .. LOGICAL LQUERY, TRAN - INTEGER I, IASCL, IBSCL, J, MINMN, MAXMN, BROW, - $ SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2, + INTEGER I, IASCL, IBSCL, J, MAXMN, BROW, + $ SCLLEN, TSZO, TSZM, LWO, LWM, LW1, LW2, $ WSIZEO, WSIZEM, INFO2 DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ( 1 ) * .. * .. External Functions .. LOGICAL LSAME - INTEGER ILAENV DOUBLE PRECISION DLAMCH, DLANGE - EXTERNAL LSAME, ILAENV, DLABAD, DLAMCH, DLANGE + EXTERNAL LSAME, DLABAD, DLAMCH, DLANGE * .. * .. External Subroutines .. EXTERNAL DGEQR, DGEMQR, DLASCL, DLASET, @@ -205,9 +203,7 @@ * Test the input arguments. * INFO = 0 - MINMN = MIN( M, N ) MAXMN = MAX( M, N ) - MNK = MAX( MINMN, NRHS ) TRAN = LSAME( TRANS, 'T' ) * LQUERY = ( LWORK.EQ.-1 .OR. LWORK.EQ.-2 ) @@ -228,7 +224,7 @@ * IF( INFO.EQ.0 ) THEN * -* Determine the block size and minimum LWORK +* Determine the optimum and minimum LWORK * IF( M.GE.N ) THEN CALL DGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) @@ -256,7 +252,7 @@ TSZM = INT( TQ( 1 ) ) LWM = INT( WORKQ( 1 ) ) CALL DGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, - $ TSZO, B, LDB, WORKQ, -1, INFO2 ) + $ TSZM, B, LDB, WORKQ, -1, INFO2 ) LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM @@ -266,16 +262,16 @@ INFO = -10 END IF * + WORK( 1 ) = DBLE( WSIZEO ) +* END IF * IF( INFO.NE.0 ) THEN CALL XERBLA( 'DGETSLS', -INFO ) - WORK( 1 ) = DBLE( WSIZEO ) RETURN END IF IF( LQUERY ) THEN - IF( LWORK.EQ.-1 ) WORK( 1 ) = REAL( WSIZEO ) - IF( LWORK.EQ.-2 ) WORK( 1 ) = REAL( WSIZEM ) + IF( LWORK.EQ.-2 ) WORK( 1 ) = DBLE( WSIZEM ) RETURN END IF IF( LWORK.LT.WSIZEO ) THEN