1 *> \brief \b CLA_PORPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric or Hermitian positive-definite matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CLA_PORPVGRW + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cla_porpvgrw.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cla_porpvgrw.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cla_porpvgrw.f">
21 * REAL FUNCTION CLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
23 * .. Scalar Arguments ..
25 * INTEGER NCOLS, LDA, LDAF
27 * .. Array Arguments ..
28 * COMPLEX A( LDA, * ), AF( LDAF, * )
39 *> CLA_PORPVGRW computes the reciprocal pivot growth factor
40 *> norm(A)/norm(U). The "max absolute element" norm is used. If this is
41 *> much less than 1, the stability of the LU factorization of the
42 *> (equilibrated) matrix A could be poor. This also means that the
43 *> solution X, estimated condition numbers, and error bounds could be
52 *> UPLO is CHARACTER*1
53 *> = 'U': Upper triangle of A is stored;
54 *> = 'L': Lower triangle of A is stored.
60 *> The number of columns of the matrix A. NCOLS >= 0.
65 *> A is COMPLEX array, dimension (LDA,N)
66 *> On entry, the N-by-N matrix A.
72 *> The leading dimension of the array A. LDA >= max(1,N).
77 *> AF is COMPLEX array, dimension (LDAF,N)
78 *> The triangular factor U or L from the Cholesky factorization
79 *> A = U**T*U or A = L*L**T, as computed by CPOTRF.
85 *> The leading dimension of the array AF. LDAF >= max(1,N).
90 *> WORK is REAL array, dimension (2*N)
96 *> \author Univ. of Tennessee
97 *> \author Univ. of California Berkeley
98 *> \author Univ. of Colorado Denver
103 *> \ingroup complexPOcomputational
105 * =====================================================================
106 REAL FUNCTION CLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
108 * -- LAPACK computational routine (version 3.6.1) --
109 * -- LAPACK is a software package provided by Univ. of Tennessee, --
110 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
113 * .. Scalar Arguments ..
115 INTEGER NCOLS, LDA, LDAF
117 * .. Array Arguments ..
118 COMPLEX A( LDA, * ), AF( LDAF, * )
122 * =====================================================================
124 * .. Local Scalars ..
126 REAL AMAX, UMAX, RPVGRW
130 * .. External Functions ..
131 EXTERNAL LSAME, CLASET
134 * .. Intrinsic Functions ..
135 INTRINSIC ABS, MAX, MIN, REAL, AIMAG
137 * .. Statement Functions ..
140 * .. Statement Function Definitions ..
141 CABS1( ZDUM ) = ABS( REAL( ZDUM ) ) + ABS( AIMAG( ZDUM ) )
143 * .. Executable Statements ..
144 UPPER = LSAME( 'Upper', UPLO )
146 * SPOTRF will have factored only the NCOLSxNCOLS leading minor, so
147 * we restrict the growth search to that minor and use only the first
148 * 2*NCOLS workspace entries.
155 * Find the max magnitude entry of each column.
161 $ MAX( CABS1( A( I, J ) ), WORK( NCOLS+J ) )
168 $ MAX( CABS1( A( I, J ) ), WORK( NCOLS+J ) )
173 * Now find the max magnitude entry of each column of the factor in
174 * AF. No pivoting, so no permutations.
176 IF ( LSAME( 'Upper', UPLO ) ) THEN
179 WORK( J ) = MAX( CABS1( AF( I, J ) ), WORK( J ) )
185 WORK( J ) = MAX( CABS1( AF( I, J ) ), WORK( J ) )
190 * Compute the *inverse* of the max element growth factor. Dividing
191 * by zero would imply the largest entry of the factor's column is
192 * zero. Than can happen when either the column of A is zero or
193 * massive pivots made the factor underflow to zero. Neither counts
194 * as growth in itself, so simply ignore terms with zero
197 IF ( LSAME( 'Upper', UPLO ) ) THEN
200 AMAX = WORK( NCOLS+I )
201 IF ( UMAX /= 0.0 ) THEN
202 RPVGRW = MIN( AMAX / UMAX, RPVGRW )
208 AMAX = WORK( NCOLS+I )
209 IF ( UMAX /= 0.0 ) THEN
210 RPVGRW = MIN( AMAX / UMAX, RPVGRW )
215 CLA_PORPVGRW = RPVGRW