127 SUBROUTINE zlaptm( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
136 INTEGER LDB, LDX, N, NRHS
137 DOUBLE PRECISION ALPHA, BETA
140 DOUBLE PRECISION D( * )
141 COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
147 DOUBLE PRECISION ONE, ZERO
148 parameter( one = 1.0d+0, zero = 0.0d+0 )
165 IF( beta.EQ.zero )
THEN
171 ELSE IF( beta.EQ.-one )
THEN
174 b( i, j ) = -b( i, j )
179 IF( alpha.EQ.one )
THEN
180 IF( lsame( uplo,
'U' ) )
THEN
186 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
188 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
190 b( n, j ) = b( n, j ) + dconjg( e( n-1 ) )*
191 $ x( n-1, j ) + d( n )*x( n, j )
193 b( i, j ) = b( i, j ) + dconjg( e( i-1 ) )*
194 $ x( i-1, j ) + d( i )*x( i, j ) +
205 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j )
207 b( 1, j ) = b( 1, j ) + d( 1 )*x( 1, j ) +
208 $ dconjg( e( 1 ) )*x( 2, j )
209 b( n, j ) = b( n, j ) + e( n-1 )*x( n-1, j ) +
212 b( i, j ) = b( i, j ) + e( i-1 )*x( i-1, j ) +
214 $ dconjg( e( i ) )*x( i+1, j )
219 ELSE IF( alpha.EQ.-one )
THEN
220 IF( lsame( uplo,
'U' ) )
THEN
226 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
228 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
230 b( n, j ) = b( n, j ) - dconjg( e( n-1 ) )*
231 $ x( n-1, j ) - d( n )*x( n, j )
233 b( i, j ) = b( i, j ) - dconjg( e( i-1 ) )*
234 $ x( i-1, j ) - d( i )*x( i, j ) -
245 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j )
247 b( 1, j ) = b( 1, j ) - d( 1 )*x( 1, j ) -
248 $ dconjg( e( 1 ) )*x( 2, j )
249 b( n, j ) = b( n, j ) - e( n-1 )*x( n-1, j ) -
252 b( i, j ) = b( i, j ) - e( i-1 )*x( i-1, j ) -
254 $ dconjg( e( i ) )*x( i+1, j )
subroutine zlaptm(uplo, n, nrhs, alpha, d, e, x, ldx, beta, b, ldb)
ZLAPTM