annotate libcruft/lapack/zpotri.f @ 5340:15843d76156d

[project @ 2005-05-06 16:26:58 by jwe]
author jwe
date Fri, 06 May 2005 16:26:59 +0000
parents
children 68db500cb558
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5340
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
1 SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
2 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
3 * -- LAPACK routine (version 3.0) --
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
4 * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
5 * Courant Institute, Argonne National Lab, and Rice University
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
6 * March 31, 1993
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
7 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
8 * .. Scalar Arguments ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
9 CHARACTER UPLO
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
10 INTEGER INFO, LDA, N
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
11 * ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
12 * .. Array Arguments ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
13 COMPLEX*16 A( LDA, * )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
14 * ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
15 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
16 * Purpose
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
17 * =======
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
18 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
19 * ZPOTRI computes the inverse of a complex Hermitian positive definite
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
20 * matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
21 * computed by ZPOTRF.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
22 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
23 * Arguments
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
24 * =========
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
25 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
26 * UPLO (input) CHARACTER*1
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
27 * = 'U': Upper triangle of A is stored;
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
28 * = 'L': Lower triangle of A is stored.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
29 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
30 * N (input) INTEGER
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
31 * The order of the matrix A. N >= 0.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
32 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
33 * A (input/output) COMPLEX*16 array, dimension (LDA,N)
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
34 * On entry, the triangular factor U or L from the Cholesky
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
35 * factorization A = U**H*U or A = L*L**H, as computed by
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
36 * ZPOTRF.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
37 * On exit, the upper or lower triangle of the (Hermitian)
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
38 * inverse of A, overwriting the input factor U or L.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
39 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
40 * LDA (input) INTEGER
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
41 * The leading dimension of the array A. LDA >= max(1,N).
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
42 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
43 * INFO (output) INTEGER
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
44 * = 0: successful exit
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
45 * < 0: if INFO = -i, the i-th argument had an illegal value
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
46 * > 0: if INFO = i, the (i,i) element of the factor U or L is
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
47 * zero, and the inverse could not be computed.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
48 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
49 * =====================================================================
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
50 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
51 * .. External Functions ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
52 LOGICAL LSAME
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
53 EXTERNAL LSAME
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
54 * ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
55 * .. External Subroutines ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
56 EXTERNAL XERBLA, ZLAUUM, ZTRTRI
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
57 * ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
58 * .. Intrinsic Functions ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
59 INTRINSIC MAX
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
60 * ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
61 * .. Executable Statements ..
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
62 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
63 * Test the input parameters.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
64 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
65 INFO = 0
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
66 IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
67 INFO = -1
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
68 ELSE IF( N.LT.0 ) THEN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
69 INFO = -2
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
70 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
71 INFO = -4
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
72 END IF
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
73 IF( INFO.NE.0 ) THEN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
74 CALL XERBLA( 'ZPOTRI', -INFO )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
75 RETURN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
76 END IF
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
77 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
78 * Quick return if possible
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
79 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
80 IF( N.EQ.0 )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
81 $ RETURN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
82 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
83 * Invert the triangular Cholesky factor U or L.
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
84 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
85 CALL ZTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
86 IF( INFO.GT.0 )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
87 $ RETURN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
88 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
89 * Form inv(U)*inv(U)' or inv(L)'*inv(L).
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
90 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
91 CALL ZLAUUM( UPLO, N, A, LDA, INFO )
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
92 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
93 RETURN
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
94 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
95 * End of ZPOTRI
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
96 *
15843d76156d [project @ 2005-05-06 16:26:58 by jwe]
jwe
parents:
diff changeset
97 END