3 /* Subroutine */ int dpotri_(char *uplo, integer *n, doublereal *a, integer *
6 /* System generated locals */
7 integer a_dim1, a_offset, i__1;
10 extern logical lsame_(char *, char *);
11 extern /* Subroutine */ int xerbla_(char *, integer *), dlauum_(
12 char *, integer *, doublereal *, integer *, integer *),
13 dtrtri_(char *, char *, integer *, doublereal *, integer *,
17 /* -- LAPACK routine (version 3.1) -- */
18 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
21 /* .. Scalar Arguments .. */
23 /* .. Array Arguments .. */
29 /* DPOTRI computes the inverse of a real symmetric positive definite */
30 /* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T */
31 /* computed by DPOTRF. */
36 /* UPLO (input) CHARACTER*1 */
37 /* = 'U': Upper triangle of A is stored; */
38 /* = 'L': Lower triangle of A is stored. */
40 /* N (input) INTEGER */
41 /* The order of the matrix A. N >= 0. */
43 /* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
44 /* On entry, the triangular factor U or L from the Cholesky */
45 /* factorization A = U**T*U or A = L*L**T, as computed by */
47 /* On exit, the upper or lower triangle of the (symmetric) */
48 /* inverse of A, overwriting the input factor U or L. */
50 /* LDA (input) INTEGER */
51 /* The leading dimension of the array A. LDA >= max(1,N). */
53 /* INFO (output) INTEGER */
54 /* = 0: successful exit */
55 /* < 0: if INFO = -i, the i-th argument had an illegal value */
56 /* > 0: if INFO = i, the (i,i) element of the factor U or L is */
57 /* zero, and the inverse could not be computed. */
59 /* ===================================================================== */
61 /* .. External Functions .. */
63 /* .. External Subroutines .. */
65 /* .. Intrinsic Functions .. */
67 /* .. Executable Statements .. */
69 /* Test the input parameters. */
71 /* Parameter adjustments */
73 a_offset = 1 + a_dim1;
78 if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
82 } else if (*lda < max(1,*n)) {
87 xerbla_("DPOTRI", &i__1);
91 /* Quick return if possible */
97 /* Invert the triangular Cholesky factor U or L. */
99 dtrtri_(uplo, "Non-unit", n, &a[a_offset], lda, info);
104 /* Form inv(U)*inv(U)' or inv(L)'*inv(L). */
106 dlauum_(uplo, n, &a[a_offset], lda, info);