143 SUBROUTINE zlagtm( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
152 INTEGER LDB, LDX, N, NRHS
153 DOUBLE PRECISION ALPHA, BETA
156 COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ),
163 DOUBLE PRECISION ONE, ZERO
164 parameter( one = 1.0d+0, zero = 0.0d+0 )
183 IF( beta.EQ.zero )
THEN
189 ELSE IF( beta.EQ.-one )
THEN
192 b( i, j ) = -b( i, j )
197 IF( alpha.EQ.one )
THEN
198 IF( lsame( trans,
'N' ) )
THEN
204 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
206 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
208 b( n, j ) = b( n, j ) + dl( n-1 )*x( n-1, j ) +
211 b( i, j ) = b( i, j ) + dl( i-1 )*x( i-1, j ) +
212 $ d( i )*x( i, j ) + du( i )*x( i+1, j )
216 ELSE IF( lsame( trans,
'T' ) )
THEN
222 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
224 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
226 b( n, j ) = b( n, j ) + du( n-1 )*x( n-1, j ) +
229 b( i, j ) = b( i, j ) + du( i-1 )*x( i-1, j ) +
230 $ d( i )*x( i, j ) + dl( i )*x( i+1, j )
234 ELSE IF( lsame( trans,
'C' ) )
THEN
240 b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j )
242 b( 1, j ) = b( 1, j ) + dconjg( d( 1 ) )*x( 1, j ) +
243 $ dconjg( dl( 1 ) )*x( 2, j )
244 b( n, j ) = b( n, j ) + dconjg( du( n-1 ) )*
245 $ x( n-1, j ) + dconjg( d( n ) )*x( n, j )
247 b( i, j ) = b( i, j ) + dconjg( du( i-1 ) )*
248 $ x( i-1, j ) + dconjg( d( i ) )*
249 $ x( i, j ) + dconjg( dl( i ) )*
255 ELSE IF( alpha.EQ.-one )
THEN
256 IF( lsame( trans,
'N' ) )
THEN
262 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
264 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
266 b( n, j ) = b( n, j ) - dl( n-1 )*x( n-1, j ) -
269 b( i, j ) = b( i, j ) - dl( i-1 )*x( i-1, j ) -
270 $ d( i )*x( i, j ) - du( i )*x( i+1, j )
274 ELSE IF( lsame( trans,
'T' ) )
THEN
280 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
282 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
284 b( n, j ) = b( n, j ) - du( n-1 )*x( n-1, j ) -
287 b( i, j ) = b( i, j ) - du( i-1 )*x( i-1, j ) -
288 $ d( i )*x( i, j ) - dl( i )*x( i+1, j )
292 ELSE IF( lsame( trans,
'C' ) )
THEN
298 b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j )
300 b( 1, j ) = b( 1, j ) - dconjg( d( 1 ) )*x( 1, j ) -
301 $ dconjg( dl( 1 ) )*x( 2, j )
302 b( n, j ) = b( n, j ) - dconjg( du( n-1 ) )*
303 $ x( n-1, j ) - dconjg( d( n ) )*x( n, j )
305 b( i, j ) = b( i, j ) - dconjg( du( i-1 ) )*
306 $ x( i-1, j ) - dconjg( d( i ) )*
307 $ 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,...