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

CSYTRI2

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

Purpose:
 CSYTRI2 computes the inverse of a COMPLEX symmetric indefinite matrix
 A using the factorization A = U*D*U**T or A = L*D*L**T computed by
 CSYTRF. CSYTRI2 sets the LEADING DIMENSION of the workspace
 before calling CSYTRI2X 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 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 CSYTRF.

          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 CSYTRF.
[out]WORK
          WORK is COMPLEX 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.
Date
November 2015

Definition at line 129 of file csytri2.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 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 csytri, csytri2x
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, 'CSYTRF', 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( 'CSYTRI2', -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 csytri( uplo, n, a, lda, ipiv, work, info )
198  ELSE
199  CALL csytri2x( uplo, n, a, lda, ipiv, work, nbmax, info )
200  END IF
201  RETURN
202 *
203 * End of CSYTRI2
204 *
subroutine csytri2x(UPLO, N, A, LDA, IPIV, WORK, NB, INFO)
CSYTRI2X
Definition: csytri2x.f:122
subroutine csytri(UPLO, N, A, LDA, IPIV, WORK, INFO)
CSYTRI
Definition: csytri.f:116
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
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: