Merge pull request #1585 from martin-frbg/lapack-253

Fixes from Lapack-Reference PR 253
This commit is contained in:
Martin Kroeker 2018-06-01 18:59:33 +02:00 committed by GitHub
commit 401adddb2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 178 additions and 124 deletions

View File

@ -41,7 +41,7 @@ lapack_int LAPACKE_chetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_chetrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); LAPACK_chetrf_aa( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -56,7 +56,7 @@ lapack_int LAPACKE_chetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_chetrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); LAPACK_chetrf_aa( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -69,7 +69,7 @@ lapack_int LAPACKE_chetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_chetrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); LAPACK_chetrf_aa( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -41,7 +41,7 @@ lapack_int LAPACKE_csytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_csytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); LAPACK_csytrf_aa( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -56,7 +56,7 @@ lapack_int LAPACKE_csytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_csytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); LAPACK_csytrf_aa( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -69,7 +69,7 @@ lapack_int LAPACKE_csytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_csytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); LAPACK_csytrf_aa( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -40,7 +40,7 @@ lapack_int LAPACKE_dsytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dsytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); LAPACK_dsytrf_aa( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -55,7 +55,7 @@ lapack_int LAPACKE_dsytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_dsytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); LAPACK_dsytrf_aa( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -67,7 +67,7 @@ lapack_int LAPACKE_dsytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dsytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); LAPACK_dsytrf_aa( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -40,7 +40,7 @@ lapack_int LAPACKE_ssytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_ssytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); LAPACK_ssytrf_aa( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -55,7 +55,7 @@ lapack_int LAPACKE_ssytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_ssytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); LAPACK_ssytrf_aa( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -67,7 +67,7 @@ lapack_int LAPACKE_ssytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_ssytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); LAPACK_ssytrf_aa( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -41,7 +41,7 @@ lapack_int LAPACKE_zhetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_zhetrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); LAPACK_zhetrf_aa( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -56,7 +56,7 @@ lapack_int LAPACKE_zhetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_zhetrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); LAPACK_zhetrf_aa( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -69,7 +69,7 @@ lapack_int LAPACKE_zhetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_zhetrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); LAPACK_zhetrf_aa( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -41,7 +41,7 @@ lapack_int LAPACKE_zsytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_zsytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); LAPACK_zsytrf_aa( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -56,7 +56,7 @@ lapack_int LAPACKE_zsytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_zsytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); LAPACK_zsytrf_aa( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -69,7 +69,7 @@ lapack_int LAPACKE_zsytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_zsytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); LAPACK_zsytrf_aa( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

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
*> *>

View File

@ -218,7 +218,7 @@
* .. * ..
* .. External Subroutines .. * .. External Subroutines ..
EXTERNAL ALAERH, ALAHD, ALASUM, DERRSY, DLACPY, DLARHS, EXTERNAL ALAERH, ALAHD, ALASUM, DERRSY, DLACPY, DLARHS,
$ DLATB4, DLATMS, DPOT02, DSYTRF_AA_2STAGE $ DLATB4, DLATMS, DPOT02, DSYTRF_AA_2STAGE,
$ DSYTRS_AA_2STAGE, XLAENV $ DSYTRS_AA_2STAGE, XLAENV
* .. * ..
* .. Intrinsic Functions .. * .. Intrinsic Functions ..

View File

@ -204,7 +204,7 @@
* .. External Subroutines .. * .. External Subroutines ..
EXTERNAL ALADHD, ALAERH, ALASVM, XLAENV, DERRVX, EXTERNAL ALADHD, ALAERH, ALASVM, XLAENV, DERRVX,
$ DGET04, DLACPY, DLARHS, DLATB4, DLATMS, $ DGET04, DLACPY, DLARHS, DLATB4, DLATMS,
$ DSYSV_AA_2STAGE, CHET01_AA, DPOT02, $ DSYSV_AA_2STAGE, DPOT02,
$ DSYTRF_AA_2STAGE $ DSYTRF_AA_2STAGE
* .. * ..
* .. Scalars in Common .. * .. Scalars in Common ..

View File

@ -203,7 +203,7 @@
* .. * ..
* .. External Subroutines .. * .. External Subroutines ..
EXTERNAL ALADHD, ALAERH, ALASVM, XLAENV, SERRVX, EXTERNAL ALADHD, ALAERH, ALASVM, XLAENV, SERRVX,
$ CGET04, SLACPY, SLARHS, SLATB4, SLATMS, $ SLACPY, SLARHS, SLATB4, SLATMS,
$ SSYSV_AA_2STAGE, SSYT01_AA, SPOT02, $ SSYSV_AA_2STAGE, SSYT01_AA, SPOT02,
$ SSYTRF_AA_2STAGE $ SSYTRF_AA_2STAGE
* .. * ..

View File

@ -217,8 +217,8 @@
DOUBLE PRECISION RESULT( NTESTS ) DOUBLE PRECISION RESULT( NTESTS )
* .. * ..
* .. External Subroutines .. * .. External Subroutines ..
EXTERNAL ALAERH, ALAHD, ALASUM, CERRSY, ZLACPY, ZLARHS, EXTERNAL ALAERH, ALAHD, ALASUM, ZERRSY, ZLACPY, ZLARHS,
$ CLATB4, ZLATMS, ZSYT02, ZSYT01, $ ZLATB4, ZLATMS, ZSYT02, ZSYT01,
$ ZSYTRF_AA_2STAGE, ZSYTRS_AA_2STAGE, $ ZSYTRF_AA_2STAGE, ZSYTRS_AA_2STAGE,
$ XLAENV $ XLAENV
* .. * ..