00001 SUBROUTINE CLAQR5( 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 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 ZERO, ONE
00139 PARAMETER ( ZERO = ( 0.0e0, 0.0e0 ),
00140 $ ONE = ( 1.0e0, 0.0e0 ) )
00141 REAL RZERO, RONE
00142 PARAMETER ( RZERO = 0.0e0, RONE = 1.0e0 )
00143
00144
00145 COMPLEX ALPHA, BETA, CDUM, REFSUM
00146 REAL 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 REAL SLAMCH
00156 EXTERNAL SLAMCH
00157
00158
00159
00160 INTRINSIC ABS, AIMAG, CONJG, MAX, MIN, MOD, REAL
00161
00162
00163 COMPLEX VT( 3 )
00164
00165
00166 EXTERNAL CGEMM, CLACPY, CLAQR1, CLARFG, CLASET, CTRMM,
00167 $ SLABAD
00168
00169
00170 REAL CABS1
00171
00172
00173 CABS1( CDUM ) = ABS( REAL( CDUM ) ) + ABS( AIMAG( 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 = SLAMCH( 'SAFE MINIMUM' )
00196 SAFMAX = RONE / SAFMIN
00197 CALL SLABAD( SAFMIN, SAFMAX )
00198 ULP = SLAMCH( 'PRECISION' )
00199 SMLNUM = SAFMIN*( REAL( 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 CLASET( '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 CLAQR1( 3, H( KTOP, KTOP ), LDH, S( 2*M-1 ),
00264 $ S( 2*M ), V( 1, M ) )
00265 ALPHA = V( 1, M )
00266 CALL CLARFG( 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 CLARFG( 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 CLAQR1( 3, H( K+1, K+1 ), LDH, S( 2*M-1 ),
00295 $ S( 2*M ), VT )
00296 ALPHA = VT( 1 )
00297 CALL CLARFG( 3, ALPHA, VT( 2 ), 1, VT( 1 ) )
00298 REFSUM = CONJG( VT( 1 ) )*
00299 $ ( H( K+1, K )+CONJG( 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 CLAQR1( 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 CLARFG( 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 CLARFG( 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 = CONJG( V( 1, M ) )*
00364 $ ( H( K+1, J )+CONJG( V( 2, M ) )*H( K+2, J )+
00365 $ CONJG( 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 = CONJG( V( 1, M22 ) )*
00375 $ ( H( K+1, J )+CONJG( 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*CONJG( V( 2, M ) )
00402 H( J, K+3 ) = H( J, K+3 ) -
00403 $ REFSUM*CONJG( 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*CONJG( V( 2, M ) )
00419 U( J, KMS+3 ) = U( J, KMS+3 ) -
00420 $ REFSUM*CONJG( 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*CONJG( V( 2, M ) )
00434 Z( J, K+3 ) = Z( J, K+3 ) -
00435 $ REFSUM*CONJG( 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*CONJG( 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*CONJG( 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*CONJG( 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*CONJG( V( 2, M ) )
00540 H( K+4, K+3 ) = H( K+4, K+3 ) - REFSUM*CONJG( V( 3, M ) )
00541 130 CONTINUE
00542
00543
00544
00545 140 CONTINUE
00546
00547
00548
00549
00550
00551 IF( ACCUM ) THEN
00552 IF( WANTT ) THEN
00553 JTOP = 1
00554 JBOT = N
00555 ELSE
00556 JTOP = KTOP
00557 JBOT = KBOT
00558 END IF
00559 IF( ( .NOT.BLK22 ) .OR. ( INCOL.LT.KTOP ) .OR.
00560 $ ( NDCOL.GT.KBOT ) .OR. ( NS.LE.2 ) ) THEN
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571 K1 = MAX( 1, KTOP-INCOL )
00572 NU = ( KDU-MAX( 0, NDCOL-KBOT ) ) - K1 + 1
00573
00574
00575
00576 DO 150 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
00577 JLEN = MIN( NH, JBOT-JCOL+1 )
00578 CALL CGEMM( 'C', 'N', NU, JLEN, NU, ONE, U( K1, K1 ),
00579 $ LDU, H( INCOL+K1, JCOL ), LDH, ZERO, WH,
00580 $ LDWH )
00581 CALL CLACPY( 'ALL', NU, JLEN, WH, LDWH,
00582 $ H( INCOL+K1, JCOL ), LDH )
00583 150 CONTINUE
00584
00585
00586
00587 DO 160 JROW = JTOP, MAX( KTOP, INCOL ) - 1, NV
00588 JLEN = MIN( NV, MAX( KTOP, INCOL )-JROW )
00589 CALL CGEMM( 'N', 'N', JLEN, NU, NU, ONE,
00590 $ H( JROW, INCOL+K1 ), LDH, U( K1, K1 ),
00591 $ LDU, ZERO, WV, LDWV )
00592 CALL CLACPY( 'ALL', JLEN, NU, WV, LDWV,
00593 $ H( JROW, INCOL+K1 ), LDH )
00594 160 CONTINUE
00595
00596
00597
00598 IF( WANTZ ) THEN
00599 DO 170 JROW = ILOZ, IHIZ, NV
00600 JLEN = MIN( NV, IHIZ-JROW+1 )
00601 CALL CGEMM( 'N', 'N', JLEN, NU, NU, ONE,
00602 $ Z( JROW, INCOL+K1 ), LDZ, U( K1, K1 ),
00603 $ LDU, ZERO, WV, LDWV )
00604 CALL CLACPY( 'ALL', JLEN, NU, WV, LDWV,
00605 $ Z( JROW, INCOL+K1 ), LDZ )
00606 170 CONTINUE
00607 END IF
00608 ELSE
00609
00610
00611
00612
00613
00614 I2 = ( KDU+1 ) / 2
00615 I4 = KDU
00616 J2 = I4 - I2
00617 J4 = KDU
00618
00619
00620
00621
00622
00623 KZS = ( J4-J2 ) - ( NS+1 )
00624 KNZ = NS + 1
00625
00626
00627
00628 DO 180 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
00629 JLEN = MIN( NH, JBOT-JCOL+1 )
00630
00631
00632
00633
00634 CALL CLACPY( 'ALL', KNZ, JLEN, H( INCOL+1+J2, JCOL ),
00635 $ LDH, WH( KZS+1, 1 ), LDWH )
00636
00637
00638
00639 CALL CLASET( 'ALL', KZS, JLEN, ZERO, ZERO, WH, LDWH )
00640 CALL CTRMM( 'L', 'U', 'C', 'N', KNZ, JLEN, ONE,
00641 $ U( J2+1, 1+KZS ), LDU, WH( KZS+1, 1 ),
00642 $ LDWH )
00643
00644
00645
00646 CALL CGEMM( 'C', 'N', I2, JLEN, J2, ONE, U, LDU,
00647 $ H( INCOL+1, JCOL ), LDH, ONE, WH, LDWH )
00648
00649
00650
00651 CALL CLACPY( 'ALL', J2, JLEN, H( INCOL+1, JCOL ), LDH,
00652 $ WH( I2+1, 1 ), LDWH )
00653
00654
00655
00656 CALL CTRMM( 'L', 'L', 'C', 'N', J2, JLEN, ONE,
00657 $ U( 1, I2+1 ), LDU, WH( I2+1, 1 ), LDWH )
00658
00659
00660
00661 CALL CGEMM( 'C', 'N', I4-I2, JLEN, J4-J2, ONE,
00662 $ U( J2+1, I2+1 ), LDU,
00663 $ H( INCOL+1+J2, JCOL ), LDH, ONE,
00664 $ WH( I2+1, 1 ), LDWH )
00665
00666
00667
00668 CALL CLACPY( 'ALL', KDU, JLEN, WH, LDWH,
00669 $ H( INCOL+1, JCOL ), LDH )
00670 180 CONTINUE
00671
00672
00673
00674 DO 190 JROW = JTOP, MAX( INCOL, KTOP ) - 1, NV
00675 JLEN = MIN( NV, MAX( INCOL, KTOP )-JROW )
00676
00677
00678
00679
00680 CALL CLACPY( 'ALL', JLEN, KNZ, H( JROW, INCOL+1+J2 ),
00681 $ LDH, WV( 1, 1+KZS ), LDWV )
00682
00683
00684
00685 CALL CLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, LDWV )
00686 CALL CTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
00687 $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
00688 $ LDWV )
00689
00690
00691
00692 CALL CGEMM( 'N', 'N', JLEN, I2, J2, ONE,
00693 $ H( JROW, INCOL+1 ), LDH, U, LDU, ONE, WV,
00694 $ LDWV )
00695
00696
00697
00698 CALL CLACPY( 'ALL', JLEN, J2, H( JROW, INCOL+1 ), LDH,
00699 $ WV( 1, 1+I2 ), LDWV )
00700
00701
00702
00703 CALL CTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
00704 $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), LDWV )
00705
00706
00707
00708 CALL CGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
00709 $ H( JROW, INCOL+1+J2 ), LDH,
00710 $ U( J2+1, I2+1 ), LDU, ONE, WV( 1, 1+I2 ),
00711 $ LDWV )
00712
00713
00714
00715 CALL CLACPY( 'ALL', JLEN, KDU, WV, LDWV,
00716 $ H( JROW, INCOL+1 ), LDH )
00717 190 CONTINUE
00718
00719
00720
00721 IF( WANTZ ) THEN
00722 DO 200 JROW = ILOZ, IHIZ, NV
00723 JLEN = MIN( NV, IHIZ-JROW+1 )
00724
00725
00726
00727
00728 CALL CLACPY( 'ALL', JLEN, KNZ,
00729 $ Z( JROW, INCOL+1+J2 ), LDZ,
00730 $ WV( 1, 1+KZS ), LDWV )
00731
00732
00733
00734 CALL CLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV,
00735 $ LDWV )
00736 CALL CTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
00737 $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
00738 $ LDWV )
00739
00740
00741
00742 CALL CGEMM( 'N', 'N', JLEN, I2, J2, ONE,
00743 $ Z( JROW, INCOL+1 ), LDZ, U, LDU, ONE,
00744 $ WV, LDWV )
00745
00746
00747
00748 CALL CLACPY( 'ALL', JLEN, J2, Z( JROW, INCOL+1 ),
00749 $ LDZ, WV( 1, 1+I2 ), LDWV )
00750
00751
00752
00753 CALL CTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
00754 $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ),
00755 $ LDWV )
00756
00757
00758
00759 CALL CGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
00760 $ Z( JROW, INCOL+1+J2 ), LDZ,
00761 $ U( J2+1, I2+1 ), LDU, ONE,
00762 $ WV( 1, 1+I2 ), LDWV )
00763
00764
00765
00766 CALL CLACPY( 'ALL', JLEN, KDU, WV, LDWV,
00767 $ Z( JROW, INCOL+1 ), LDZ )
00768 200 CONTINUE
00769 END IF
00770 END IF
00771 END IF
00772 210 CONTINUE
00773
00774
00775
00776 END