145 SUBROUTINE zlagtm( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
155 INTEGER LDB, LDX, N, NRHS
156 DOUBLE PRECISION ALPHA, BETA
159 COMPLEX*16 B( ldb, * ), D( * ), DL( * ), DU( * ),
166 DOUBLE PRECISION ONE, ZERO
167 parameter ( one = 1.0d+0, zero = 0.0d+0 )
186 IF( beta.EQ.zero )
THEN
192 ELSE IF( beta.EQ.-one )
THEN
195 b( i, j ) = -b( i, j )
200 IF( alpha.EQ.one )
THEN
201 IF( lsame( trans,
'N' ) )
THEN
207 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
209 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
211 b( n, j ) = b( n, j ) + dl( n-1 )*x( n-1, j ) +
214 b( i, j ) = b( i, j ) + dl( i-1 )*x( i-1, j ) +
215 $ d( i )*x( i, j ) + du( i )*x( i+1, j )
219 ELSE IF( lsame( trans,
'T' ) )
THEN
225 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
227 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
229 b( n, j ) = b( n, j ) + du( n-1 )*x( n-1, j ) +
232 b( i, j ) = b( i, j ) + du( i-1 )*x( i-1, j ) +
233 $ d( i )*x( i, j ) + dl( i )*x( i+1, j )
237 ELSE IF( lsame( trans,
'C' ) )
THEN
243 b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j )
245 b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j ) +
246 $ dconjg( dl( 1 ) )*x( 2, j )
247 b( n, j ) = b( n, j ) + dconjg( du( n-1 ) )*
248 $ x( n-1, j ) + dconjg( d( n ) )*x( n, j )
250 b( i, j ) = b( i, j ) + dconjg( du( i-1 ) )*
251 $ x( i-1, j ) + dconjg( d( i ) )*
252 $ x( i, j ) + dconjg( dl( i ) )*
258 ELSE IF( alpha.EQ.-one )
THEN
259 IF( lsame( trans,
'N' ) )
THEN
265 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
267 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
269 b( n, j ) = b( n, j ) - dl( n-1 )*x( n-1, j ) -
272 b( i, j ) = b( i, j ) - dl( i-1 )*x( i-1, j ) -
273 $ d( i )*x( i, j ) - du( i )*x( i+1, j )
277 ELSE IF( lsame( trans,
'T' ) )
THEN
283 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
285 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
287 b( n, j ) = b( n, j ) - du( n-1 )*x( n-1, j ) -
290 b( i, j ) = b( i, j ) - du( i-1 )*x( i-1, j ) -
291 $ d( i )*x( i, j ) - dl( i )*x( i+1, j )
295 ELSE IF( lsame( trans,
'C' ) )
THEN
301 b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j )
303 b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j ) -
304 $ dconjg( dl( 1 ) )*x( 2, j )
305 b( n, j ) = b( n, j ) - dconjg( du( n-1 ) )*
306 $ x( n-1, j ) - dconjg( d( n ) )*x( n, j )
308 b( i, j ) = b( i, j ) - dconjg( du( i-1 ) )*
309 $ x( i-1, j ) - dconjg( d( i ) )*
310 $ x( i, j ) - dconjg( dl( i ) )*
subroutine zlagtm(TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA, B, LDB)
ZLAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a tridiagonal matrix...