comparison libcruft/lapack/cpotri.f @ 7789:82be108cc558

First attempt at single precision tyeps * * * corrections to qrupdate single precision routines * * * prefer demotion to single over promotion to double * * * Add single precision support to log2 function * * * Trivial PROJECT file update * * * Cache optimized hermitian/transpose methods * * * Add tests for tranpose/hermitian and ChangeLog entry for new transpose code
author David Bateman <dbateman@free.fr>
date Sun, 27 Apr 2008 22:34:17 +0200
parents
children
comparison
equal deleted inserted replaced
7788:45f5faba05a2 7789:82be108cc558
1 SUBROUTINE CPOTRI( UPLO, N, A, LDA, INFO )
2 *
3 * -- LAPACK routine (version 3.1) --
4 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
5 * November 2006
6 *
7 * .. Scalar Arguments ..
8 CHARACTER UPLO
9 INTEGER INFO, LDA, N
10 * ..
11 * .. Array Arguments ..
12 COMPLEX A( LDA, * )
13 * ..
14 *
15 * Purpose
16 * =======
17 *
18 * CPOTRI 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 CPOTRF.
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 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 * CPOTRF.
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 CLAUUM, CTRTRI, XERBLA
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( 'CPOTRI', -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 CTRTRI( 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 CLAUUM( UPLO, N, A, LDA, INFO )
91 *
92 RETURN
93 *
94 * End of CPOTRI
95 *
96 END