143 SUBROUTINE clagtm( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
152 INTEGER LDB, LDX, N, NRHS
156 COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ),
164 parameter( one = 1.0e+0, zero = 0.0e+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 ) + conjg( d( 1 ) )*x( 1, j )
242 b( 1, j ) = b( 1, j ) + conjg( d( 1 ) )*x( 1, j ) +
243 $ conjg( dl( 1 ) )*x( 2, j )
244 b( n, j ) = b( n, j ) + conjg( du( n-1 ) )*
245 $ x( n-1, j ) + conjg( d( n ) )*x( n, j )
247 b( i, j ) = b( i, j ) + conjg( du( i-1 ) )*
248 $ x( i-1, j ) + conjg( d( i ) )*
249 $ x( i, j ) + conjg( 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 ) - conjg( d( 1 ) )*x( 1, j )
300 b( 1, j ) = b( 1, j ) - conjg( d( 1 ) )*x( 1, j ) -
301 $ conjg( dl( 1 ) )*x( 2, j )
302 b( n, j ) = b( n, j ) - conjg( du( n-1 ) )*
303 $ x( n-1, j ) - conjg( d( n ) )*x( n, j )
305 b( i, j ) = b( i, j ) - conjg( du( i-1 ) )*
306 $ x( i-1, j ) - conjg( d( i ) )*
307 $ x( i, j ) - conjg( dl( i ) )*
subroutine clagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
CLAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a tridiagonal matrix,...