141 SUBROUTINE zlagtm( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX,
151 INTEGER LDB, LDX, N, NRHS
152 DOUBLE PRECISION ALPHA, BETA
155 COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ),
162 DOUBLE PRECISION ONE, ZERO
163 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
182 IF( beta.EQ.zero )
THEN
188 ELSE IF( beta.EQ.-one )
THEN
191 b( i, j ) = -b( i, j )
196 IF( alpha.EQ.one )
THEN
197 IF( lsame( trans,
'N' ) )
THEN
203 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
205 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
207 b( n, j ) = b( n, j ) + dl( n-1 )*x( n-1, j ) +
210 b( i, j ) = b( i, j ) + dl( i-1 )*x( i-1, j ) +
211 $ d( i )*x( i, j ) + du( i )*x( i+1, j )
215 ELSE IF( lsame( trans,
'T' ) )
THEN
221 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
223 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
225 b( n, j ) = b( n, j ) + du( n-1 )*x( n-1, j ) +
228 b( i, j ) = b( i, j ) + du( i-1 )*x( i-1, j ) +
229 $ d( i )*x( i, j ) + dl( i )*x( i+1, j )
233 ELSE IF( lsame( trans,
'C' ) )
THEN
239 b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j )
241 b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j ) +
242 $ dconjg( dl( 1 ) )*x( 2, j )
243 b( n, j ) = b( n, j ) + dconjg( du( n-1 ) )*
244 $ x( n-1, j ) + dconjg( d( n ) )*x( n, j )
246 b( i, j ) = b( i, j ) + dconjg( du( i-1 ) )*
247 $ x( i-1, j ) + dconjg( d( i ) )*
248 $ x( i, j ) + dconjg( dl( i ) )*
254 ELSE IF( alpha.EQ.-one )
THEN
255 IF( lsame( trans,
'N' ) )
THEN
261 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
263 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
265 b( n, j ) = b( n, j ) - dl( n-1 )*x( n-1, j ) -
268 b( i, j ) = b( i, j ) - dl( i-1 )*x( i-1, j ) -
269 $ d( i )*x( i, j ) - du( i )*x( i+1, j )
273 ELSE IF( lsame( trans,
'T' ) )
THEN
279 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
281 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
283 b( n, j ) = b( n, j ) - du( n-1 )*x( n-1, j ) -
286 b( i, j ) = b( i, j ) - du( i-1 )*x( i-1, j ) -
287 $ d( i )*x( i, j ) - dl( i )*x( i+1, j )
291 ELSE IF( lsame( trans,
'C' ) )
THEN
297 b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j )
299 b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j ) -
300 $ dconjg( dl( 1 ) )*x( 2, j )
301 b( n, j ) = b( n, j ) - dconjg( du( n-1 ) )*
302 $ x( n-1, j ) - dconjg( d( n ) )*x( n, j )
304 b( i, j ) = b( i, j ) - dconjg( du( i-1 ) )*
305 $ x( i-1, j ) - dconjg( d( i ) )*
306 $ 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,...