File:  [local] / rpl / lapack / lapack / dsytri2.f
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Dec 21 13:50:37 2010 UTC (13 years, 4 months ago) by bertrand
Branches: MAIN
CVS tags: HEAD
Mise à jour de Lapack vers la version 3.3.0.

    1:       SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
    2: *
    3: *  -- LAPACK routine (version 3.3.0) --
    4: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
    5: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
    6: *     November 2010
    7: *
    8: *  -- Written by Julie Langou of the Univ. of TN    --
    9: *
   10: *     .. Scalar Arguments ..
   11:       CHARACTER          UPLO
   12:       INTEGER            INFO, LDA, LWORK, N
   13: *     ..
   14: *     .. Array Arguments ..
   15:       INTEGER            IPIV( * )
   16:       DOUBLE PRECISION   A( LDA, * ), WORK( * )
   17: *     ..
   18: *
   19: *  Purpose
   20: *  =======
   21: *
   22: *  DSYTRI2 computes the inverse of a real symmetric indefinite matrix
   23: *  A using the factorization A = U*D*U**T or A = L*D*L**T computed by
   24: *  DSYTRF. DSYTRI2 sets the LEADING DIMENSION of the workspace
   25: *  before calling DSYTRI2X that actually computes the inverse.
   26: *
   27: *  Arguments
   28: *  =========
   29: *
   30: *  UPLO    (input) CHARACTER*1
   31: *          Specifies whether the details of the factorization are stored
   32: *          as an upper or lower triangular matrix.
   33: *          = 'U':  Upper triangular, form is A = U*D*U**T;
   34: *          = 'L':  Lower triangular, form is A = L*D*L**T.
   35: *
   36: *  N       (input) INTEGER
   37: *          The order of the matrix A.  N >= 0.
   38: *
   39: *  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
   40: *          On entry, the NB diagonal matrix D and the multipliers
   41: *          used to obtain the factor U or L as computed by DSYTRF.
   42: *
   43: *          On exit, if INFO = 0, the (symmetric) inverse of the original
   44: *          matrix.  If UPLO = 'U', the upper triangular part of the
   45: *          inverse is formed and the part of A below the diagonal is not
   46: *          referenced; if UPLO = 'L' the lower triangular part of the
   47: *          inverse is formed and the part of A above the diagonal is
   48: *          not referenced.
   49: *
   50: *  LDA     (input) INTEGER
   51: *          The leading dimension of the array A.  LDA >= max(1,N).
   52: *
   53: *  IPIV    (input) INTEGER array, dimension (N)
   54: *          Details of the interchanges and the NB structure of D
   55: *          as determined by DSYTRF.
   56: *
   57: *  WORK    (workspace) DOUBLE PRECISION array, dimension (N+NB+1)*(NB+3)
   58: *
   59: *  LWORK   (input) INTEGER
   60: *          The dimension of the array WORK.
   61: *          WORK is size >= (N+NB+1)*(NB+3)
   62: *          If LDWORK = -1, then a workspace query is assumed; the routine
   63: *           calculates:
   64: *              - the optimal size of the WORK array, returns
   65: *          this value as the first entry of the WORK array,
   66: *              - and no error message related to LDWORK is issued by XERBLA.
   67: *
   68: *  INFO    (output) INTEGER
   69: *          = 0: successful exit
   70: *          < 0: if INFO = -i, the i-th argument had an illegal value
   71: *          > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
   72: *               inverse could not be computed.
   73: *
   74: *  =====================================================================
   75: *
   76: *     .. Local Scalars ..
   77:       LOGICAL            UPPER, LQUERY
   78:       INTEGER            MINSIZE, NBMAX
   79: *     ..
   80: *     .. External Functions ..
   81:       LOGICAL            LSAME
   82:       INTEGER            ILAENV
   83:       EXTERNAL           LSAME, ILAENV
   84: *     ..
   85: *     .. External Subroutines ..
   86:       EXTERNAL           DSYTRI2X
   87: *     ..
   88: *     .. Executable Statements ..
   89: *
   90: *     Test the input parameters.
   91: *
   92:       INFO = 0
   93:       UPPER = LSAME( UPLO, 'U' )
   94:       LQUERY = ( LWORK.EQ.-1 )
   95: *     Get blocksize
   96:       NBMAX = ILAENV( 1, 'DSYTRF', UPLO, N, -1, -1, -1 )
   97:       MINSIZE = (N+NBMAX+1)*(NBMAX+3)
   98: *
   99:       IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
  100:          INFO = -1
  101:       ELSE IF( N.LT.0 ) THEN
  102:          INFO = -2
  103:       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
  104:          INFO = -4
  105:       ELSE IF (LWORK .LT. MINSIZE .AND. .NOT.LQUERY ) THEN
  106:          INFO = -7
  107:       END IF
  108: *
  109: *     Quick return if possible
  110: *
  111: *
  112:       IF( INFO.NE.0 ) THEN
  113:          CALL XERBLA( 'DSYTRI2', -INFO )
  114:          RETURN
  115:       ELSE IF( LQUERY ) THEN
  116:          WORK(1)=(N+NBMAX+1)*(NBMAX+3)
  117:          RETURN
  118:       END IF
  119:       IF( N.EQ.0 )
  120:      $   RETURN
  121:       
  122:       CALL DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NBMAX, INFO )
  123:       RETURN
  124: *
  125: *     End of DSYTRI2
  126: *
  127:       END

CVSweb interface <joel.bertrand@systella.fr>