Fixes from netlib PR 253

When minimal workspace is given in ?hesv_aa, ?sysv_aa, ?hesv_aa_2stage, ?sysv_aa_2stage, now no error is given
Quick return for ?laqr1
This commit is contained in:
Martin Kroeker 2018-06-01 15:12:59 +02:00 committed by GitHub
parent e2a8c35e5a
commit 677e42d7b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 155 additions and 101 deletions

View File

@ -701,7 +701,7 @@
LWSVDJ = MAX( 2 * N, 1 ) LWSVDJ = MAX( 2 * N, 1 )
LWSVDJV = MAX( 2 * N, 1 ) LWSVDJV = MAX( 2 * N, 1 )
* .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ * .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ
LRWQP3 = N LRWQP3 = 2 * N
LRWCON = N LRWCON = N
LRWSVDJ = N LRWSVDJ = N
IF ( LQUERY ) THEN IF ( LQUERY ) THEN
@ -939,7 +939,7 @@
END IF END IF
END IF END IF
MINWRK = MAX( 2, MINWRK ) MINWRK = MAX( 2, MINWRK )
OPTWRK = MAX( 2, OPTWRK ) OPTWRK = MAX( OPTWRK, MINWRK )
IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17 IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17
IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19 IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19
END IF END IF

View File

@ -209,6 +209,8 @@
INFO = -5 INFO = -5
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -8 INFO = -8
ELSE IF( LWORK.LT.MAX( 2*N, 3*N-2 ) .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
@ -219,9 +221,6 @@
LWKOPT_HETRS = INT( WORK(1) ) LWKOPT_HETRS = INT( WORK(1) )
LWKOPT = MAX( LWKOPT_HETRF, LWKOPT_HETRS ) LWKOPT = MAX( LWKOPT_HETRF, LWKOPT_HETRS )
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -105,6 +105,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -124,7 +125,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -150,6 +151,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -233,19 +235,18 @@
INFO = -3 INFO = -3
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
INFO = -5 INFO = -5
ELSE IF( LTB.LT.( 4*N ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -11 INFO = -11
ELSE IF( LWORK.LT.N .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
CALL CHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV, CALL CHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
$ IPIV2, WORK, -1, INFO ) $ IPIV2, WORK, -1, INFO )
LWKOPT = INT( WORK(1) ) LWKOPT = INT( WORK(1) )
IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN
@ -270,6 +271,8 @@
END IF END IF
* *
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
*
RETURN
* *
* End of CHESV_AA_2STAGE * End of CHESV_AA_2STAGE
* *

View File

@ -93,6 +93,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -112,7 +113,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -125,6 +126,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -658,6 +660,8 @@ c $ (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
* *
* Factor the band matrix * Factor the band matrix
CALL CGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO ) CALL CGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
*
RETURN
* *
* End of CHETRF_AA_2STAGE * End of CHETRF_AA_2STAGE
* *

View File

@ -87,6 +87,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N. *> The size of the array TB. LTB >= 4*N.
*> \endverbatim *> \endverbatim
*> *>

View File

@ -241,7 +241,7 @@
INFO = 10 INFO = 10
END IF END IF
IF( INFO.NE.0 )THEN IF( INFO.NE.0 )THEN
CALL XERBLA( 'SSYMV ', INFO ) CALL XERBLA( 'CLA_SYAMV', INFO )
RETURN RETURN
END IF END IF
* *

View File

@ -142,6 +142,13 @@
CABS1( CDUM ) = ABS( REAL( CDUM ) ) + ABS( AIMAG( CDUM ) ) CABS1( CDUM ) = ABS( REAL( CDUM ) ) + ABS( AIMAG( CDUM ) )
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
*
* Quick return if possible
*
IF( N.NE.2 .AND. N.NE.3 ) THEN
RETURN
END IF
*
IF( N.EQ.2 ) THEN IF( N.EQ.2 ) THEN
S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) )
IF( S.EQ.RZERO ) THEN IF( S.EQ.RZERO ) THEN

View File

@ -221,9 +221,6 @@
LWKOPT_SYTRS = INT( WORK(1) ) LWKOPT_SYTRS = INT( WORK(1) )
LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS ) LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS )
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -105,6 +105,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -124,7 +125,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -150,6 +151,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -233,19 +235,18 @@
INFO = -3 INFO = -3
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
INFO = -5 INFO = -5
ELSE IF( LTB.LT.( 4*N ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -11 INFO = -11
ELSE IF( LWORK.LT.N .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
CALL CSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV, CALL CSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
$ IPIV2, WORK, -1, INFO ) $ IPIV2, WORK, -1, INFO )
LWKOPT = INT( WORK(1) ) LWKOPT = INT( WORK(1) )
IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN
@ -270,6 +271,8 @@
END IF END IF
* *
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
*
RETURN
* *
* End of CSYSV_AA_2STAGE * End of CSYSV_AA_2STAGE
* *

View File

@ -93,6 +93,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -112,7 +113,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -125,6 +126,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -662,6 +664,8 @@ c $ (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
* *
* Factor the band matrix * Factor the band matrix
CALL CGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO ) CALL CGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
*
RETURN
* *
* End of CSYTRF_AA_2STAGE * End of CSYTRF_AA_2STAGE
* *

View File

@ -96,11 +96,11 @@
*> LWORK is INTEGER *> LWORK is INTEGER
*> The dimension of the array WORK. *> The dimension of the array WORK.
*> WORK is size >= (N+NB+1)*(NB+3) *> WORK is size >= (N+NB+1)*(NB+3)
*> If LDWORK = -1, then a workspace query is assumed; the routine *> If LWORK = -1, then a workspace query is assumed; the routine
*> calculates: *> calculates:
*> - the optimal size of the WORK array, returns *> - the optimal size of the WORK array, returns
*> this value as the first entry of the WORK array, *> this value as the first entry of the WORK array,
*> - and no error message related to LDWORK is issued by XERBLA. *> - and no error message related to LWORK is issued by XERBLA.
*> \endverbatim *> \endverbatim
*> *>
*> \param[out] INFO *> \param[out] INFO
@ -163,7 +163,7 @@
UPPER = LSAME( UPLO, 'U' ) UPPER = LSAME( UPLO, 'U' )
LQUERY = ( LWORK.EQ.-1 ) LQUERY = ( LWORK.EQ.-1 )
* Get blocksize * Get blocksize
NBMAX = ILAENV( 1, 'CSYTRF', UPLO, N, -1, -1, -1 ) NBMAX = ILAENV( 1, 'CSYTRI2', UPLO, N, -1, -1, -1 )
IF ( NBMAX .GE. N ) THEN IF ( NBMAX .GE. N ) THEN
MINSIZE = N MINSIZE = N
ELSE ELSE

View File

@ -85,6 +85,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N. *> The size of the array TB. LTB >= 4*N.
*> \endverbatim *> \endverbatim
*> *>

View File

@ -27,8 +27,8 @@
* .. * ..
* .. Array Arguments .. * .. Array Arguments ..
* LOGICAL SELECT( * ) * LOGICAL SELECT( * )
* REAL RWORK( * ) * REAL RWORK( * )
* COMPLEX T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), * COMPLEX T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
* $ WORK( * ) * $ WORK( * )
* .. * ..
* *
@ -258,17 +258,17 @@
* .. * ..
* .. Array Arguments .. * .. Array Arguments ..
LOGICAL SELECT( * ) LOGICAL SELECT( * )
REAL RWORK( * ) REAL RWORK( * )
COMPLEX T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), COMPLEX T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
$ WORK( * ) $ WORK( * )
* .. * ..
* *
* ===================================================================== * =====================================================================
* *
* .. Parameters .. * .. Parameters ..
REAL ZERO, ONE REAL ZERO, ONE
PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 ) PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
COMPLEX CZERO, CONE COMPLEX CZERO, CONE
PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ), PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ),
$ CONE = ( 1.0E+0, 0.0E+0 ) ) $ CONE = ( 1.0E+0, 0.0E+0 ) )
INTEGER NBMIN, NBMAX INTEGER NBMIN, NBMAX
@ -277,13 +277,13 @@
* .. Local Scalars .. * .. Local Scalars ..
LOGICAL ALLV, BOTHV, LEFTV, LQUERY, OVER, RIGHTV, SOMEV LOGICAL ALLV, BOTHV, LEFTV, LQUERY, OVER, RIGHTV, SOMEV
INTEGER I, II, IS, J, K, KI, IV, MAXWRK, NB INTEGER I, II, IS, J, K, KI, IV, MAXWRK, NB
REAL OVFL, REMAX, SCALE, SMIN, SMLNUM, ULP, UNFL REAL OVFL, REMAX, SCALE, SMIN, SMLNUM, ULP, UNFL
COMPLEX CDUM COMPLEX CDUM
* .. * ..
* .. External Functions .. * .. External Functions ..
LOGICAL LSAME LOGICAL LSAME
INTEGER ILAENV, ICAMAX INTEGER ILAENV, ICAMAX
REAL SLAMCH, SCASUM REAL SLAMCH, SCASUM
EXTERNAL LSAME, ILAENV, ICAMAX, SLAMCH, SCASUM EXTERNAL LSAME, ILAENV, ICAMAX, SLAMCH, SCASUM
* .. * ..
* .. External Subroutines .. * .. External Subroutines ..

View File

@ -158,7 +158,7 @@
INTEGER I, IB, IINFO, K INTEGER I, IB, IINFO, K
* .. * ..
* .. External Subroutines .. * .. External Subroutines ..
EXTERNAL DGEQRT2, DGELQT3, DGEQRT3, DLARFB, XERBLA EXTERNAL DGELQT3, DLARFB, XERBLA
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
* *

View File

@ -230,7 +230,7 @@
INFO = 10 INFO = 10
END IF END IF
IF( INFO.NE.0 )THEN IF( INFO.NE.0 )THEN
CALL XERBLA( 'DSYMV ', INFO ) CALL XERBLA( 'DLA_SYAMV', INFO )
RETURN RETURN
END IF END IF
* *

View File

@ -147,6 +147,13 @@
INTRINSIC ABS INTRINSIC ABS
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
*
* Quick return if possible
*
IF( N.NE.2 .AND. N.NE.3 ) THEN
RETURN
END IF
*
IF( N.EQ.2 ) THEN IF( N.EQ.2 ) THEN
S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 ) ) S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 ) )
IF( S.EQ.ZERO ) THEN IF( S.EQ.ZERO ) THEN

View File

@ -221,9 +221,6 @@
LWKOPT_SYTRS = INT( WORK(1) ) LWKOPT_SYTRS = INT( WORK(1) )
LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS ) LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS )
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -107,6 +107,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -126,7 +127,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -152,6 +153,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -235,19 +237,18 @@
INFO = -3 INFO = -3
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
INFO = -5 INFO = -5
ELSE IF( LTB.LT.( 4*N ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -11 INFO = -11
ELSE IF( LWORK.LT.N .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
CALL DSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV, CALL DSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
$ IPIV2, WORK, -1, INFO ) $ IPIV2, WORK, -1, INFO )
LWKOPT = INT( WORK(1) ) LWKOPT = INT( WORK(1) )
IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -93,6 +93,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -109,6 +110,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -128,10 +130,10 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV2(k).
*> \endverbatim *> \endverbatim
*> *>
*> \param[out] INFO *> \param[out] INFO
@ -641,6 +643,8 @@ c $ (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
* *
* Factor the band matrix * Factor the band matrix
CALL DGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO ) CALL DGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
*
RETURN
* *
* End of DSYTRF_AA_2STAGE * End of DSYTRF_AA_2STAGE
* *

View File

@ -96,11 +96,11 @@
*> LWORK is INTEGER *> LWORK is INTEGER
*> The dimension of the array WORK. *> The dimension of the array WORK.
*> WORK is size >= (N+NB+1)*(NB+3) *> WORK is size >= (N+NB+1)*(NB+3)
*> If LDWORK = -1, then a workspace query is assumed; the routine *> If LWORK = -1, then a workspace query is assumed; the routine
*> calculates: *> calculates:
*> - the optimal size of the WORK array, returns *> - the optimal size of the WORK array, returns
*> this value as the first entry of the WORK array, *> this value as the first entry of the WORK array,
*> - and no error message related to LDWORK is issued by XERBLA. *> - and no error message related to LWORK is issued by XERBLA.
*> \endverbatim *> \endverbatim
*> *>
*> \param[out] INFO *> \param[out] INFO
@ -163,7 +163,7 @@
UPPER = LSAME( UPLO, 'U' ) UPPER = LSAME( UPLO, 'U' )
LQUERY = ( LWORK.EQ.-1 ) LQUERY = ( LWORK.EQ.-1 )
* Get blocksize * Get blocksize
NBMAX = ILAENV( 1, 'DSYTRF', UPLO, N, -1, -1, -1 ) NBMAX = ILAENV( 1, 'DSYTRI2', UPLO, N, -1, -1, -1 )
IF ( NBMAX .GE. N ) THEN IF ( NBMAX .GE. N ) THEN
MINSIZE = N MINSIZE = N
ELSE ELSE

View File

@ -85,6 +85,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N. *> The size of the array TB. LTB >= 4*N.
*> \endverbatim *> \endverbatim
*> *>

View File

@ -45,9 +45,9 @@
*> The right eigenvector x and the left eigenvector y of T corresponding *> The right eigenvector x and the left eigenvector y of T corresponding
*> to an eigenvalue w are defined by: *> to an eigenvalue w are defined by:
*> *>
*> T*x = w*x, (y**H)*T = w*(y**H) *> T*x = w*x, (y**T)*T = w*(y**T)
*> *>
*> where y**H denotes the conjugate transpose of y. *> where y**T denotes the transpose of the vector y.
*> The eigenvalues are not input to this routine, but are read directly *> The eigenvalues are not input to this routine, but are read directly
*> from the diagonal blocks of T. *> from the diagonal blocks of T.
*> *>

View File

@ -104,13 +104,13 @@
*> *>
*> \param[in] NAME *> \param[in] NAME
*> \verbatim *> \verbatim
*> NAME is character string *> NAME is CHARACTER string
*> Name of the calling subroutine *> Name of the calling subroutine
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] OPTS *> \param[in] OPTS
*> \verbatim *> \verbatim
*> OPTS is character string *> OPTS is CHARACTER string
*> This is a concatenation of the string arguments to *> This is a concatenation of the string arguments to
*> TTQRE. *> TTQRE.
*> \endverbatim *> \endverbatim

View File

@ -230,7 +230,7 @@
INFO = 10 INFO = 10
END IF END IF
IF( INFO.NE.0 )THEN IF( INFO.NE.0 )THEN
CALL XERBLA( 'SSYMV ', INFO ) CALL XERBLA( 'SLA_SYAMV', INFO )
RETURN RETURN
END IF END IF
* *

View File

@ -147,6 +147,13 @@
INTRINSIC ABS INTRINSIC ABS
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
*
* Quick return if possible
*
IF( N.NE.2 .AND. N.NE.3 ) THEN
RETURN
END IF
*
IF( N.EQ.2 ) THEN IF( N.EQ.2 ) THEN
S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 ) ) S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 ) )
IF( S.EQ.ZERO ) THEN IF( S.EQ.ZERO ) THEN

View File

@ -220,9 +220,6 @@
LWKOPT_SYTRS = INT( WORK(1) ) LWKOPT_SYTRS = INT( WORK(1) )
LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS ) LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS )
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -106,6 +106,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -125,7 +126,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -151,6 +152,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -234,19 +236,18 @@
INFO = -3 INFO = -3
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
INFO = -5 INFO = -5
ELSE IF( LTB.LT.( 4*N ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -11 INFO = -11
ELSE IF( LWORK.LT.N .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
CALL SSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV, CALL SSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
$ IPIV2, WORK, -1, INFO ) $ IPIV2, WORK, -1, INFO )
LWKOPT = INT( WORK(1) ) LWKOPT = INT( WORK(1) )
IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -93,6 +93,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -112,7 +113,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -125,6 +126,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -641,6 +643,8 @@ c $ (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
* *
* Factor the band matrix * Factor the band matrix
CALL SGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO ) CALL SGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
*
RETURN
* *
* End of SSYTRF_AA_2STAGE * End of SSYTRF_AA_2STAGE
* *

View File

@ -96,11 +96,11 @@
*> LWORK is INTEGER *> LWORK is INTEGER
*> The dimension of the array WORK. *> The dimension of the array WORK.
*> WORK is size >= (N+NB+1)*(NB+3) *> WORK is size >= (N+NB+1)*(NB+3)
*> If LDWORK = -1, then a workspace query is assumed; the routine *> If LWORK = -1, then a workspace query is assumed; the routine
*> calculates: *> calculates:
*> - the optimal size of the WORK array, returns *> - the optimal size of the WORK array, returns
*> this value as the first entry of the WORK array, *> this value as the first entry of the WORK array,
*> - and no error message related to LDWORK is issued by XERBLA. *> - and no error message related to LWORK is issued by XERBLA.
*> \endverbatim *> \endverbatim
*> *>
*> \param[out] INFO *> \param[out] INFO

View File

@ -85,6 +85,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N. *> The size of the array TB. LTB >= 4*N.
*> \endverbatim *> \endverbatim
*> *>

View File

@ -27,7 +27,7 @@
* .. * ..
* .. Array Arguments .. * .. Array Arguments ..
* LOGICAL SELECT( * ) * LOGICAL SELECT( * )
* REAL T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), * REAL T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
* $ WORK( * ) * $ WORK( * )
* .. * ..
* *
@ -45,9 +45,9 @@
*> The right eigenvector x and the left eigenvector y of T corresponding *> The right eigenvector x and the left eigenvector y of T corresponding
*> to an eigenvalue w are defined by: *> to an eigenvalue w are defined by:
*> *>
*> T*x = w*x, (y**H)*T = w*(y**H) *> T*x = w*x, (y**T)*T = w*(y**T)
*> *>
*> where y**H denotes the conjugate transpose of y. *> where y**T denotes the transpose of the vector y.
*> The eigenvalues are not input to this routine, but are read directly *> The eigenvalues are not input to this routine, but are read directly
*> from the diagonal blocks of T. *> from the diagonal blocks of T.
*> *>
@ -251,14 +251,14 @@
* .. * ..
* .. Array Arguments .. * .. Array Arguments ..
LOGICAL SELECT( * ) LOGICAL SELECT( * )
REAL T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), REAL T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
$ WORK( * ) $ WORK( * )
* .. * ..
* *
* ===================================================================== * =====================================================================
* *
* .. Parameters .. * .. Parameters ..
REAL ZERO, ONE REAL ZERO, ONE
PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 ) PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
INTEGER NBMIN, NBMAX INTEGER NBMIN, NBMAX
PARAMETER ( NBMIN = 8, NBMAX = 128 ) PARAMETER ( NBMIN = 8, NBMAX = 128 )
@ -268,7 +268,7 @@
$ RIGHTV, SOMEV $ RIGHTV, SOMEV
INTEGER I, IERR, II, IP, IS, J, J1, J2, JNXT, K, KI, INTEGER I, IERR, II, IP, IS, J, J1, J2, JNXT, K, KI,
$ IV, MAXWRK, NB, KI2 $ IV, MAXWRK, NB, KI2
REAL BETA, BIGNUM, EMAX, OVFL, REC, REMAX, SCALE, REAL BETA, BIGNUM, EMAX, OVFL, REC, REMAX, SCALE,
$ SMIN, SMLNUM, ULP, UNFL, VCRIT, VMAX, WI, WR, $ SMIN, SMLNUM, ULP, UNFL, VCRIT, VMAX, WI, WR,
$ XNORM $ XNORM
* .. * ..

View File

@ -704,7 +704,7 @@
LWSVDJ = MAX( 2 * N, 1 ) LWSVDJ = MAX( 2 * N, 1 )
LWSVDJV = MAX( 2 * N, 1 ) LWSVDJV = MAX( 2 * N, 1 )
* .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ * .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ
LRWQP3 = N LRWQP3 = 2 * N
LRWCON = N LRWCON = N
LRWSVDJ = N LRWSVDJ = N
IF ( LQUERY ) THEN IF ( LQUERY ) THEN
@ -942,7 +942,7 @@
END IF END IF
END IF END IF
MINWRK = MAX( 2, MINWRK ) MINWRK = MAX( 2, MINWRK )
OPTWRK = MAX( 2, OPTWRK ) OPTWRK = MAX( MINWRK, OPTWRK )
IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17 IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17
IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19 IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19
END IF END IF

View File

@ -209,6 +209,8 @@
INFO = -5 INFO = -5
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -8 INFO = -8
ELSE IF( LWORK.LT.MAX(2*N, 3*N-2) .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
@ -219,9 +221,6 @@
LWKOPT_HETRS = INT( WORK(1) ) LWKOPT_HETRS = INT( WORK(1) )
LWKOPT = MAX( LWKOPT_HETRF, LWKOPT_HETRS ) LWKOPT = MAX( LWKOPT_HETRF, LWKOPT_HETRS )
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -106,6 +106,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -125,7 +126,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -151,6 +152,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -240,19 +242,18 @@
INFO = -3 INFO = -3
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
INFO = -5 INFO = -5
ELSE IF( LTB.LT.( 4*N ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -11 INFO = -11
ELSE IF( LWORK.LT.N .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
CALL ZHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV, CALL ZHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
$ IPIV2, WORK, -1, INFO ) $ IPIV2, WORK, -1, INFO )
LWKOPT = INT( WORK(1) ) LWKOPT = INT( WORK(1) )
IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -93,6 +93,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -112,7 +113,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -125,6 +126,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -657,6 +659,8 @@ c $ (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
* *
* Factor the band matrix * Factor the band matrix
CALL ZGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO ) CALL ZGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
*
RETURN
* *
* End of ZHETRF_AA_2STAGE * End of ZHETRF_AA_2STAGE
* *

View File

@ -69,7 +69,7 @@
*> *>
*> \param[in] A *> \param[in] A
*> \verbatim *> \verbatim
*> A is COMPLEX*16array, dimension (LDA,N) *> A is COMPLEX*16 array, dimension (LDA,N)
*> Details of factors computed by ZHETRF_AA_2STAGE. *> Details of factors computed by ZHETRF_AA_2STAGE.
*> \endverbatim *> \endverbatim
*> *>
@ -81,12 +81,13 @@
*> *>
*> \param[out] TB *> \param[out] TB
*> \verbatim *> \verbatim
*> TB is COMPLEX*16array, dimension (LTB) *> TB is COMPLEX*16 array, dimension (LTB)
*> Details of factors computed by ZHETRF_AA_2STAGE. *> Details of factors computed by ZHETRF_AA_2STAGE.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N. *> The size of the array TB. LTB >= 4*N.
*> \endverbatim *> \endverbatim
*> *>
@ -106,7 +107,7 @@
*> *>
*> \param[in,out] B *> \param[in,out] B
*> \verbatim *> \verbatim
*> B is COMPLEX*16array, dimension (LDB,NRHS) *> B is COMPLEX*16 array, dimension (LDB,NRHS)
*> On entry, the right hand side matrix B. *> On entry, the right hand side matrix B.
*> On exit, the solution matrix X. *> On exit, the solution matrix X.
*> \endverbatim *> \endverbatim

View File

@ -241,7 +241,7 @@
INFO = 10 INFO = 10
END IF END IF
IF( INFO.NE.0 )THEN IF( INFO.NE.0 )THEN
CALL XERBLA( 'DSYMV ', INFO ) CALL XERBLA( 'ZLA_SYAMV', INFO )
RETURN RETURN
END IF END IF
* *

View File

@ -142,6 +142,13 @@
CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
*
* Quick return if possible
*
IF( N.NE.2 .AND. N.NE.3 ) THEN
RETURN
END IF
*
IF( N.EQ.2 ) THEN IF( N.EQ.2 ) THEN
S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) )
IF( S.EQ.RZERO ) THEN IF( S.EQ.RZERO ) THEN

View File

@ -221,9 +221,6 @@
LWKOPT_SYTRS = INT( WORK(1) ) LWKOPT_SYTRS = INT( WORK(1) )
LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS ) LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS )
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT
IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
INFO = -10
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -105,6 +105,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -124,7 +125,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -150,6 +151,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -233,19 +235,18 @@
INFO = -3 INFO = -3
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
INFO = -5 INFO = -5
ELSE IF( LTB.LT.( 4*N ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -11 INFO = -11
ELSE IF( LWORK.LT.N .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF END IF
* *
IF( INFO.EQ.0 ) THEN IF( INFO.EQ.0 ) THEN
CALL ZSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV, CALL ZSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
$ IPIV2, WORK, -1, INFO ) $ IPIV2, WORK, -1, INFO )
LWKOPT = INT( WORK(1) ) LWKOPT = INT( WORK(1) )
IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
INFO = -7
ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
INFO = -13
END IF
END IF END IF
* *
IF( INFO.NE.0 ) THEN IF( INFO.NE.0 ) THEN

View File

@ -93,6 +93,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N, internally *> The size of the array TB. LTB >= 4*N, internally
*> used to select NB such that LTB >= (3*NB+1)*N. *> used to select NB such that LTB >= (3*NB+1)*N.
*> *>
@ -112,7 +113,7 @@
*> *>
*> \param[out] IPIV2 *> \param[out] IPIV2
*> \verbatim *> \verbatim
*> IPIV is INTEGER array, dimension (N) *> IPIV2 is INTEGER array, dimension (N)
*> On exit, it contains the details of the interchanges, i.e., *> On exit, it contains the details of the interchanges, i.e.,
*> the row and column k of T were interchanged with the *> the row and column k of T were interchanged with the
*> row and column IPIV(k). *> row and column IPIV(k).
@ -125,6 +126,7 @@
*> *>
*> \param[in] LWORK *> \param[in] LWORK
*> \verbatim *> \verbatim
*> LWORK is INTEGER
*> The size of WORK. LWORK >= N, internally used to select NB *> The size of WORK. LWORK >= N, internally used to select NB
*> such that LWORK >= N*NB. *> such that LWORK >= N*NB.
*> *>
@ -662,6 +664,8 @@ c $ (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
* *
* Factor the band matrix * Factor the band matrix
CALL ZGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO ) CALL ZGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
*
RETURN
* *
* End of ZSYTRF_AA_2STAGE * End of ZSYTRF_AA_2STAGE
* *

View File

@ -163,7 +163,7 @@
UPPER = LSAME( UPLO, 'U' ) UPPER = LSAME( UPLO, 'U' )
LQUERY = ( LWORK.EQ.-1 ) LQUERY = ( LWORK.EQ.-1 )
* Get blocksize * Get blocksize
NBMAX = ILAENV( 1, 'ZSYTRF', UPLO, N, -1, -1, -1 ) NBMAX = ILAENV( 1, 'ZSYTRI2', UPLO, N, -1, -1, -1 )
IF ( NBMAX .GE. N ) THEN IF ( NBMAX .GE. N ) THEN
MINSIZE = N MINSIZE = N
ELSE ELSE

View File

@ -85,6 +85,7 @@
*> *>
*> \param[in] LTB *> \param[in] LTB
*> \verbatim *> \verbatim
*> LTB is INTEGER
*> The size of the array TB. LTB >= 4*N. *> The size of the array TB. LTB >= 4*N.
*> \endverbatim *> \endverbatim
*> *>