![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b CPOTRI 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download CPOTRI + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cpotri.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cpotri.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cpotri.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE CPOTRI( UPLO, N, A, LDA, INFO ) 00022 * 00023 * .. Scalar Arguments .. 00024 * CHARACTER UPLO 00025 * INTEGER INFO, LDA, N 00026 * .. 00027 * .. Array Arguments .. 00028 * COMPLEX A( LDA, * ) 00029 * .. 00030 * 00031 * 00032 *> \par Purpose: 00033 * ============= 00034 *> 00035 *> \verbatim 00036 *> 00037 *> CPOTRI computes the inverse of a complex Hermitian positive definite 00038 *> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H 00039 *> computed by CPOTRF. 00040 *> \endverbatim 00041 * 00042 * Arguments: 00043 * ========== 00044 * 00045 *> \param[in] UPLO 00046 *> \verbatim 00047 *> UPLO is CHARACTER*1 00048 *> = 'U': Upper triangle of A is stored; 00049 *> = 'L': Lower triangle of A is stored. 00050 *> \endverbatim 00051 *> 00052 *> \param[in] N 00053 *> \verbatim 00054 *> N is INTEGER 00055 *> The order of the matrix A. N >= 0. 00056 *> \endverbatim 00057 *> 00058 *> \param[in,out] A 00059 *> \verbatim 00060 *> A is COMPLEX array, dimension (LDA,N) 00061 *> On entry, the triangular factor U or L from the Cholesky 00062 *> factorization A = U**H*U or A = L*L**H, as computed by 00063 *> CPOTRF. 00064 *> On exit, the upper or lower triangle of the (Hermitian) 00065 *> inverse of A, overwriting the input factor U or L. 00066 *> \endverbatim 00067 *> 00068 *> \param[in] LDA 00069 *> \verbatim 00070 *> LDA is INTEGER 00071 *> The leading dimension of the array A. LDA >= max(1,N). 00072 *> \endverbatim 00073 *> 00074 *> \param[out] INFO 00075 *> \verbatim 00076 *> INFO is INTEGER 00077 *> = 0: successful exit 00078 *> < 0: if INFO = -i, the i-th argument had an illegal value 00079 *> > 0: if INFO = i, the (i,i) element of the factor U or L is 00080 *> zero, and the inverse could not be computed. 00081 *> \endverbatim 00082 * 00083 * Authors: 00084 * ======== 00085 * 00086 *> \author Univ. of Tennessee 00087 *> \author Univ. of California Berkeley 00088 *> \author Univ. of Colorado Denver 00089 *> \author NAG Ltd. 00090 * 00091 *> \date November 2011 00092 * 00093 *> \ingroup complexPOcomputational 00094 * 00095 * ===================================================================== 00096 SUBROUTINE CPOTRI( UPLO, N, A, LDA, INFO ) 00097 * 00098 * -- LAPACK computational routine (version 3.4.0) -- 00099 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00100 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00101 * November 2011 00102 * 00103 * .. Scalar Arguments .. 00104 CHARACTER UPLO 00105 INTEGER INFO, LDA, N 00106 * .. 00107 * .. Array Arguments .. 00108 COMPLEX A( LDA, * ) 00109 * .. 00110 * 00111 * ===================================================================== 00112 * 00113 * .. External Functions .. 00114 LOGICAL LSAME 00115 EXTERNAL LSAME 00116 * .. 00117 * .. External Subroutines .. 00118 EXTERNAL CLAUUM, CTRTRI, XERBLA 00119 * .. 00120 * .. Intrinsic Functions .. 00121 INTRINSIC MAX 00122 * .. 00123 * .. Executable Statements .. 00124 * 00125 * Test the input parameters. 00126 * 00127 INFO = 0 00128 IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN 00129 INFO = -1 00130 ELSE IF( N.LT.0 ) THEN 00131 INFO = -2 00132 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN 00133 INFO = -4 00134 END IF 00135 IF( INFO.NE.0 ) THEN 00136 CALL XERBLA( 'CPOTRI', -INFO ) 00137 RETURN 00138 END IF 00139 * 00140 * Quick return if possible 00141 * 00142 IF( N.EQ.0 ) 00143 $ RETURN 00144 * 00145 * Invert the triangular Cholesky factor U or L. 00146 * 00147 CALL CTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO ) 00148 IF( INFO.GT.0 ) 00149 $ RETURN 00150 * 00151 * Form inv(U) * inv(U)**H or inv(L)**H * inv(L). 00152 * 00153 CALL CLAUUM( UPLO, N, A, LDA, INFO ) 00154 * 00155 RETURN 00156 * 00157 * End of CPOTRI 00158 * 00159 END