--- rpl/lapack/lapack/zsytrs2.f 2012/12/14 14:22:55 1.7 +++ rpl/lapack/lapack/zsytrs2.f 2023/08/07 08:39:39 1.16 @@ -2,25 +2,25 @@ * * =========== DOCUMENTATION =========== * -* Online html documentation available at -* http://www.netlib.org/lapack/explore-html/ +* Online html documentation available at +* http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download ZSYTRS2 + dependencies -*> -*> [TGZ] -*> -*> [ZIP] -*> +*> Download ZSYTRS2 + dependencies +*> +*> [TGZ] +*> +*> [ZIP] +*> *> [TXT] -*> \endhtmlonly +*> \endhtmlonly * * Definition: * =========== * -* SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, +* SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, * WORK, INFO ) -* +* * .. Scalar Arguments .. * CHARACTER UPLO * INTEGER INFO, LDA, LDB, N, NRHS @@ -29,14 +29,14 @@ * INTEGER IPIV( * ) * COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ) * .. -* +* * *> \par Purpose: * ============= *> *> \verbatim *> -*> ZSYTRS2 solves a system of linear equations A*X = B with a real +*> ZSYTRS2 solves a system of linear equations A*X = B with a complex *> symmetric matrix A using the factorization A = U*D*U**T or *> A = L*D*L**T computed by ZSYTRF and converted by ZSYCONV. *> \endverbatim @@ -66,11 +66,16 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in] A +*> \param[in,out] A *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,N) *> The block diagonal matrix D and the multipliers used to *> obtain the factor U or L as computed by ZSYTRF. +*> Note that A is input / output. This might be counter-intuitive, +*> and one may think that A is input only. A is input / output. This +*> is because, at the start of the subroutine, we permute A in a +*> "better" form and then we permute A back to its original form at +*> the end. *> \endverbatim *> *> \param[in] LDA @@ -101,7 +106,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension (N) +*> WORK is COMPLEX*16 array, dimension (N) *> \endverbatim *> *> \param[out] INFO @@ -114,23 +119,20 @@ * Authors: * ======== * -*> \author Univ. of Tennessee -*> \author Univ. of California Berkeley -*> \author Univ. of Colorado Denver -*> \author NAG Ltd. -* -*> \date November 2011 +*> \author Univ. of Tennessee +*> \author Univ. of California Berkeley +*> \author Univ. of Colorado Denver +*> \author NAG Ltd. * *> \ingroup complex16SYcomputational * * ===================================================================== - SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, + SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, INFO ) * -* -- LAPACK computational routine (version 3.4.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..-- -* November 2011 * * .. Scalar Arguments .. CHARACTER UPLO @@ -195,7 +197,7 @@ * * Solve A*X = B, where A = U*D*U**T. * -* P**T * B +* P**T * B K=N DO WHILE ( K .GE. 1 ) IF( IPIV( K ).GT.0 ) THEN @@ -220,7 +222,7 @@ CALL ZTRSM('L','U','N','U',N,NRHS,ONE,A,LDA,B,LDB) * * Compute D \ B -> B [ D \ (U \P**T * B) ] -* +* I=N DO WHILE ( I .GE. 1 ) IF( IPIV(I) .GT. 0 ) THEN @@ -272,7 +274,7 @@ * * Solve A*X = B, where A = L*D*L**T. * -* P**T * B +* P**T * B K=1 DO WHILE ( K .LE. N ) IF( IPIV( K ).GT.0 ) THEN @@ -297,7 +299,7 @@ CALL ZTRSM('L','L','N','U',N,NRHS,ONE,A,LDA,B,LDB) * * Compute D \ B -> B [ D \ (L \P**T * B) ] -* +* I=1 DO WHILE ( I .LE. N ) IF( IPIV(I) .GT. 0 ) THEN @@ -319,7 +321,7 @@ END DO * * Compute (L**T \ B) -> B [ L**T \ (D \ (L \P**T * B) ) ] -* +* CALL ZTRSM('L','L','T','U',N,NRHS,ONE,A,LDA,B,LDB) * * P * B [ P * (L**T \ (D \ (L \P**T * B) )) ]