163 SUBROUTINE dsytrs_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
172 INTEGER INFO, LDA, LDB, N, NRHS
176 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), E( * )
183 parameter( one = 1.0d+0 )
188 DOUBLE PRECISION AK, AKM1, AKM1K, BK, BKM1, DENOM
203 upper = lsame( uplo,
'U' )
204 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
206 ELSE IF( n.LT.0 )
THEN
208 ELSE IF( nrhs.LT.0 )
THEN
210 ELSE IF( lda.LT.max( 1, n ) )
THEN
212 ELSE IF( ldb.LT.max( 1, n ) )
THEN
216 CALL xerbla(
'DSYTRS_3', -info )
222 IF( n.EQ.0 .OR. nrhs.EQ.0 )
241 kp = abs( ipiv( k ) )
243 CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
249 CALL dtrsm(
'L',
'U',
'N',
'U', n, nrhs, one, a, lda, b, ldb )
255 IF( ipiv( i ).GT.0 )
THEN
256 CALL dscal( nrhs, one / a( i, i ), b( i, 1 ), ldb )
257 ELSE IF ( i.GT.1 )
THEN
259 akm1 = a( i-1, i-1 ) / akm1k
260 ak = a( i, i ) / akm1k
261 denom = akm1*ak - one
263 bkm1 = b( i-1, j ) / akm1k
264 bk = b( i, j ) / akm1k
265 b( i-1, j ) = ( ak*bkm1-bk ) / denom
266 b( i, j ) = ( akm1*bk-bkm1 ) / denom
275 CALL dtrsm(
'L',
'U',
'T',
'U', n, nrhs, one, a, lda, b, ldb )
287 kp = abs( ipiv( k ) )
289 CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
308 kp = abs( ipiv( k ) )
310 CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
316 CALL dtrsm(
'L',
'L',
'N',
'U', n, nrhs, one, a, lda, b, ldb )
322 IF( ipiv( i ).GT.0 )
THEN
323 CALL dscal( nrhs, one / a( i, i ), b( i, 1 ), ldb )
324 ELSE IF( i.LT.n )
THEN
326 akm1 = a( i, i ) / akm1k
327 ak = a( i+1, i+1 ) / akm1k
328 denom = akm1*ak - one
330 bkm1 = b( i, j ) / akm1k
331 bk = b( i+1, j ) / akm1k
332 b( i, j ) = ( ak*bkm1-bk ) / denom
333 b( i+1, j ) = ( akm1*bk-bkm1 ) / denom
342 CALL dtrsm(
'L',
'L',
'T',
'U', n, nrhs, one, a, lda, b, ldb )
354 kp = abs( ipiv( k ) )
356 CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
subroutine xerbla(srname, info)
subroutine dsytrs_3(uplo, n, nrhs, a, lda, e, ipiv, b, ldb, info)
DSYTRS_3
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM