139 SUBROUTINE spbtrf( UPLO, N, KD, AB, LDAB, INFO )
147 INTEGER INFO, KD, LDAB, N
157 parameter( one = 1.0e+0, zero = 0.0e+0 )
158 INTEGER NBMAX, LDWORK
159 parameter( nbmax = 32, ldwork = nbmax+1 )
162 INTEGER I, I2, I3, IB, II, J, JJ, NB
165 REAL WORK( LDWORK, NBMAX )
170 EXTERNAL lsame, ilaenv
184 IF( ( .NOT.lsame( uplo,
'U' ) ) .AND.
185 $ ( .NOT.lsame( uplo,
'L' ) ) )
THEN
187 ELSE IF( n.LT.0 )
THEN
189 ELSE IF( kd.LT.0 )
THEN
191 ELSE IF( ldab.LT.kd+1 )
THEN
195 CALL xerbla(
'SPBTRF', -info )
206 nb = ilaenv( 1,
'SPBTRF', uplo, n, kd, -1, -1 )
211 nb = min( nb, nbmax )
213 IF( nb.LE.1 .OR. nb.GT.kd )
THEN
217 CALL spbtf2( uplo, n, kd, ab, ldab, info )
222 IF( lsame( uplo,
'U' ) )
THEN
239 ib = min( nb, n-i+1 )
243 CALL spotf2( uplo, ib, ab( kd+1, i ), ldab-1, ii )
264 i2 = min( kd-ib, n-i-ib+1 )
265 i3 = min( ib, n-i-kd+1 )
271 CALL strsm(
'Left',
'Upper',
'Transpose',
272 $
'Non-unit', ib, i2, one, ab( kd+1, i ),
273 $ ldab-1, ab( kd+1-ib, i+ib ), ldab-1 )
277 CALL ssyrk(
'Upper',
'Transpose', i2, ib, -one,
278 $ ab( kd+1-ib, i+ib ), ldab-1, one,
279 $ ab( kd+1, i+ib ), ldab-1 )
288 work( ii, jj ) = ab( ii-jj+1, jj+i+kd-1 )
294 CALL strsm(
'Left',
'Upper',
'Transpose',
295 $
'Non-unit', ib, i3, one, ab( kd+1, i ),
296 $ ldab-1, work, ldwork )
301 $
CALL sgemm(
'Transpose',
'No Transpose', i2,
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,
380 $ ab( 1+ib, i ), ldab-1, one,
381 $ ab( 1, i+ib ), ldab-1 )
389 DO 100 ii = 1, min( jj, i3 )
390 work( ii, jj ) = ab( kd+1-jj+ii, jj+i-1 )
396 CALL strsm(
'Right',
'Lower',
'Transpose',
397 $
'Non-unit', i3, ib, one, ab( 1, i ),
398 $ ldab-1, work, ldwork )
403 $
CALL sgemm(
'No transpose',
'Transpose', i3,
405 $ ib, -one, work, ldwork,
406 $ ab( 1+ib, i ), ldab-1, one,
407 $ ab( 1+kd-ib, i+ib ), ldab-1 )
411 CALL ssyrk(
'Lower',
'No Transpose', i3, ib,
413 $ work, ldwork, one, ab( 1, i+kd ),
419 DO 120 ii = 1, min( jj, i3 )
420 ab( kd+1-jj+ii, jj+i-1 ) = work( ii, jj )