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

DSYTRI2

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

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

          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 DSYTRF.
[out]WORK
          WORK is DOUBLE PRECISION 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 dsytri2.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  DOUBLE PRECISION 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 dsytri, dsytri2x
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, 'DSYTRF', 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( 'DSYTRI2', -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 dsytri( uplo, n, a, lda, ipiv, work, info )
198  ELSE
199  CALL dsytri2x( uplo, n, a, lda, ipiv, work, nbmax, info )
200  END IF
201  RETURN
202 *
203 * End of DSYTRI2
204 *
subroutine dsytri(UPLO, N, A, LDA, IPIV, WORK, INFO)
DSYTRI
Definition: dsytri.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
subroutine dsytri2x(UPLO, N, A, LDA, IPIV, WORK, NB, INFO)
DSYTRI2X
Definition: dsytri2x.f:122

Here is the call graph for this function:

Here is the caller graph for this function: