01:       SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
02: *
03: *  -- LAPACK routine (version 3.2) --
04: *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
05: *     November 2006
06: *
07: *     .. Scalar Arguments ..
08:       CHARACTER          UPLO
09:       INTEGER            INFO, LDA, N
10: *     ..
11: *     .. Array Arguments ..
12:       COMPLEX*16         A( LDA, * )
13: *     ..
14: *
15: *  Purpose
16: *  =======
17: *
18: *  ZPOTRI computes the inverse of a complex Hermitian positive definite
19: *  matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
20: *  computed by ZPOTRF.
21: *
22: *  Arguments
23: *  =========
24: *
25: *  UPLO    (input) CHARACTER*1
26: *          = 'U':  Upper triangle of A is stored;
27: *          = 'L':  Lower triangle of A is stored.
28: *
29: *  N       (input) INTEGER
30: *          The order of the matrix A.  N >= 0.
31: *
32: *  A       (input/output) COMPLEX*16 array, dimension (LDA,N)
33: *          On entry, the triangular factor U or L from the Cholesky
34: *          factorization A = U**H*U or A = L*L**H, as computed by
35: *          ZPOTRF.
36: *          On exit, the upper or lower triangle of the (Hermitian)
37: *          inverse of A, overwriting the input factor U or L.
38: *
39: *  LDA     (input) INTEGER
40: *          The leading dimension of the array A.  LDA >= max(1,N).
41: *
42: *  INFO    (output) INTEGER
43: *          = 0:  successful exit
44: *          < 0:  if INFO = -i, the i-th argument had an illegal value
45: *          > 0:  if INFO = i, the (i,i) element of the factor U or L is
46: *                zero, and the inverse could not be computed.
47: *
48: *  =====================================================================
49: *
50: *     .. External Functions ..
51:       LOGICAL            LSAME
52:       EXTERNAL           LSAME
53: *     ..
54: *     .. External Subroutines ..
55:       EXTERNAL           XERBLA, ZLAUUM, ZTRTRI
56: *     ..
57: *     .. Intrinsic Functions ..
58:       INTRINSIC          MAX
59: *     ..
60: *     .. Executable Statements ..
61: *
62: *     Test the input parameters.
63: *
64:       INFO = 0
65:       IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
66:          INFO = -1
67:       ELSE IF( N.LT.0 ) THEN
68:          INFO = -2
69:       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
70:          INFO = -4
71:       END IF
72:       IF( INFO.NE.0 ) THEN
73:          CALL XERBLA( 'ZPOTRI', -INFO )
74:          RETURN
75:       END IF
76: *
77: *     Quick return if possible
78: *
79:       IF( N.EQ.0 )
80:      \$   RETURN
81: *
82: *     Invert the triangular Cholesky factor U or L.
83: *
84:       CALL ZTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO )
85:       IF( INFO.GT.0 )
86:      \$   RETURN
87: *
88: *     Form inv(U)*inv(U)' or inv(L)'*inv(L).
89: *
90:       CALL ZLAUUM( UPLO, N, A, LDA, INFO )
91: *
92:       RETURN
93: *
94: *     End of ZPOTRI
95: *
96:       END
97: