LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

◆ zpbtf2()

subroutine zpbtf2 ( character uplo,
integer n,
integer kd,
complex*16, dimension( ldab, * ) ab,
integer ldab,
integer info )

ZPBTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite band matrix (unblocked algorithm).

Download ZPBTF2 + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!> !> ZPBTF2 computes the Cholesky factorization of a complex Hermitian !> positive definite band matrix A. !> !> The factorization has the form !> A = U**H * U , if UPLO = 'U', or !> A = L * L**H, if UPLO = 'L', !> where U is an upper triangular matrix, U**H is the conjugate transpose !> of U, and L is lower triangular. !> !> This is the unblocked version of the algorithm, calling Level 2 BLAS. !>
Parameters
[in]UPLO
!> UPLO is CHARACTER*1 !> Specifies whether the upper or lower triangular part of the !> Hermitian matrix A is stored: !> = 'U': Upper triangular !> = 'L': Lower triangular !>
[in]N
!> N is INTEGER !> The order of the matrix A. N >= 0. !>
[in]KD
!> KD is INTEGER !> The number of super-diagonals of the matrix A if UPLO = 'U', !> or the number of sub-diagonals if UPLO = 'L'. KD >= 0. !>
[in,out]AB
!> AB is COMPLEX*16 array, dimension (LDAB,N) !> On entry, the upper or lower triangle of the Hermitian band !> matrix A, stored in the first KD+1 rows of the array. The !> j-th column of A is stored in the j-th column of the array AB !> as follows: !> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; !> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). !> !> On exit, if INFO = 0, the triangular factor U or L from the !> Cholesky factorization A = U**H *U or A = L*L**H of the band !> matrix A, in the same storage format as A. !>
[in]LDAB
!> LDAB is INTEGER !> The leading dimension of the array AB. LDAB >= KD+1. !>
[out]INFO
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -k, the k-th argument had an illegal value !> > 0: if INFO = k, the leading principal minor of order k !> is not positive, and the factorization could not be !> completed. !>
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!> !> The band storage scheme is illustrated by the following example, when !> N = 6, KD = 2, and UPLO = 'U': !> !> On entry: On exit: !> !> * * a13 a24 a35 a46 * * u13 u24 u35 u46 !> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 !> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 !> !> Similarly, if UPLO = 'L' the format of A is as follows: !> !> On entry: On exit: !> !> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 !> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * !> a31 a42 a53 a64 * * l31 l42 l53 l64 * * !> !> Array elements marked * are not used by the routine. !>

Definition at line 139 of file zpbtf2.f.

140*
141* -- LAPACK computational routine --
142* -- LAPACK is a software package provided by Univ. of Tennessee, --
143* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
144*
145* .. Scalar Arguments ..
146 CHARACTER UPLO
147 INTEGER INFO, KD, LDAB, N
148* ..
149* .. Array Arguments ..
150 COMPLEX*16 AB( LDAB, * )
151* ..
152*
153* =====================================================================
154*
155* .. Parameters ..
156 DOUBLE PRECISION ONE, ZERO
157 parameter( one = 1.0d+0, zero = 0.0d+0 )
158* ..
159* .. Local Scalars ..
160 LOGICAL UPPER
161 INTEGER J, KLD, KN
162 DOUBLE PRECISION AJJ
163* ..
164* .. External Functions ..
165 LOGICAL LSAME
166 EXTERNAL lsame
167* ..
168* .. External Subroutines ..
169 EXTERNAL xerbla, zdscal, zher, zlacgv
170* ..
171* .. Intrinsic Functions ..
172 INTRINSIC dble, max, min, sqrt
173* ..
174* .. Executable Statements ..
175*
176* Test the input parameters.
177*
178 info = 0
179 upper = lsame( uplo, 'U' )
180 IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
181 info = -1
182 ELSE IF( n.LT.0 ) THEN
183 info = -2
184 ELSE IF( kd.LT.0 ) THEN
185 info = -3
186 ELSE IF( ldab.LT.kd+1 ) THEN
187 info = -5
188 END IF
189 IF( info.NE.0 ) THEN
190 CALL xerbla( 'ZPBTF2', -info )
191 RETURN
192 END IF
193*
194* Quick return if possible
195*
196 IF( n.EQ.0 )
197 $ RETURN
198*
199 kld = max( 1, ldab-1 )
200*
201 IF( upper ) THEN
202*
203* Compute the Cholesky factorization A = U**H * U.
204*
205 DO 10 j = 1, n
206*
207* Compute U(J,J) and test for non-positive-definiteness.
208*
209 ajj = dble( ab( kd+1, j ) )
210 IF( ajj.LE.zero ) THEN
211 ab( kd+1, j ) = ajj
212 GO TO 30
213 END IF
214 ajj = sqrt( ajj )
215 ab( kd+1, j ) = ajj
216*
217* Compute elements J+1:J+KN of row J and update the
218* trailing submatrix within the band.
219*
220 kn = min( kd, n-j )
221 IF( kn.GT.0 ) THEN
222 CALL zdscal( kn, one / ajj, ab( kd, j+1 ), kld )
223 CALL zlacgv( kn, ab( kd, j+1 ), kld )
224 CALL zher( 'Upper', kn, -one, ab( kd, j+1 ), kld,
225 $ ab( kd+1, j+1 ), kld )
226 CALL zlacgv( kn, ab( kd, j+1 ), kld )
227 END IF
228 10 CONTINUE
229 ELSE
230*
231* Compute the Cholesky factorization A = L*L**H.
232*
233 DO 20 j = 1, n
234*
235* Compute L(J,J) and test for non-positive-definiteness.
236*
237 ajj = dble( ab( 1, j ) )
238 IF( ajj.LE.zero ) THEN
239 ab( 1, j ) = ajj
240 GO TO 30
241 END IF
242 ajj = sqrt( ajj )
243 ab( 1, j ) = ajj
244*
245* Compute elements J+1:J+KN of column J and update the
246* trailing submatrix within the band.
247*
248 kn = min( kd, n-j )
249 IF( kn.GT.0 ) THEN
250 CALL zdscal( kn, one / ajj, ab( 2, j ), 1 )
251 CALL zher( 'Lower', kn, -one, ab( 2, j ), 1,
252 $ ab( 1, j+1 ), kld )
253 END IF
254 20 CONTINUE
255 END IF
256 RETURN
257*
258 30 CONTINUE
259 info = j
260 RETURN
261*
262* End of ZPBTF2
263*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine zher(uplo, n, alpha, x, incx, a, lda)
ZHER
Definition zher.f:135
subroutine zlacgv(n, x, incx)
ZLACGV conjugates a complex vector.
Definition zlacgv.f:72
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
subroutine zdscal(n, da, zx, incx)
ZDSCAL
Definition zdscal.f:78
Here is the call graph for this function:
Here is the caller graph for this function: