LAPACK 3.3.1
Linear Algebra PACKage

zpotri.f

Go to the documentation of this file.
00001       SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
00002 *
00003 *  -- LAPACK routine (version 3.3.1) --
00004 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00005 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00006 *  -- April 2011                                                      --
00007 *
00008 *     .. Scalar Arguments ..
00009       CHARACTER          UPLO
00010       INTEGER            INFO, LDA, N
00011 *     ..
00012 *     .. Array Arguments ..
00013       COMPLEX*16         A( LDA, * )
00014 *     ..
00015 *
00016 *  Purpose
00017 *  =======
00018 *
00019 *  ZPOTRI computes the inverse of a complex Hermitian positive definite
00020 *  matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
00021 *  computed by ZPOTRF.
00022 *
00023 *  Arguments
00024 *  =========
00025 *
00026 *  UPLO    (input) CHARACTER*1
00027 *          = 'U':  Upper triangle of A is stored;
00028 *          = 'L':  Lower triangle of A is stored.
00029 *
00030 *  N       (input) INTEGER
00031 *          The order of the matrix A.  N >= 0.
00032 *
00033 *  A       (input/output) COMPLEX*16 array, dimension (LDA,N)
00034 *          On entry, the triangular factor U or L from the Cholesky
00035 *          factorization A = U**H*U or A = L*L**H, as computed by
00036 *          ZPOTRF.
00037 *          On exit, the upper or lower triangle of the (Hermitian)
00038 *          inverse of A, overwriting the input factor U or L.
00039 *
00040 *  LDA     (input) INTEGER
00041 *          The leading dimension of the array A.  LDA >= max(1,N).
00042 *
00043 *  INFO    (output) INTEGER
00044 *          = 0:  successful exit
00045 *          < 0:  if INFO = -i, the i-th argument had an illegal value
00046 *          > 0:  if INFO = i, the (i,i) element of the factor U or L is
00047 *                zero, and the inverse could not be computed.
00048 *
00049 *  =====================================================================
00050 *
00051 *     .. External Functions ..
00052       LOGICAL            LSAME
00053       EXTERNAL           LSAME
00054 *     ..
00055 *     .. External Subroutines ..
00056       EXTERNAL           XERBLA, ZLAUUM, ZTRTRI
00057 *     ..
00058 *     .. Intrinsic Functions ..
00059       INTRINSIC          MAX
00060 *     ..
00061 *     .. Executable Statements ..
00062 *
00063 *     Test the input parameters.
00064 *
00065       INFO = 0
00066       IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
00067          INFO = -1
00068       ELSE IF( N.LT.0 ) THEN
00069          INFO = -2
00070       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
00071          INFO = -4
00072       END IF
00073       IF( INFO.NE.0 ) THEN
00074          CALL XERBLA( 'ZPOTRI', -INFO )
00075          RETURN
00076       END IF
00077 *
00078 *     Quick return if possible
00079 *
00080       IF( N.EQ.0 )
00081      $   RETURN
00082 *
00083 *     Invert the triangular Cholesky factor U or L.
00084 *
00085       CALL ZTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO )
00086       IF( INFO.GT.0 )
00087      $   RETURN
00088 *
00089 *     Form inv(U) * inv(U)**H or inv(L)**H * inv(L).
00090 *
00091       CALL ZLAUUM( UPLO, N, A, LDA, INFO )
00092 *
00093       RETURN
00094 *
00095 *     End of ZPOTRI
00096 *
00097       END
 All Files Functions