LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ zsytri2()

subroutine zsytri2 ( character uplo,
integer n,
complex*16, dimension( lda, * ) a,
integer lda,
integer, dimension( * ) ipiv,
complex*16, dimension( * ) work,
integer lwork,
integer info )

ZSYTRI2

Download ZSYTRI2 + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> ZSYTRI2 computes the inverse of a COMPLEX*16 symmetric indefinite matrix
!> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
!> ZSYTRF. ZSYTRI2 sets the LEADING DIMENSION of the workspace
!> before calling ZSYTRI2X that actually computes the inverse.
!> 
Parameters
[in]UPLO
!>          UPLO is CHARACTER*1
!>          Specifies whether the details of the factorization are stored
!>          as an upper or lower triangular matrix.
!>          = 'U':  Upper triangular, form is A = U*D*U**T;
!>          = 'L':  Lower triangular, form is A = L*D*L**T.
!> 
[in]N
!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!> 
[in,out]A
!>          A is COMPLEX*16 array, dimension (LDA,N)
!>          On entry, the block diagonal matrix D and the multipliers
!>          used to obtain the factor U or L as computed by ZSYTRF.
!>
!>          On exit, if INFO = 0, the (symmetric) inverse of the original
!>          matrix.  If UPLO = 'U', the upper triangular part of the
!>          inverse is formed and the part of A below the diagonal is not
!>          referenced; if UPLO = 'L' the lower triangular part of the
!>          inverse is formed and the part of A above the diagonal is
!>          not referenced.
!> 
[in]LDA
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!> 
[in]IPIV
!>          IPIV is INTEGER array, dimension (N)
!>          Details of the interchanges and the block structure of D
!>          as determined by ZSYTRF.
!> 
[out]WORK
!>          WORK is COMPLEX*16 array, dimension (N+NB+1)*(NB+3)
!> 
[in]LWORK
!>          LWORK is INTEGER
!>          The dimension of the array WORK.
!>          WORK is size >= (N+NB+1)*(NB+3)
!>          If LDWORK = -1, then a workspace query is assumed; the routine
!>           calculates:
!>              - the optimal size of the WORK array, returns
!>          this value as the first entry of the WORK array,
!>              - and no error message related to LDWORK is issued by XERBLA.
!> 
[out]INFO
!>          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) = 0; the matrix is singular and its
!>               inverse could not be computed.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 124 of file zsytri2.f.

125*
126* -- LAPACK computational routine --
127* -- LAPACK is a software package provided by Univ. of Tennessee, --
128* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
129*
130* .. Scalar Arguments ..
131 CHARACTER UPLO
132 INTEGER INFO, LDA, LWORK, N
133* ..
134* .. Array Arguments ..
135 INTEGER IPIV( * )
136 COMPLEX*16 A( LDA, * ), WORK( * )
137* ..
138*
139* =====================================================================
140*
141* .. Local Scalars ..
142 LOGICAL UPPER, LQUERY
143 INTEGER MINSIZE, NBMAX
144* ..
145* .. External Functions ..
146 LOGICAL LSAME
147 INTEGER ILAENV
148 EXTERNAL lsame, ilaenv
149* ..
150* .. External Subroutines ..
151 EXTERNAL zsytri, zsytri2x, xerbla
152* ..
153* .. Executable Statements ..
154*
155* Test the input parameters.
156*
157 info = 0
158 upper = lsame( uplo, 'U' )
159 lquery = ( lwork.EQ.-1 )
160* Get blocksize
161 nbmax = ilaenv( 1, 'ZSYTRI2', uplo, n, -1, -1, -1 )
162 IF ( nbmax .GE. n ) THEN
163 minsize = n
164 ELSE
165 minsize = (n+nbmax+1)*(nbmax+3)
166 END IF
167*
168 IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
169 info = -1
170 ELSE IF( n.LT.0 ) THEN
171 info = -2
172 ELSE IF( lda.LT.max( 1, n ) ) THEN
173 info = -4
174 ELSE IF (lwork .LT. minsize .AND. .NOT.lquery ) THEN
175 info = -7
176 END IF
177*
178* Quick return if possible
179*
180*
181 IF( info.NE.0 ) THEN
182 CALL xerbla( 'ZSYTRI2', -info )
183 RETURN
184 ELSE IF( lquery ) THEN
185 work(1)=minsize
186 RETURN
187 END IF
188 IF( n.EQ.0 )
189 $ RETURN
190
191 IF( nbmax .GE. n ) THEN
192 CALL zsytri( uplo, n, a, lda, ipiv, work, info )
193 ELSE
194 CALL zsytri2x( uplo, n, a, lda, ipiv, work, nbmax, info )
195 END IF
196 RETURN
197*
198* End of ZSYTRI2
199*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine zsytri2x(uplo, n, a, lda, ipiv, work, nb, info)
ZSYTRI2X
Definition zsytri2x.f:118
subroutine zsytri(uplo, n, a, lda, ipiv, work, info)
ZSYTRI
Definition zsytri.f:112
integer function ilaenv(ispec, name, opts, n1, n2, n3, n4)
ILAENV
Definition ilaenv.f:160
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
Here is the call graph for this function:
Here is the caller graph for this function: