--- rpl/lapack/lapack/zsytrf_aa.f 2017/06/17 11:02:56 1.1 +++ rpl/lapack/lapack/zsytrf_aa.f 2023/08/07 08:39:39 1.6 @@ -37,7 +37,7 @@ *> ZSYTRF_AA computes the factorization of a complex symmetric matrix A *> using the Aasen's algorithm. The form of the factorization is *> -*> A = U*T*U**T or A = L*T*L**T +*> A = U**T*T*U or A = L*T*L**T *> *> where U (or L) is a product of permutation and unit upper (lower) *> triangular matrices, and T is a complex symmetric tridiagonal matrix. @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -129,17 +125,14 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 -* *> \ingroup complex16SYcomputational * * ===================================================================== SUBROUTINE ZSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 * IMPLICIT NONE * @@ -159,7 +152,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB COMPLEX*16 ALPHA * .. @@ -169,7 +162,8 @@ EXTERNAL LSAME, ILAENV * .. * .. External Subroutines .. - EXTERNAL XERBLA + EXTERNAL ZLASYF_AA, ZGEMM, ZGEMV, ZSCAL, ZCOPY, + $ ZSWAP, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MAX @@ -178,7 +172,7 @@ * * Determine the block size * - NB = ILAENV( 1, 'ZSYTRF', UPLO, N, -1, -1, -1 ) + NB = ILAENV( 1, 'ZSYTRF_AA', UPLO, N, -1, -1, -1 ) * * Test the input parameters. * @@ -214,13 +208,10 @@ ENDIF IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -229,7 +220,7 @@ IF( UPPER ) THEN * * ..................................................... -* Factorize A as L*D*L**T using the upper triangle of A +* Factorize A as U**T*D*U using the upper triangle of A * ..................................................... * * Copy first row A(1, 1:N) into H(1:n) (stored in WORK(1:N)) @@ -260,13 +251,9 @@ * CALL ZLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * -* Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) +* Adjust IPIV and apply it back (J-th step picks (J+1)-th pivot) * DO J2 = J+2, MIN(N, J+JB+1) IPIV( J2 ) = IPIV( J2 ) + J @@ -383,12 +370,9 @@ * CALL ZLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * -* Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) +* Adjust IPIV and apply it back (J-th step picks (J+1)-th pivot) * DO J2 = J+2, MIN(N, J+JB+1) IPIV( J2 ) = IPIV( J2 ) + J @@ -473,6 +457,7 @@ END IF * 20 CONTINUE + WORK( 1 ) = LWKOPT RETURN * * End of ZSYTRF_AA