153 INTEGER M, NB, J1, LDA, LDH
157 REAL A( LDA, * ), H( LDH, * ), WORK( * )
163 parameter( zero = 0.0e+0, one = 1.0e+0 )
166 INTEGER J, K, K1, I1, I2, MJ
171 INTEGER ISAMAX, ILAENV
172 EXTERNAL lsame, ilaenv, isamax
190 IF( lsame( uplo,
'U' ) )
THEN
197 IF ( j.GT.min(m, nb) )
226 CALL sgemv(
'No transpose', mj, j-k1,
227 $ -one, h( j, k1 ), ldh,
229 $ one, h( j, j ), 1 )
234 CALL scopy( mj, h( j, j ), 1, work( 1 ), 1 )
242 CALL saxpy( mj, alpha, a( k-2, j ), lda, work( 1 ), 1 )
247 a( k, j ) = work( 1 )
256 CALL saxpy( m-j, alpha, a( k-1, j+1 ), lda,
262 i2 = isamax( m-j, work( 2 ), 1 ) + 1
267 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
272 work( i2 ) = work( i1 )
279 CALL sswap( i2-i1-1, a( j1+i1-1, i1+1 ), lda,
280 $ a( j1+i1, i2 ), 1 )
285 $
CALL sswap( m-i2, a( j1+i1-1, i2+1 ), lda,
286 $ a( j1+i2-1, i2+1 ), lda )
290 piv = a( i1+j1-1, i1 )
291 a( j1+i1-1, i1 ) = a( j1+i2-1, i2 )
292 a( j1+i2-1, i2 ) = piv
296 CALL sswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
299 IF( i1.GT.(k1-1) )
THEN
304 CALL sswap( i1-k1+1, a( 1, i1 ), 1,
313 a( k, j+1 ) = work( 2 )
319 CALL scopy( m-j, a( k+1, j+1 ), lda,
326 IF( j.LT.(m-1) )
THEN
327 IF( a( k, j+1 ).NE.zero )
THEN
328 alpha = one / a( k, j+1 )
329 CALL scopy( m-j-1, work( 3 ), 1, a( k, j+2 ), lda )
330 CALL sscal( m-j-1, alpha, a( k, j+2 ), lda )
332 CALL slaset(
'Full', 1, m-j-1, zero, zero,
348 IF( j.GT.min( m, nb ) )
377 CALL sgemv(
'No transpose', mj, j-k1,
378 $ -one, h( j, k1 ), ldh,
380 $ one, h( j, j ), 1 )
385 CALL scopy( mj, h( j, j ), 1, work( 1 ), 1 )
393 CALL saxpy( mj, alpha, a( j, k-2 ), 1, work( 1 ), 1 )
398 a( j, k ) = work( 1 )
407 CALL saxpy( m-j, alpha, a( j+1, k-1 ), 1,
413 i2 = isamax( m-j, work( 2 ), 1 ) + 1
418 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
423 work( i2 ) = work( i1 )
430 CALL sswap( i2-i1-1, a( i1+1, j1+i1-1 ), 1,
431 $ a( i2, j1+i1 ), lda )
436 $
CALL sswap( m-i2, a( i2+1, j1+i1-1 ), 1,
437 $ a( i2+1, j1+i2-1 ), 1 )
441 piv = a( i1, j1+i1-1 )
442 a( i1, j1+i1-1 ) = a( i2, j1+i2-1 )
443 a( i2, j1+i2-1 ) = piv
447 CALL sswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
450 IF( i1.GT.(k1-1) )
THEN
455 CALL sswap( i1-k1+1, a( i1, 1 ), lda,
464 a( j+1, k ) = work( 2 )
470 CALL scopy( m-j, a( j+1, k+1 ), 1,
477 IF( j.LT.(m-1) )
THEN
478 IF( a( j+1, k ).NE.zero )
THEN
479 alpha = one / a( j+1, k )
480 CALL scopy( m-j-1, work( 3 ), 1, a( j+2, k ), 1 )
481 CALL sscal( m-j-1, alpha, a( j+2, k ), 1 )
483 CALL slaset(
'Full', m-j-1, 1, zero, zero,
subroutine xerbla(srname, info)
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine slasyf_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
SLASYF_AA
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sswap(n, sx, incx, sy, incy)
SSWAP