3 /* Subroutine */ int spotri_(char *uplo, integer *n, real *a, integer *lda,
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 *), slauum_(
12 char *, integer *, real *, integer *, integer *), strtri_(
13 char *, char *, integer *, real *, integer *, integer *);
16 /* -- LAPACK routine (version 3.1) -- */
17 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
20 /* .. Scalar Arguments .. */
22 /* .. Array Arguments .. */
28 /* SPOTRI computes the inverse of a real symmetric positive definite */
29 /* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T */
30 /* computed by SPOTRF. */
35 /* UPLO (input) CHARACTER*1 */
36 /* = 'U': Upper triangle of A is stored; */
37 /* = 'L': Lower triangle of A is stored. */
39 /* N (input) INTEGER */
40 /* The order of the matrix A. N >= 0. */
42 /* A (input/output) REAL array, dimension (LDA,N) */
43 /* On entry, the triangular factor U or L from the Cholesky */
44 /* factorization A = U**T*U or A = L*L**T, as computed by */
46 /* On exit, the upper or lower triangle of the (symmetric) */
47 /* inverse of A, overwriting the input factor U or L. */
49 /* LDA (input) INTEGER */
50 /* The leading dimension of the array A. LDA >= max(1,N). */
52 /* INFO (output) INTEGER */
53 /* = 0: successful exit */
54 /* < 0: if INFO = -i, the i-th argument had an illegal value */
55 /* > 0: if INFO = i, the (i,i) element of the factor U or L is */
56 /* zero, and the inverse could not be computed. */
58 /* ===================================================================== */
60 /* .. External Functions .. */
62 /* .. External Subroutines .. */
64 /* .. Intrinsic Functions .. */
66 /* .. Executable Statements .. */
68 /* Test the input parameters. */
70 /* Parameter adjustments */
72 a_offset = 1 + a_dim1;
77 if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
81 } else if (*lda < max(1,*n)) {
86 xerbla_("SPOTRI", &i__1);
90 /* Quick return if possible */
96 /* Invert the triangular Cholesky factor U or L. */
98 strtri_(uplo, "Non-unit", n, &a[a_offset], lda, info);
103 /* Form inv(U)*inv(U)' or inv(L)'*inv(L). */
105 slauum_(uplo, n, &a[a_offset], lda, info);