00001 SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
00002 $ H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
00003 $ WV, LDWV, NH, WH, LDWH )
00004
00005
00006
00007
00008
00009
00010 INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
00011 $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
00012 LOGICAL WANTT, WANTZ
00013
00014
00015 COMPLEX*16 H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
00016 $ WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138 COMPLEX*16 ZERO, ONE
00139 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
00140 $ ONE = ( 1.0d0, 0.0d0 ) )
00141 DOUBLE PRECISION RZERO, RONE
00142 PARAMETER ( RZERO = 0.0d0, RONE = 1.0d0 )
00143
00144
00145 COMPLEX*16 ALPHA, BETA, CDUM, REFSUM
00146 DOUBLE PRECISION H11, H12, H21, H22, SAFMAX, SAFMIN, SCL,
00147 $ SMLNUM, TST1, TST2, ULP
00148 INTEGER I2, I4, INCOL, J, J2, J4, JBOT, JCOL, JLEN,
00149 $ JROW, JTOP, K, K1, KDU, KMS, KNZ, KRCOL, KZS,
00150 $ M, M22, MBOT, MEND, MSTART, MTOP, NBMPS, NDCOL,
00151 $ NS, NU
00152 LOGICAL ACCUM, BLK22, BMP22
00153
00154
00155 DOUBLE PRECISION DLAMCH
00156 EXTERNAL DLAMCH
00157
00158
00159
00160 INTRINSIC ABS, DBLE, DCONJG, DIMAG, MAX, MIN, MOD
00161
00162
00163 COMPLEX*16 VT( 3 )
00164
00165
00166 EXTERNAL DLABAD, ZGEMM, ZLACPY, ZLAQR1, ZLARFG, ZLASET,
00167 $ ZTRMM
00168
00169
00170 DOUBLE PRECISION CABS1
00171
00172
00173 CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
00174
00175
00176
00177
00178
00179 IF( NSHFTS.LT.2 )
00180 $ RETURN
00181
00182
00183
00184
00185 IF( KTOP.GE.KBOT )
00186 $ RETURN
00187
00188
00189
00190
00191 NS = NSHFTS - MOD( NSHFTS, 2 )
00192
00193
00194
00195 SAFMIN = DLAMCH( 'SAFE MINIMUM' )
00196 SAFMAX = RONE / SAFMIN
00197 CALL DLABAD( SAFMIN, SAFMAX )
00198 ULP = DLAMCH( 'PRECISION' )
00199 SMLNUM = SAFMIN*( DBLE( N ) / ULP )
00200
00201
00202
00203
00204 ACCUM = ( KACC22.EQ.1 ) .OR. ( KACC22.EQ.2 )
00205
00206
00207
00208 BLK22 = ( NS.GT.2 ) .AND. ( KACC22.EQ.2 )
00209
00210
00211
00212 IF( KTOP+2.LE.KBOT )
00213 $ H( KTOP+2, KTOP ) = ZERO
00214
00215
00216
00217 NBMPS = NS / 2
00218
00219
00220
00221 KDU = 6*NBMPS - 3
00222
00223
00224
00225 DO 210 INCOL = 3*( 1-NBMPS ) + KTOP - 1, KBOT - 2, 3*NBMPS - 2
00226 NDCOL = INCOL + KDU
00227 IF( ACCUM )
00228 $ CALL ZLASET( 'ALL', KDU, KDU, ZERO, ONE, U, LDU )
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242 DO 140 KRCOL = INCOL, MIN( INCOL+3*NBMPS-3, KBOT-2 )
00243
00244
00245
00246
00247
00248
00249
00250
00251 MTOP = MAX( 1, ( ( KTOP-1 )-KRCOL+2 ) / 3+1 )
00252 MBOT = MIN( NBMPS, ( KBOT-KRCOL ) / 3 )
00253 M22 = MBOT + 1
00254 BMP22 = ( MBOT.LT.NBMPS ) .AND. ( KRCOL+3*( M22-1 ) ).EQ.
00255 $ ( KBOT-2 )
00256
00257
00258
00259
00260 DO 10 M = MTOP, MBOT
00261 K = KRCOL + 3*( M-1 )
00262 IF( K.EQ.KTOP-1 ) THEN
00263 CALL ZLAQR1( 3, H( KTOP, KTOP ), LDH, S( 2*M-1 ),
00264 $ S( 2*M ), V( 1, M ) )
00265 ALPHA = V( 1, M )
00266 CALL ZLARFG( 3, ALPHA, V( 2, M ), 1, V( 1, M ) )
00267 ELSE
00268 BETA = H( K+1, K )
00269 V( 2, M ) = H( K+2, K )
00270 V( 3, M ) = H( K+3, K )
00271 CALL ZLARFG( 3, BETA, V( 2, M ), 1, V( 1, M ) )
00272
00273
00274
00275
00276
00277
00278 IF( H( K+3, K ).NE.ZERO .OR. H( K+3, K+1 ).NE.
00279 $ ZERO .OR. H( K+3, K+2 ).EQ.ZERO ) THEN
00280
00281
00282
00283 H( K+1, K ) = BETA
00284 H( K+2, K ) = ZERO
00285 H( K+3, K ) = ZERO
00286 ELSE
00287
00288
00289
00290
00291
00292
00293
00294 CALL ZLAQR1( 3, H( K+1, K+1 ), LDH, S( 2*M-1 ),
00295 $ S( 2*M ), VT )
00296 ALPHA = VT( 1 )
00297 CALL ZLARFG( 3, ALPHA, VT( 2 ), 1, VT( 1 ) )
00298 REFSUM = DCONJG( VT( 1 ) )*
00299 $ ( H( K+1, K )+DCONJG( VT( 2 ) )*
00300 $ H( K+2, K ) )
00301
00302 IF( CABS1( H( K+2, K )-REFSUM*VT( 2 ) )+
00303 $ CABS1( REFSUM*VT( 3 ) ).GT.ULP*
00304 $ ( CABS1( H( K, K ) )+CABS1( H( K+1,
00305 $ K+1 ) )+CABS1( H( K+2, K+2 ) ) ) ) THEN
00306
00307
00308
00309
00310
00311 H( K+1, K ) = BETA
00312 H( K+2, K ) = ZERO
00313 H( K+3, K ) = ZERO
00314 ELSE
00315
00316
00317
00318
00319
00320
00321 H( K+1, K ) = H( K+1, K ) - REFSUM
00322 H( K+2, K ) = ZERO
00323 H( K+3, K ) = ZERO
00324 V( 1, M ) = VT( 1 )
00325 V( 2, M ) = VT( 2 )
00326 V( 3, M ) = VT( 3 )
00327 END IF
00328 END IF
00329 END IF
00330 10 CONTINUE
00331
00332
00333
00334 K = KRCOL + 3*( M22-1 )
00335 IF( BMP22 ) THEN
00336 IF( K.EQ.KTOP-1 ) THEN
00337 CALL ZLAQR1( 2, H( K+1, K+1 ), LDH, S( 2*M22-1 ),
00338 $ S( 2*M22 ), V( 1, M22 ) )
00339 BETA = V( 1, M22 )
00340 CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) )
00341 ELSE
00342 BETA = H( K+1, K )
00343 V( 2, M22 ) = H( K+2, K )
00344 CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) )
00345 H( K+1, K ) = BETA
00346 H( K+2, K ) = ZERO
00347 END IF
00348 END IF
00349
00350
00351
00352 IF( ACCUM ) THEN
00353 JBOT = MIN( NDCOL, KBOT )
00354 ELSE IF( WANTT ) THEN
00355 JBOT = N
00356 ELSE
00357 JBOT = KBOT
00358 END IF
00359 DO 30 J = MAX( KTOP, KRCOL ), JBOT
00360 MEND = MIN( MBOT, ( J-KRCOL+2 ) / 3 )
00361 DO 20 M = MTOP, MEND
00362 K = KRCOL + 3*( M-1 )
00363 REFSUM = DCONJG( V( 1, M ) )*
00364 $ ( H( K+1, J )+DCONJG( V( 2, M ) )*
00365 $ H( K+2, J )+DCONJG( V( 3, M ) )*H( K+3, J ) )
00366 H( K+1, J ) = H( K+1, J ) - REFSUM
00367 H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M )
00368 H( K+3, J ) = H( K+3, J ) - REFSUM*V( 3, M )
00369 20 CONTINUE
00370 30 CONTINUE
00371 IF( BMP22 ) THEN
00372 K = KRCOL + 3*( M22-1 )
00373 DO 40 J = MAX( K+1, KTOP ), JBOT
00374 REFSUM = DCONJG( V( 1, M22 ) )*
00375 $ ( H( K+1, J )+DCONJG( V( 2, M22 ) )*
00376 $ H( K+2, J ) )
00377 H( K+1, J ) = H( K+1, J ) - REFSUM
00378 H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M22 )
00379 40 CONTINUE
00380 END IF
00381
00382
00383
00384
00385
00386 IF( ACCUM ) THEN
00387 JTOP = MAX( KTOP, INCOL )
00388 ELSE IF( WANTT ) THEN
00389 JTOP = 1
00390 ELSE
00391 JTOP = KTOP
00392 END IF
00393 DO 80 M = MTOP, MBOT
00394 IF( V( 1, M ).NE.ZERO ) THEN
00395 K = KRCOL + 3*( M-1 )
00396 DO 50 J = JTOP, MIN( KBOT, K+3 )
00397 REFSUM = V( 1, M )*( H( J, K+1 )+V( 2, M )*
00398 $ H( J, K+2 )+V( 3, M )*H( J, K+3 ) )
00399 H( J, K+1 ) = H( J, K+1 ) - REFSUM
00400 H( J, K+2 ) = H( J, K+2 ) -
00401 $ REFSUM*DCONJG( V( 2, M ) )
00402 H( J, K+3 ) = H( J, K+3 ) -
00403 $ REFSUM*DCONJG( V( 3, M ) )
00404 50 CONTINUE
00405
00406 IF( ACCUM ) THEN
00407
00408
00409
00410
00411
00412 KMS = K - INCOL
00413 DO 60 J = MAX( 1, KTOP-INCOL ), KDU
00414 REFSUM = V( 1, M )*( U( J, KMS+1 )+V( 2, M )*
00415 $ U( J, KMS+2 )+V( 3, M )*U( J, KMS+3 ) )
00416 U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM
00417 U( J, KMS+2 ) = U( J, KMS+2 ) -
00418 $ REFSUM*DCONJG( V( 2, M ) )
00419 U( J, KMS+3 ) = U( J, KMS+3 ) -
00420 $ REFSUM*DCONJG( V( 3, M ) )
00421 60 CONTINUE
00422 ELSE IF( WANTZ ) THEN
00423
00424
00425
00426
00427
00428 DO 70 J = ILOZ, IHIZ
00429 REFSUM = V( 1, M )*( Z( J, K+1 )+V( 2, M )*
00430 $ Z( J, K+2 )+V( 3, M )*Z( J, K+3 ) )
00431 Z( J, K+1 ) = Z( J, K+1 ) - REFSUM
00432 Z( J, K+2 ) = Z( J, K+2 ) -
00433 $ REFSUM*DCONJG( V( 2, M ) )
00434 Z( J, K+3 ) = Z( J, K+3 ) -
00435 $ REFSUM*DCONJG( V( 3, M ) )
00436 70 CONTINUE
00437 END IF
00438 END IF
00439 80 CONTINUE
00440
00441
00442
00443 K = KRCOL + 3*( M22-1 )
00444 IF( BMP22 ) THEN
00445 IF ( V( 1, M22 ).NE.ZERO ) THEN
00446 DO 90 J = JTOP, MIN( KBOT, K+3 )
00447 REFSUM = V( 1, M22 )*( H( J, K+1 )+V( 2, M22 )*
00448 $ H( J, K+2 ) )
00449 H( J, K+1 ) = H( J, K+1 ) - REFSUM
00450 H( J, K+2 ) = H( J, K+2 ) -
00451 $ REFSUM*DCONJG( V( 2, M22 ) )
00452 90 CONTINUE
00453
00454 IF( ACCUM ) THEN
00455 KMS = K - INCOL
00456 DO 100 J = MAX( 1, KTOP-INCOL ), KDU
00457 REFSUM = V( 1, M22 )*( U( J, KMS+1 )+
00458 $ V( 2, M22 )*U( J, KMS+2 ) )
00459 U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM
00460 U( J, KMS+2 ) = U( J, KMS+2 ) -
00461 $ REFSUM*DCONJG( V( 2, M22 ) )
00462 100 CONTINUE
00463 ELSE IF( WANTZ ) THEN
00464 DO 110 J = ILOZ, IHIZ
00465 REFSUM = V( 1, M22 )*( Z( J, K+1 )+V( 2, M22 )*
00466 $ Z( J, K+2 ) )
00467 Z( J, K+1 ) = Z( J, K+1 ) - REFSUM
00468 Z( J, K+2 ) = Z( J, K+2 ) -
00469 $ REFSUM*DCONJG( V( 2, M22 ) )
00470 110 CONTINUE
00471 END IF
00472 END IF
00473 END IF
00474
00475
00476
00477 MSTART = MTOP
00478 IF( KRCOL+3*( MSTART-1 ).LT.KTOP )
00479 $ MSTART = MSTART + 1
00480 MEND = MBOT
00481 IF( BMP22 )
00482 $ MEND = MEND + 1
00483 IF( KRCOL.EQ.KBOT-2 )
00484 $ MEND = MEND + 1
00485 DO 120 M = MSTART, MEND
00486 K = MIN( KBOT-1, KRCOL+3*( M-1 ) )
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497 IF( H( K+1, K ).NE.ZERO ) THEN
00498 TST1 = CABS1( H( K, K ) ) + CABS1( H( K+1, K+1 ) )
00499 IF( TST1.EQ.RZERO ) THEN
00500 IF( K.GE.KTOP+1 )
00501 $ TST1 = TST1 + CABS1( H( K, K-1 ) )
00502 IF( K.GE.KTOP+2 )
00503 $ TST1 = TST1 + CABS1( H( K, K-2 ) )
00504 IF( K.GE.KTOP+3 )
00505 $ TST1 = TST1 + CABS1( H( K, K-3 ) )
00506 IF( K.LE.KBOT-2 )
00507 $ TST1 = TST1 + CABS1( H( K+2, K+1 ) )
00508 IF( K.LE.KBOT-3 )
00509 $ TST1 = TST1 + CABS1( H( K+3, K+1 ) )
00510 IF( K.LE.KBOT-4 )
00511 $ TST1 = TST1 + CABS1( H( K+4, K+1 ) )
00512 END IF
00513 IF( CABS1( H( K+1, K ) ).LE.MAX( SMLNUM, ULP*TST1 ) )
00514 $ THEN
00515 H12 = MAX( CABS1( H( K+1, K ) ),
00516 $ CABS1( H( K, K+1 ) ) )
00517 H21 = MIN( CABS1( H( K+1, K ) ),
00518 $ CABS1( H( K, K+1 ) ) )
00519 H11 = MAX( CABS1( H( K+1, K+1 ) ),
00520 $ CABS1( H( K, K )-H( K+1, K+1 ) ) )
00521 H22 = MIN( CABS1( H( K+1, K+1 ) ),
00522 $ CABS1( H( K, K )-H( K+1, K+1 ) ) )
00523 SCL = H11 + H12
00524 TST2 = H22*( H11 / SCL )
00525
00526 IF( TST2.EQ.RZERO .OR. H21*( H12 / SCL ).LE.
00527 $ MAX( SMLNUM, ULP*TST2 ) )H( K+1, K ) = ZERO
00528 END IF
00529 END IF
00530 120 CONTINUE
00531
00532
00533
00534 MEND = MIN( NBMPS, ( KBOT-KRCOL-1 ) / 3 )
00535 DO 130 M = MTOP, MEND
00536 K = KRCOL + 3*( M-1 )
00537 REFSUM = V( 1, M )*V( 3, M )*H( K+4, K+3 )
00538 H( K+4, K+1 ) = -REFSUM
00539 H( K+4, K+2 ) = -REFSUM*DCONJG( V( 2, M ) )
00540 H( K+4, K+3 ) = H( K+4, K+3 ) -
00541 $ REFSUM*DCONJG( V( 3, M ) )
00542 130 CONTINUE
00543
00544
00545
00546 140 CONTINUE
00547
00548
00549
00550
00551
00552 IF( ACCUM ) THEN
00553 IF( WANTT ) THEN
00554 JTOP = 1
00555 JBOT = N
00556 ELSE
00557 JTOP = KTOP
00558 JBOT = KBOT
00559 END IF
00560 IF( ( .NOT.BLK22 ) .OR. ( INCOL.LT.KTOP ) .OR.
00561 $ ( NDCOL.GT.KBOT ) .OR. ( NS.LE.2 ) ) THEN
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572 K1 = MAX( 1, KTOP-INCOL )
00573 NU = ( KDU-MAX( 0, NDCOL-KBOT ) ) - K1 + 1
00574
00575
00576
00577 DO 150 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
00578 JLEN = MIN( NH, JBOT-JCOL+1 )
00579 CALL ZGEMM( 'C', 'N', NU, JLEN, NU, ONE, U( K1, K1 ),
00580 $ LDU, H( INCOL+K1, JCOL ), LDH, ZERO, WH,
00581 $ LDWH )
00582 CALL ZLACPY( 'ALL', NU, JLEN, WH, LDWH,
00583 $ H( INCOL+K1, JCOL ), LDH )
00584 150 CONTINUE
00585
00586
00587
00588 DO 160 JROW = JTOP, MAX( KTOP, INCOL ) - 1, NV
00589 JLEN = MIN( NV, MAX( KTOP, INCOL )-JROW )
00590 CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE,
00591 $ H( JROW, INCOL+K1 ), LDH, U( K1, K1 ),
00592 $ LDU, ZERO, WV, LDWV )
00593 CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV,
00594 $ H( JROW, INCOL+K1 ), LDH )
00595 160 CONTINUE
00596
00597
00598
00599 IF( WANTZ ) THEN
00600 DO 170 JROW = ILOZ, IHIZ, NV
00601 JLEN = MIN( NV, IHIZ-JROW+1 )
00602 CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE,
00603 $ Z( JROW, INCOL+K1 ), LDZ, U( K1, K1 ),
00604 $ LDU, ZERO, WV, LDWV )
00605 CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV,
00606 $ Z( JROW, INCOL+K1 ), LDZ )
00607 170 CONTINUE
00608 END IF
00609 ELSE
00610
00611
00612
00613
00614
00615 I2 = ( KDU+1 ) / 2
00616 I4 = KDU
00617 J2 = I4 - I2
00618 J4 = KDU
00619
00620
00621
00622
00623
00624 KZS = ( J4-J2 ) - ( NS+1 )
00625 KNZ = NS + 1
00626
00627
00628
00629 DO 180 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
00630 JLEN = MIN( NH, JBOT-JCOL+1 )
00631
00632
00633
00634
00635 CALL ZLACPY( 'ALL', KNZ, JLEN, H( INCOL+1+J2, JCOL ),
00636 $ LDH, WH( KZS+1, 1 ), LDWH )
00637
00638
00639
00640 CALL ZLASET( 'ALL', KZS, JLEN, ZERO, ZERO, WH, LDWH )
00641 CALL ZTRMM( 'L', 'U', 'C', 'N', KNZ, JLEN, ONE,
00642 $ U( J2+1, 1+KZS ), LDU, WH( KZS+1, 1 ),
00643 $ LDWH )
00644
00645
00646
00647 CALL ZGEMM( 'C', 'N', I2, JLEN, J2, ONE, U, LDU,
00648 $ H( INCOL+1, JCOL ), LDH, ONE, WH, LDWH )
00649
00650
00651
00652 CALL ZLACPY( 'ALL', J2, JLEN, H( INCOL+1, JCOL ), LDH,
00653 $ WH( I2+1, 1 ), LDWH )
00654
00655
00656
00657 CALL ZTRMM( 'L', 'L', 'C', 'N', J2, JLEN, ONE,
00658 $ U( 1, I2+1 ), LDU, WH( I2+1, 1 ), LDWH )
00659
00660
00661
00662 CALL ZGEMM( 'C', 'N', I4-I2, JLEN, J4-J2, ONE,
00663 $ U( J2+1, I2+1 ), LDU,
00664 $ H( INCOL+1+J2, JCOL ), LDH, ONE,
00665 $ WH( I2+1, 1 ), LDWH )
00666
00667
00668
00669 CALL ZLACPY( 'ALL', KDU, JLEN, WH, LDWH,
00670 $ H( INCOL+1, JCOL ), LDH )
00671 180 CONTINUE
00672
00673
00674
00675 DO 190 JROW = JTOP, MAX( INCOL, KTOP ) - 1, NV
00676 JLEN = MIN( NV, MAX( INCOL, KTOP )-JROW )
00677
00678
00679
00680
00681 CALL ZLACPY( 'ALL', JLEN, KNZ, H( JROW, INCOL+1+J2 ),
00682 $ LDH, WV( 1, 1+KZS ), LDWV )
00683
00684
00685
00686 CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, LDWV )
00687 CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
00688 $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
00689 $ LDWV )
00690
00691
00692
00693 CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE,
00694 $ H( JROW, INCOL+1 ), LDH, U, LDU, ONE, WV,
00695 $ LDWV )
00696
00697
00698
00699 CALL ZLACPY( 'ALL', JLEN, J2, H( JROW, INCOL+1 ), LDH,
00700 $ WV( 1, 1+I2 ), LDWV )
00701
00702
00703
00704 CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
00705 $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), LDWV )
00706
00707
00708
00709 CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
00710 $ H( JROW, INCOL+1+J2 ), LDH,
00711 $ U( J2+1, I2+1 ), LDU, ONE, WV( 1, 1+I2 ),
00712 $ LDWV )
00713
00714
00715
00716 CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV,
00717 $ H( JROW, INCOL+1 ), LDH )
00718 190 CONTINUE
00719
00720
00721
00722 IF( WANTZ ) THEN
00723 DO 200 JROW = ILOZ, IHIZ, NV
00724 JLEN = MIN( NV, IHIZ-JROW+1 )
00725
00726
00727
00728
00729 CALL ZLACPY( 'ALL', JLEN, KNZ,
00730 $ Z( JROW, INCOL+1+J2 ), LDZ,
00731 $ WV( 1, 1+KZS ), LDWV )
00732
00733
00734
00735 CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV,
00736 $ LDWV )
00737 CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
00738 $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
00739 $ LDWV )
00740
00741
00742
00743 CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE,
00744 $ Z( JROW, INCOL+1 ), LDZ, U, LDU, ONE,
00745 $ WV, LDWV )
00746
00747
00748
00749 CALL ZLACPY( 'ALL', JLEN, J2, Z( JROW, INCOL+1 ),
00750 $ LDZ, WV( 1, 1+I2 ), LDWV )
00751
00752
00753
00754 CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
00755 $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ),
00756 $ LDWV )
00757
00758
00759
00760 CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
00761 $ Z( JROW, INCOL+1+J2 ), LDZ,
00762 $ U( J2+1, I2+1 ), LDU, ONE,
00763 $ WV( 1, 1+I2 ), LDWV )
00764
00765
00766
00767 CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV,
00768 $ Z( JROW, INCOL+1 ), LDZ )
00769 200 CONTINUE
00770 END IF
00771 END IF
00772 END IF
00773 210 CONTINUE
00774
00775
00776
00777 END