125 SUBROUTINE cgtts2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B,
133 INTEGER ITRANS, LDB, N, NRHS
137 COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
153 IF( n.EQ.0 .OR. nrhs.EQ.0 )
156 IF( itrans.EQ.0 )
THEN
168 IF( ipiv( i ).EQ.i )
THEN
169 b( i+1, j ) = b( i+1, j ) - dl( i )*b( i, j )
172 b( i, j ) = b( i+1, j )
173 b( i+1, j ) = temp - dl( i )*b( i, j )
179 b( n, j ) = b( n, j ) / d( n )
181 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) /
183 DO 30 i = n - 2, 1, -1
184 b( i, j ) = ( b( i, j )-du( i )*b( i+1, j )-du2( i )*
185 $ b( i+2, j ) ) / d( i )
197 IF( ipiv( i ).EQ.i )
THEN
198 b( i+1, j ) = b( i+1, j ) - dl( i )*b( i, j )
201 b( i, j ) = b( i+1, j )
202 b( i+1, j ) = temp - dl( i )*b( i, j )
208 b( n, j ) = b( n, j ) / d( n )
210 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) /
212 DO 50 i = n - 2, 1, -1
213 b( i, j ) = ( b( i, j )-du( i )*b( i+1, j )-du2( i )*
214 $ b( i+2, j ) ) / d( i )
218 ELSE IF( itrans.EQ.1 )
THEN
228 b( 1, j ) = b( 1, j ) / d( 1 )
230 $ b( 2, j ) = ( b( 2, j )-du( 1 )*b( 1, j ) ) / d( 2 )
232 b( i, j ) = ( b( i, j )-du( i-1 )*b( i-1, j )-du2( i-2 )*
233 $ b( i-2, j ) ) / d( i )
238 DO 90 i = n - 1, 1, -1
239 IF( ipiv( i ).EQ.i )
THEN
240 b( i, j ) = b( i, j ) - dl( i )*b( i+1, j )
243 b( i+1, j ) = b( i, j ) - dl( i )*temp
256 b( 1, j ) = b( 1, j ) / d( 1 )
258 $ b( 2, j ) = ( b( 2, j )-du( 1 )*b( 1, j ) ) / d( 2 )
260 b( i, j ) = ( b( i, j )-du( i-1 )*b( i-1, j )-
261 $ du2( i-2 )*b( i-2, j ) ) / d( i )
266 DO 110 i = n - 1, 1, -1
267 IF( ipiv( i ).EQ.i )
THEN
268 b( i, j ) = b( i, j ) - dl( i )*b( i+1, j )
271 b( i+1, j ) = b( i, j ) - dl( i )*temp
287 b( 1, j ) = b( 1, j ) / conjg( d( 1 ) )
289 $ b( 2, j ) = ( b( 2, j )-conjg( du( 1 ) )*b( 1, j ) ) /
292 b( i, j ) = ( b( i, j )-conjg( du( i-1 ) )*b( i-1, j )-
293 $ conjg( du2( i-2 ) )*b( i-2, j ) ) /
299 DO 150 i = n - 1, 1, -1
300 IF( ipiv( i ).EQ.i )
THEN
301 b( i, j ) = b( i, j ) - conjg( dl( i ) )*b( i+1, j )
304 b( i+1, j ) = b( i, j ) - conjg( dl( i ) )*temp
317 b( 1, j ) = b( 1, j ) / conjg( d( 1 ) )
319 $ b( 2, j ) = ( b( 2, j )-conjg( du( 1 ) )*b( 1, j ) ) /
322 b( i, j ) = ( b( i, j )-conjg( du( i-1 ) )*
323 $ b( i-1, j )-conjg( du2( i-2 ) )*
324 $ b( i-2, j ) ) / conjg( d( i ) )
329 DO 170 i = n - 1, 1, -1
330 IF( ipiv( i ).EQ.i )
THEN
331 b( i, j ) = b( i, j ) - conjg( dl( i ) )*
335 b( i+1, j ) = b( i, j ) - conjg( dl( i ) )*temp