141 SUBROUTINE spbtrf( UPLO, N, KD, AB, LDAB, INFO )
149 INTEGER INFO, KD, LDAB, N
159 parameter( one = 1.0e+0, zero = 0.0e+0 )
160 INTEGER NBMAX, LDWORK
161 parameter( nbmax = 32, ldwork = nbmax+1 )
164 INTEGER I, I2, I3, IB, II, J, JJ, NB
167 REAL WORK( LDWORK, NBMAX )
172 EXTERNAL lsame, ilaenv
185 IF( ( .NOT.lsame( uplo,
'U' ) ) .AND.
186 $ ( .NOT.lsame( uplo,
'L' ) ) )
THEN
188 ELSE IF( n.LT.0 )
THEN
190 ELSE IF( kd.LT.0 )
THEN
192 ELSE IF( ldab.LT.kd+1 )
THEN
196 CALL xerbla(
'SPBTRF', -info )
207 nb = ilaenv( 1,
'SPBTRF', uplo, n, kd, -1, -1 )
212 nb = min( nb, nbmax )
214 IF( nb.LE.1 .OR. nb.GT.kd )
THEN
218 CALL spbtf2( uplo, n, kd, ab, ldab, info )
223 IF( lsame( uplo,
'U' ) )
THEN
240 ib = min( nb, n-i+1 )
244 CALL spotf2( uplo, ib, ab( kd+1, i ), ldab-1, ii )
265 i2 = min( kd-ib, n-i-ib+1 )
266 i3 = min( ib, n-i-kd+1 )
272 CALL strsm(
'Left',
'Upper',
'Transpose',
273 $
'Non-unit', ib, i2, one, ab( kd+1, i ),
274 $ ldab-1, ab( kd+1-ib, i+ib ), ldab-1 )
278 CALL ssyrk(
'Upper',
'Transpose', i2, ib, -one,
279 $ ab( kd+1-ib, i+ib ), ldab-1, one,
280 $ ab( kd+1, i+ib ), ldab-1 )
289 work( ii, jj ) = ab( ii-jj+1, jj+i+kd-1 )
295 CALL strsm(
'Left',
'Upper',
'Transpose',
296 $
'Non-unit', ib, i3, one, ab( kd+1, i ),
297 $ ldab-1, work, ldwork )
302 $
CALL sgemm(
'Transpose',
'No Transpose', i2, i3,
303 $ ib, -one, ab( kd+1-ib, i+ib ),
304 $ ldab-1, work, ldwork, one,
305 $ ab( 1+ib, i+kd ), ldab-1 )
309 CALL ssyrk(
'Upper',
'Transpose', i3, ib, -one,
310 $ work, ldwork, one, ab( kd+1, i+kd ),
317 ab( ii-jj+1, jj+i+kd-1 ) = work( ii, jj )
340 ib = min( nb, n-i+1 )
344 CALL spotf2( uplo, ib, ab( 1, i ), ldab-1, ii )
365 i2 = min( kd-ib, n-i-ib+1 )
366 i3 = min( ib, n-i-kd+1 )
372 CALL strsm(
'Right',
'Lower',
'Transpose',
373 $
'Non-unit', i2, ib, one, ab( 1, i ),
374 $ ldab-1, ab( 1+ib, i ), ldab-1 )
378 CALL ssyrk(
'Lower',
'No Transpose', i2, ib, -one,
379 $ ab( 1+ib, i ), ldab-1, one,
380 $ ab( 1, i+ib ), ldab-1 )
388 DO 100 ii = 1, min( jj, i3 )
389 work( ii, jj ) = ab( kd+1-jj+ii, jj+i-1 )
395 CALL strsm(
'Right',
'Lower',
'Transpose',
396 $
'Non-unit', i3, ib, one, ab( 1, i ),
397 $ ldab-1, work, ldwork )
402 $
CALL sgemm(
'No transpose',
'Transpose', i3, i2,
403 $ ib, -one, work, ldwork,
404 $ ab( 1+ib, i ), ldab-1, one,
405 $ ab( 1+kd-ib, i+ib ), ldab-1 )
409 CALL ssyrk(
'Lower',
'No Transpose', i3, ib, -one,
410 $ work, ldwork, one, ab( 1, i+kd ),
416 DO 120 ii = 1, min( jj, i3 )
417 ab( kd+1-jj+ii, jj+i-1 ) = work( ii, jj )
subroutine xerbla(srname, info)
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
SSYRK
subroutine spbtf2(uplo, n, kd, ab, ldab, info)
SPBTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite band matrix (un...
subroutine spbtrf(uplo, n, kd, ab, ldab, info)
SPBTRF
subroutine spotf2(uplo, n, a, lda, info)
SPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblock...
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM