LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine zhetri2 ( character UPLO, integer N, complex*16, dimension( lda, * ) A, integer LDA, integer, dimension( * ) IPIV, complex*16, dimension( * ) WORK, integer LWORK, integer INFO )

ZHETRI2

Purpose:
``` ZHETRI2 computes the inverse of a COMPLEX*16 hermitian indefinite matrix
A using the factorization A = U*D*U**T or A = L*D*L**T computed by
ZHETRF. ZHETRI2 set the LEADING DIMENSION of the workspace
before calling ZHETRI2X 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 NB diagonal matrix D and the multipliers used to obtain the factor U or L as computed by ZHETRF. 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 NB structure of D as determined by ZHETRF.``` [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 LWORK = -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 LWORK 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.```
Date
November 2015

Definition at line 129 of file zhetri2.f.

129 *
130 * -- LAPACK computational routine (version 3.6.0) --
131 * -- LAPACK is a software package provided by Univ. of Tennessee, --
132 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
133 * November 2015
134 *
135 * .. Scalar Arguments ..
136  CHARACTER uplo
137  INTEGER info, lda, lwork, n
138 * ..
139 * .. Array Arguments ..
140  INTEGER ipiv( * )
141  COMPLEX*16 a( lda, * ), work( * )
142 * ..
143 *
144 * =====================================================================
145 *
146 * .. Local Scalars ..
147  LOGICAL upper, lquery
148  INTEGER minsize, nbmax
149 * ..
150 * .. External Functions ..
151  LOGICAL lsame
152  INTEGER ilaenv
153  EXTERNAL lsame, ilaenv
154 * ..
155 * .. External Subroutines ..
156  EXTERNAL zhetri2x
157 * ..
158 * .. Executable Statements ..
159 *
160 * Test the input parameters.
161 *
162  info = 0
163  upper = lsame( uplo, 'U' )
164  lquery = ( lwork.EQ.-1 )
165 * Get blocksize
166  nbmax = ilaenv( 1, 'ZHETRF', uplo, n, -1, -1, -1 )
167  IF ( nbmax .GE. n ) THEN
168  minsize = n
169  ELSE
170  minsize = (n+nbmax+1)*(nbmax+3)
171  END IF
172 *
173  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
174  info = -1
175  ELSE IF( n.LT.0 ) THEN
176  info = -2
177  ELSE IF( lda.LT.max( 1, n ) ) THEN
178  info = -4
179  ELSE IF (lwork .LT. minsize .AND. .NOT.lquery ) THEN
180  info = -7
181  END IF
182 *
183 * Quick return if possible
184 *
185 *
186  IF( info.NE.0 ) THEN
187  CALL xerbla( 'ZHETRI2', -info )
188  RETURN
189  ELSE IF( lquery ) THEN
190  work(1)=minsize
191  RETURN
192  END IF
193  IF( n.EQ.0 )
194  \$ RETURN
195
196  IF( nbmax .GE. n ) THEN
197  CALL zhetri( uplo, n, a, lda, ipiv, work, info )
198  ELSE
199  CALL zhetri2x( uplo, n, a, lda, ipiv, work, nbmax, info )
200  END IF
201  RETURN
202 *
203 * End of ZHETRI2
204 *
subroutine zhetri2x(UPLO, N, A, LDA, IPIV, WORK, NB, INFO)
ZHETRI2X
Definition: zhetri2x.f:122
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine zhetri(UPLO, N, A, LDA, IPIV, WORK, INFO)
ZHETRI
Definition: zhetri.f:116
integer function ilaenv(ISPEC, NAME, OPTS, N1, N2, N3, N4)
Definition: tstiee.f:83
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: