00001 DOUBLE PRECISION FUNCTION ZLANHF( NORM, TRANSR, UPLO, N, A, WORK )
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 CHARACTER NORM, TRANSR, UPLO
00013 INTEGER N
00014
00015
00016 DOUBLE PRECISION WORK( 0: * )
00017 COMPLEX*16 A( 0: * )
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
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201 DOUBLE PRECISION ONE, ZERO
00202 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
00203
00204
00205 INTEGER I, J, IFM, ILU, NOE, N1, K, L, LDA
00206 DOUBLE PRECISION SCALE, S, VALUE, AA
00207
00208
00209 LOGICAL LSAME
00210 INTEGER IDAMAX
00211 EXTERNAL LSAME, IDAMAX
00212
00213
00214 EXTERNAL ZLASSQ
00215
00216
00217 INTRINSIC ABS, DBLE, MAX, SQRT
00218
00219
00220
00221 IF( N.EQ.0 ) THEN
00222 ZLANHF = ZERO
00223 RETURN
00224 END IF
00225
00226
00227
00228 NOE = 1
00229 IF( MOD( N, 2 ).EQ.0 )
00230 + NOE = 0
00231
00232
00233
00234 IFM = 1
00235 IF( LSAME( TRANSR, 'C' ) )
00236 + IFM = 0
00237
00238
00239
00240 ILU = 1
00241 IF( LSAME( UPLO, 'U' ) )
00242 + ILU = 0
00243
00244
00245
00246
00247
00248 IF( IFM.EQ.1 ) THEN
00249 IF( NOE.EQ.1 ) THEN
00250 LDA = N
00251 ELSE
00252
00253 LDA = N + 1
00254 END IF
00255 ELSE
00256
00257 LDA = ( N+1 ) / 2
00258 END IF
00259
00260 IF( LSAME( NORM, 'M' ) ) THEN
00261
00262
00263
00264 K = ( N+1 ) / 2
00265 VALUE = ZERO
00266 IF( NOE.EQ.1 ) THEN
00267
00268 IF( IFM.EQ.1 ) THEN
00269
00270 IF( ILU.EQ.1 ) THEN
00271
00272 J = 0
00273
00274 VALUE = MAX( VALUE, ABS( DBLE( A( J+J*LDA ) ) ) )
00275 DO I = 1, N - 1
00276 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00277 END DO
00278 DO J = 1, K - 1
00279 DO I = 0, J - 2
00280 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00281 END DO
00282 I = J - 1
00283
00284 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00285 I = J
00286
00287 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00288 DO I = J + 1, N - 1
00289 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00290 END DO
00291 END DO
00292 ELSE
00293
00294 DO J = 0, K - 2
00295 DO I = 0, K + J - 2
00296 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00297 END DO
00298 I = K + J - 1
00299
00300 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00301 I = I + 1
00302
00303 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00304 DO I = K + J + 1, N - 1
00305 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00306 END DO
00307 END DO
00308 DO I = 0, N - 2
00309 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00310
00311 END DO
00312
00313 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00314 END IF
00315 ELSE
00316
00317 IF( ILU.EQ.1 ) THEN
00318
00319 DO J = 0, K - 2
00320 DO I = 0, J - 1
00321 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00322 END DO
00323 I = J
00324
00325 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00326 I = J + 1
00327
00328 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00329 DO I = J + 2, K - 1
00330 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00331 END DO
00332 END DO
00333 J = K - 1
00334 DO I = 0, K - 2
00335 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00336 END DO
00337 I = K - 1
00338
00339 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00340 DO J = K, N - 1
00341 DO I = 0, K - 1
00342 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00343 END DO
00344 END DO
00345 ELSE
00346
00347 DO J = 0, K - 2
00348 DO I = 0, K - 1
00349 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00350 END DO
00351 END DO
00352 J = K - 1
00353
00354 VALUE = MAX( VALUE, ABS( DBLE( A( 0+J*LDA ) ) ) )
00355 DO I = 1, K - 1
00356 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00357 END DO
00358 DO J = K, N - 1
00359 DO I = 0, J - K - 1
00360 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00361 END DO
00362 I = J - K
00363
00364 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00365 I = J - K + 1
00366
00367 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00368 DO I = J - K + 2, K - 1
00369 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00370 END DO
00371 END DO
00372 END IF
00373 END IF
00374 ELSE
00375
00376 IF( IFM.EQ.1 ) THEN
00377
00378 IF( ILU.EQ.1 ) THEN
00379
00380 J = 0
00381
00382 VALUE = MAX( VALUE, ABS( DBLE( A( J+J*LDA ) ) ) )
00383 VALUE = MAX( VALUE, ABS( DBLE( A( J+1+J*LDA ) ) ) )
00384 DO I = 2, N
00385 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00386 END DO
00387 DO J = 1, K - 1
00388 DO I = 0, J - 1
00389 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00390 END DO
00391 I = J
00392
00393 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00394 I = J + 1
00395
00396 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00397 DO I = J + 2, N
00398 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00399 END DO
00400 END DO
00401 ELSE
00402
00403 DO J = 0, K - 2
00404 DO I = 0, K + J - 1
00405 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00406 END DO
00407 I = K + J
00408
00409 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00410 I = I + 1
00411
00412 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00413 DO I = K + J + 2, N
00414 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00415 END DO
00416 END DO
00417 DO I = 0, N - 2
00418 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00419
00420 END DO
00421
00422 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00423 I = N
00424
00425 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00426 END IF
00427 ELSE
00428
00429 IF( ILU.EQ.1 ) THEN
00430
00431 J = 0
00432
00433 VALUE = MAX( VALUE, ABS( DBLE( A( J+J*LDA ) ) ) )
00434 DO I = 1, K - 1
00435 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00436 END DO
00437 DO J = 1, K - 1
00438 DO I = 0, J - 2
00439 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00440 END DO
00441 I = J - 1
00442
00443 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00444 I = J
00445
00446 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00447 DO I = J + 1, K - 1
00448 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00449 END DO
00450 END DO
00451 J = K
00452 DO I = 0, K - 2
00453 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00454 END DO
00455 I = K - 1
00456
00457 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00458 DO J = K + 1, N
00459 DO I = 0, K - 1
00460 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00461 END DO
00462 END DO
00463 ELSE
00464
00465 DO J = 0, K - 1
00466 DO I = 0, K - 1
00467 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00468 END DO
00469 END DO
00470 J = K
00471
00472 VALUE = MAX( VALUE, ABS( DBLE( A( 0+J*LDA ) ) ) )
00473 DO I = 1, K - 1
00474 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00475 END DO
00476 DO J = K + 1, N - 1
00477 DO I = 0, J - K - 2
00478 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00479 END DO
00480 I = J - K - 1
00481
00482 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00483 I = J - K
00484
00485 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00486 DO I = J - K + 1, K - 1
00487 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00488 END DO
00489 END DO
00490 J = N
00491 DO I = 0, K - 2
00492 VALUE = MAX( VALUE, ABS( A( I+J*LDA ) ) )
00493 END DO
00494 I = K - 1
00495
00496 VALUE = MAX( VALUE, ABS( DBLE( A( I+J*LDA ) ) ) )
00497 END IF
00498 END IF
00499 END IF
00500 ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR.
00501 + ( NORM.EQ.'1' ) ) THEN
00502
00503
00504
00505 IF( IFM.EQ.1 ) THEN
00506
00507 K = N / 2
00508 IF( NOE.EQ.1 ) THEN
00509
00510 IF( ILU.EQ.0 ) THEN
00511
00512 DO I = 0, K - 1
00513 WORK( I ) = ZERO
00514 END DO
00515 DO J = 0, K
00516 S = ZERO
00517 DO I = 0, K + J - 1
00518 AA = ABS( A( I+J*LDA ) )
00519
00520 S = S + AA
00521 WORK( I ) = WORK( I ) + AA
00522 END DO
00523 AA = ABS( DBLE( A( I+J*LDA ) ) )
00524
00525 WORK( J+K ) = S + AA
00526 IF( I.EQ.K+K )
00527 + GO TO 10
00528 I = I + 1
00529 AA = ABS( DBLE( A( I+J*LDA ) ) )
00530
00531 WORK( J ) = WORK( J ) + AA
00532 S = ZERO
00533 DO L = J + 1, K - 1
00534 I = I + 1
00535 AA = ABS( A( I+J*LDA ) )
00536
00537 S = S + AA
00538 WORK( L ) = WORK( L ) + AA
00539 END DO
00540 WORK( J ) = WORK( J ) + S
00541 END DO
00542 10 CONTINUE
00543 I = IDAMAX( N, WORK, 1 )
00544 VALUE = WORK( I-1 )
00545 ELSE
00546
00547 K = K + 1
00548
00549 DO I = K, N - 1
00550 WORK( I ) = ZERO
00551 END DO
00552 DO J = K - 1, 0, -1
00553 S = ZERO
00554 DO I = 0, J - 2
00555 AA = ABS( A( I+J*LDA ) )
00556
00557 S = S + AA
00558 WORK( I+K ) = WORK( I+K ) + AA
00559 END DO
00560 IF( J.GT.0 ) THEN
00561 AA = ABS( DBLE( A( I+J*LDA ) ) )
00562
00563 S = S + AA
00564 WORK( I+K ) = WORK( I+K ) + S
00565
00566 I = I + 1
00567 END IF
00568 AA = ABS( DBLE( A( I+J*LDA ) ) )
00569
00570 WORK( J ) = AA
00571 S = ZERO
00572 DO L = J + 1, N - 1
00573 I = I + 1
00574 AA = ABS( A( I+J*LDA ) )
00575
00576 S = S + AA
00577 WORK( L ) = WORK( L ) + AA
00578 END DO
00579 WORK( J ) = WORK( J ) + S
00580 END DO
00581 I = IDAMAX( N, WORK, 1 )
00582 VALUE = WORK( I-1 )
00583 END IF
00584 ELSE
00585
00586 IF( ILU.EQ.0 ) THEN
00587
00588 DO I = 0, K - 1
00589 WORK( I ) = ZERO
00590 END DO
00591 DO J = 0, K - 1
00592 S = ZERO
00593 DO I = 0, K + J - 1
00594 AA = ABS( A( I+J*LDA ) )
00595
00596 S = S + AA
00597 WORK( I ) = WORK( I ) + AA
00598 END DO
00599 AA = ABS( DBLE( A( I+J*LDA ) ) )
00600
00601 WORK( J+K ) = S + AA
00602 I = I + 1
00603 AA = ABS( DBLE( A( I+J*LDA ) ) )
00604
00605 WORK( J ) = WORK( J ) + AA
00606 S = ZERO
00607 DO L = J + 1, K - 1
00608 I = I + 1
00609 AA = ABS( A( I+J*LDA ) )
00610
00611 S = S + AA
00612 WORK( L ) = WORK( L ) + AA
00613 END DO
00614 WORK( J ) = WORK( J ) + S
00615 END DO
00616 I = IDAMAX( N, WORK, 1 )
00617 VALUE = WORK( I-1 )
00618 ELSE
00619
00620 DO I = K, N - 1
00621 WORK( I ) = ZERO
00622 END DO
00623 DO J = K - 1, 0, -1
00624 S = ZERO
00625 DO I = 0, J - 1
00626 AA = ABS( A( I+J*LDA ) )
00627
00628 S = S + AA
00629 WORK( I+K ) = WORK( I+K ) + AA
00630 END DO
00631 AA = ABS( DBLE( A( I+J*LDA ) ) )
00632
00633 S = S + AA
00634 WORK( I+K ) = WORK( I+K ) + S
00635
00636 I = I + 1
00637 AA = ABS( DBLE( A( I+J*LDA ) ) )
00638
00639 WORK( J ) = AA
00640 S = ZERO
00641 DO L = J + 1, N - 1
00642 I = I + 1
00643 AA = ABS( A( I+J*LDA ) )
00644
00645 S = S + AA
00646 WORK( L ) = WORK( L ) + AA
00647 END DO
00648 WORK( J ) = WORK( J ) + S
00649 END DO
00650 I = IDAMAX( N, WORK, 1 )
00651 VALUE = WORK( I-1 )
00652 END IF
00653 END IF
00654 ELSE
00655
00656 K = N / 2
00657 IF( NOE.EQ.1 ) THEN
00658
00659 IF( ILU.EQ.0 ) THEN
00660
00661 N1 = K
00662
00663 K = K + 1
00664
00665 DO I = N1, N - 1
00666 WORK( I ) = ZERO
00667 END DO
00668 DO J = 0, N1 - 1
00669 S = ZERO
00670 DO I = 0, K - 1
00671 AA = ABS( A( I+J*LDA ) )
00672
00673 WORK( I+N1 ) = WORK( I+N1 ) + AA
00674 S = S + AA
00675 END DO
00676 WORK( J ) = S
00677 END DO
00678
00679 S = ABS( DBLE( A( 0+J*LDA ) ) )
00680
00681 DO I = 1, K - 1
00682 AA = ABS( A( I+J*LDA ) )
00683
00684 WORK( I+N1 ) = WORK( I+N1 ) + AA
00685 S = S + AA
00686 END DO
00687 WORK( J ) = WORK( J ) + S
00688 DO J = K, N - 1
00689 S = ZERO
00690 DO I = 0, J - K - 1
00691 AA = ABS( A( I+J*LDA ) )
00692
00693 WORK( I ) = WORK( I ) + AA
00694 S = S + AA
00695 END DO
00696
00697 AA = ABS( DBLE( A( I+J*LDA ) ) )
00698
00699 S = S + AA
00700 WORK( J-K ) = WORK( J-K ) + S
00701 I = I + 1
00702 S = ABS( DBLE( A( I+J*LDA ) ) )
00703
00704 DO L = J + 1, N - 1
00705 I = I + 1
00706 AA = ABS( A( I+J*LDA ) )
00707
00708 WORK( L ) = WORK( L ) + AA
00709 S = S + AA
00710 END DO
00711 WORK( J ) = WORK( J ) + S
00712 END DO
00713 I = IDAMAX( N, WORK, 1 )
00714 VALUE = WORK( I-1 )
00715 ELSE
00716
00717 K = K + 1
00718
00719 DO I = K, N - 1
00720 WORK( I ) = ZERO
00721 END DO
00722 DO J = 0, K - 2
00723
00724 S = ZERO
00725 DO I = 0, J - 1
00726 AA = ABS( A( I+J*LDA ) )
00727
00728 WORK( I ) = WORK( I ) + AA
00729 S = S + AA
00730 END DO
00731 AA = ABS( DBLE( A( I+J*LDA ) ) )
00732
00733 S = S + AA
00734 WORK( J ) = S
00735
00736 I = I + 1
00737
00738 AA = ABS( DBLE( A( I+J*LDA ) ) )
00739 S = AA
00740 DO L = K + J + 1, N - 1
00741 I = I + 1
00742 AA = ABS( A( I+J*LDA ) )
00743
00744 S = S + AA
00745 WORK( L ) = WORK( L ) + AA
00746 END DO
00747 WORK( K+J ) = WORK( K+J ) + S
00748 END DO
00749
00750 S = ZERO
00751 DO I = 0, K - 2
00752 AA = ABS( A( I+J*LDA ) )
00753
00754 WORK( I ) = WORK( I ) + AA
00755 S = S + AA
00756 END DO
00757
00758 AA = ABS( DBLE( A( I+J*LDA ) ) )
00759
00760 S = S + AA
00761 WORK( I ) = S
00762
00763 DO J = K, N - 1
00764
00765 S = ZERO
00766 DO I = 0, K - 1
00767 AA = ABS( A( I+J*LDA ) )
00768
00769 WORK( I ) = WORK( I ) + AA
00770 S = S + AA
00771 END DO
00772 WORK( J ) = WORK( J ) + S
00773 END DO
00774 I = IDAMAX( N, WORK, 1 )
00775 VALUE = WORK( I-1 )
00776 END IF
00777 ELSE
00778
00779 IF( ILU.EQ.0 ) THEN
00780
00781 DO I = K, N - 1
00782 WORK( I ) = ZERO
00783 END DO
00784 DO J = 0, K - 1
00785 S = ZERO
00786 DO I = 0, K - 1
00787 AA = ABS( A( I+J*LDA ) )
00788
00789 WORK( I+K ) = WORK( I+K ) + AA
00790 S = S + AA
00791 END DO
00792 WORK( J ) = S
00793 END DO
00794
00795 AA = ABS( DBLE( A( 0+J*LDA ) ) )
00796
00797 S = AA
00798 DO I = 1, K - 1
00799 AA = ABS( A( I+J*LDA ) )
00800
00801 WORK( I+K ) = WORK( I+K ) + AA
00802 S = S + AA
00803 END DO
00804 WORK( J ) = WORK( J ) + S
00805 DO J = K + 1, N - 1
00806 S = ZERO
00807 DO I = 0, J - 2 - K
00808 AA = ABS( A( I+J*LDA ) )
00809
00810 WORK( I ) = WORK( I ) + AA
00811 S = S + AA
00812 END DO
00813
00814 AA = ABS( DBLE( A( I+J*LDA ) ) )
00815
00816 S = S + AA
00817 WORK( J-K-1 ) = WORK( J-K-1 ) + S
00818 I = I + 1
00819 AA = ABS( DBLE( A( I+J*LDA ) ) )
00820
00821 S = AA
00822 DO L = J + 1, N - 1
00823 I = I + 1
00824 AA = ABS( A( I+J*LDA ) )
00825
00826 WORK( L ) = WORK( L ) + AA
00827 S = S + AA
00828 END DO
00829 WORK( J ) = WORK( J ) + S
00830 END DO
00831
00832 S = ZERO
00833 DO I = 0, K - 2
00834 AA = ABS( A( I+J*LDA ) )
00835
00836 WORK( I ) = WORK( I ) + AA
00837 S = S + AA
00838 END DO
00839
00840 AA = ABS( DBLE( A( I+J*LDA ) ) )
00841
00842 S = S + AA
00843 WORK( I ) = WORK( I ) + S
00844 I = IDAMAX( N, WORK, 1 )
00845 VALUE = WORK( I-1 )
00846 ELSE
00847
00848 DO I = K, N - 1
00849 WORK( I ) = ZERO
00850 END DO
00851
00852 S = ABS( DBLE( A( 0 ) ) )
00853
00854 DO I = 1, K - 1
00855 AA = ABS( A( I ) )
00856
00857 WORK( I+K ) = WORK( I+K ) + AA
00858 S = S + AA
00859 END DO
00860 WORK( K ) = WORK( K ) + S
00861 DO J = 1, K - 1
00862
00863 S = ZERO
00864 DO I = 0, J - 2
00865 AA = ABS( A( I+J*LDA ) )
00866
00867 WORK( I ) = WORK( I ) + AA
00868 S = S + AA
00869 END DO
00870 AA = ABS( DBLE( A( I+J*LDA ) ) )
00871
00872 S = S + AA
00873 WORK( J-1 ) = S
00874
00875 I = I + 1
00876
00877 AA = ABS( DBLE( A( I+J*LDA ) ) )
00878 S = AA
00879 DO L = K + J + 1, N - 1
00880 I = I + 1
00881 AA = ABS( A( I+J*LDA ) )
00882
00883 S = S + AA
00884 WORK( L ) = WORK( L ) + AA
00885 END DO
00886 WORK( K+J ) = WORK( K+J ) + S
00887 END DO
00888
00889 S = ZERO
00890 DO I = 0, K - 2
00891 AA = ABS( A( I+J*LDA ) )
00892
00893 WORK( I ) = WORK( I ) + AA
00894 S = S + AA
00895 END DO
00896
00897
00898 AA = ABS( DBLE( A( I+J*LDA ) ) )
00899
00900 S = S + AA
00901 WORK( I ) = S
00902
00903 DO J = K + 1, N
00904
00905
00906 S = ZERO
00907 DO I = 0, K - 1
00908 AA = ABS( A( I+J*LDA ) )
00909
00910 WORK( I ) = WORK( I ) + AA
00911 S = S + AA
00912 END DO
00913 WORK( J-1 ) = WORK( J-1 ) + S
00914 END DO
00915 I = IDAMAX( N, WORK, 1 )
00916 VALUE = WORK( I-1 )
00917 END IF
00918 END IF
00919 END IF
00920 ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
00921
00922
00923
00924 K = ( N+1 ) / 2
00925 SCALE = ZERO
00926 S = ONE
00927 IF( NOE.EQ.1 ) THEN
00928
00929 IF( IFM.EQ.1 ) THEN
00930
00931 IF( ILU.EQ.0 ) THEN
00932
00933 DO J = 0, K - 3
00934 CALL ZLASSQ( K-J-2, A( K+J+1+J*LDA ), 1, SCALE, S )
00935
00936 END DO
00937 DO J = 0, K - 1
00938 CALL ZLASSQ( K+J-1, A( 0+J*LDA ), 1, SCALE, S )
00939
00940 END DO
00941 S = S + S
00942
00943 L = K - 1
00944
00945 DO I = 0, K - 2
00946 AA = DBLE( A( L ) )
00947
00948 IF( AA.NE.ZERO ) THEN
00949 IF( SCALE.LT.AA ) THEN
00950 S = ONE + S*( SCALE / AA )**2
00951 SCALE = AA
00952 ELSE
00953 S = S + ( AA / SCALE )**2
00954 END IF
00955 END IF
00956 AA = DBLE( A( L+1 ) )
00957
00958 IF( AA.NE.ZERO ) THEN
00959 IF( SCALE.LT.AA ) THEN
00960 S = ONE + S*( SCALE / AA )**2
00961 SCALE = AA
00962 ELSE
00963 S = S + ( AA / SCALE )**2
00964 END IF
00965 END IF
00966 L = L + LDA + 1
00967 END DO
00968 AA = DBLE( A( L ) )
00969
00970 IF( AA.NE.ZERO ) THEN
00971 IF( SCALE.LT.AA ) THEN
00972 S = ONE + S*( SCALE / AA )**2
00973 SCALE = AA
00974 ELSE
00975 S = S + ( AA / SCALE )**2
00976 END IF
00977 END IF
00978 ELSE
00979
00980 DO J = 0, K - 1
00981 CALL ZLASSQ( N-J-1, A( J+1+J*LDA ), 1, SCALE, S )
00982
00983 END DO
00984 DO J = 1, K - 2
00985 CALL ZLASSQ( J, A( 0+( 1+J )*LDA ), 1, SCALE, S )
00986
00987 END DO
00988 S = S + S
00989
00990 AA = DBLE( A( 0 ) )
00991
00992 IF( AA.NE.ZERO ) THEN
00993 IF( SCALE.LT.AA ) THEN
00994 S = ONE + S*( SCALE / AA )**2
00995 SCALE = AA
00996 ELSE
00997 S = S + ( AA / SCALE )**2
00998 END IF
00999 END IF
01000 L = LDA
01001
01002 DO I = 1, K - 1
01003 AA = DBLE( A( L ) )
01004
01005 IF( AA.NE.ZERO ) THEN
01006 IF( SCALE.LT.AA ) THEN
01007 S = ONE + S*( SCALE / AA )**2
01008 SCALE = AA
01009 ELSE
01010 S = S + ( AA / SCALE )**2
01011 END IF
01012 END IF
01013 AA = DBLE( A( L+1 ) )
01014
01015 IF( AA.NE.ZERO ) THEN
01016 IF( SCALE.LT.AA ) THEN
01017 S = ONE + S*( SCALE / AA )**2
01018 SCALE = AA
01019 ELSE
01020 S = S + ( AA / SCALE )**2
01021 END IF
01022 END IF
01023 L = L + LDA + 1
01024 END DO
01025 END IF
01026 ELSE
01027
01028 IF( ILU.EQ.0 ) THEN
01029
01030 DO J = 1, K - 2
01031 CALL ZLASSQ( J, A( 0+( K+J )*LDA ), 1, SCALE, S )
01032
01033 END DO
01034 DO J = 0, K - 2
01035 CALL ZLASSQ( K, A( 0+J*LDA ), 1, SCALE, S )
01036
01037 END DO
01038 DO J = 0, K - 2
01039 CALL ZLASSQ( K-J-1, A( J+1+( J+K-1 )*LDA ), 1,
01040 + SCALE, S )
01041
01042 END DO
01043 S = S + S
01044
01045 L = 0 + K*LDA - LDA
01046
01047 AA = DBLE( A( L ) )
01048
01049 IF( AA.NE.ZERO ) THEN
01050 IF( SCALE.LT.AA ) THEN
01051 S = ONE + S*( SCALE / AA )**2
01052 SCALE = AA
01053 ELSE
01054 S = S + ( AA / SCALE )**2
01055 END IF
01056 END IF
01057 L = L + LDA
01058
01059 DO J = K, N - 1
01060 AA = DBLE( A( L ) )
01061
01062 IF( AA.NE.ZERO ) THEN
01063 IF( SCALE.LT.AA ) THEN
01064 S = ONE + S*( SCALE / AA )**2
01065 SCALE = AA
01066 ELSE
01067 S = S + ( AA / SCALE )**2
01068 END IF
01069 END IF
01070 AA = DBLE( A( L+1 ) )
01071
01072 IF( AA.NE.ZERO ) THEN
01073 IF( SCALE.LT.AA ) THEN
01074 S = ONE + S*( SCALE / AA )**2
01075 SCALE = AA
01076 ELSE
01077 S = S + ( AA / SCALE )**2
01078 END IF
01079 END IF
01080 L = L + LDA + 1
01081 END DO
01082 ELSE
01083
01084 DO J = 1, K - 1
01085 CALL ZLASSQ( J, A( 0+J*LDA ), 1, SCALE, S )
01086
01087 END DO
01088 DO J = K, N - 1
01089 CALL ZLASSQ( K, A( 0+J*LDA ), 1, SCALE, S )
01090
01091 END DO
01092 DO J = 0, K - 3
01093 CALL ZLASSQ( K-J-2, A( J+2+J*LDA ), 1, SCALE, S )
01094
01095 END DO
01096 S = S + S
01097
01098 L = 0
01099
01100 DO I = 0, K - 2
01101 AA = DBLE( A( L ) )
01102
01103 IF( AA.NE.ZERO ) THEN
01104 IF( SCALE.LT.AA ) THEN
01105 S = ONE + S*( SCALE / AA )**2
01106 SCALE = AA
01107 ELSE
01108 S = S + ( AA / SCALE )**2
01109 END IF
01110 END IF
01111 AA = DBLE( A( L+1 ) )
01112
01113 IF( AA.NE.ZERO ) THEN
01114 IF( SCALE.LT.AA ) THEN
01115 S = ONE + S*( SCALE / AA )**2
01116 SCALE = AA
01117 ELSE
01118 S = S + ( AA / SCALE )**2
01119 END IF
01120 END IF
01121 L = L + LDA + 1
01122 END DO
01123
01124 AA = DBLE( A( L ) )
01125
01126 IF( AA.NE.ZERO ) THEN
01127 IF( SCALE.LT.AA ) THEN
01128 S = ONE + S*( SCALE / AA )**2
01129 SCALE = AA
01130 ELSE
01131 S = S + ( AA / SCALE )**2
01132 END IF
01133 END IF
01134 END IF
01135 END IF
01136 ELSE
01137
01138 IF( IFM.EQ.1 ) THEN
01139
01140 IF( ILU.EQ.0 ) THEN
01141
01142 DO J = 0, K - 2
01143 CALL ZLASSQ( K-J-1, A( K+J+2+J*LDA ), 1, SCALE, S )
01144
01145 END DO
01146 DO J = 0, K - 1
01147 CALL ZLASSQ( K+J, A( 0+J*LDA ), 1, SCALE, S )
01148
01149 END DO
01150 S = S + S
01151
01152 L = K
01153
01154 DO I = 0, K - 1
01155 AA = DBLE( A( L ) )
01156
01157 IF( AA.NE.ZERO ) THEN
01158 IF( SCALE.LT.AA ) THEN
01159 S = ONE + S*( SCALE / AA )**2
01160 SCALE = AA
01161 ELSE
01162 S = S + ( AA / SCALE )**2
01163 END IF
01164 END IF
01165 AA = DBLE( A( L+1 ) )
01166
01167 IF( AA.NE.ZERO ) THEN
01168 IF( SCALE.LT.AA ) THEN
01169 S = ONE + S*( SCALE / AA )**2
01170 SCALE = AA
01171 ELSE
01172 S = S + ( AA / SCALE )**2
01173 END IF
01174 END IF
01175 L = L + LDA + 1
01176 END DO
01177 ELSE
01178
01179 DO J = 0, K - 1
01180 CALL ZLASSQ( N-J-1, A( J+2+J*LDA ), 1, SCALE, S )
01181
01182 END DO
01183 DO J = 1, K - 1
01184 CALL ZLASSQ( J, A( 0+J*LDA ), 1, SCALE, S )
01185
01186 END DO
01187 S = S + S
01188
01189 L = 0
01190
01191 DO I = 0, K - 1
01192 AA = DBLE( A( L ) )
01193
01194 IF( AA.NE.ZERO ) THEN
01195 IF( SCALE.LT.AA ) THEN
01196 S = ONE + S*( SCALE / AA )**2
01197 SCALE = AA
01198 ELSE
01199 S = S + ( AA / SCALE )**2
01200 END IF
01201 END IF
01202 AA = DBLE( A( L+1 ) )
01203
01204 IF( AA.NE.ZERO ) THEN
01205 IF( SCALE.LT.AA ) THEN
01206 S = ONE + S*( SCALE / AA )**2
01207 SCALE = AA
01208 ELSE
01209 S = S + ( AA / SCALE )**2
01210 END IF
01211 END IF
01212 L = L + LDA + 1
01213 END DO
01214 END IF
01215 ELSE
01216
01217 IF( ILU.EQ.0 ) THEN
01218
01219 DO J = 1, K - 1
01220 CALL ZLASSQ( J, A( 0+( K+1+J )*LDA ), 1, SCALE, S )
01221
01222 END DO
01223 DO J = 0, K - 1
01224 CALL ZLASSQ( K, A( 0+J*LDA ), 1, SCALE, S )
01225
01226 END DO
01227 DO J = 0, K - 2
01228 CALL ZLASSQ( K-J-1, A( J+1+( J+K )*LDA ), 1, SCALE,
01229 + S )
01230
01231 END DO
01232 S = S + S
01233
01234 L = 0 + K*LDA
01235
01236 AA = DBLE( A( L ) )
01237
01238 IF( AA.NE.ZERO ) THEN
01239 IF( SCALE.LT.AA ) THEN
01240 S = ONE + S*( SCALE / AA )**2
01241 SCALE = AA
01242 ELSE
01243 S = S + ( AA / SCALE )**2
01244 END IF
01245 END IF
01246 L = L + LDA
01247
01248 DO J = K + 1, N - 1
01249 AA = DBLE( A( L ) )
01250
01251 IF( AA.NE.ZERO ) THEN
01252 IF( SCALE.LT.AA ) THEN
01253 S = ONE + S*( SCALE / AA )**2
01254 SCALE = AA
01255 ELSE
01256 S = S + ( AA / SCALE )**2
01257 END IF
01258 END IF
01259 AA = DBLE( A( L+1 ) )
01260
01261 IF( AA.NE.ZERO ) THEN
01262 IF( SCALE.LT.AA ) THEN
01263 S = ONE + S*( SCALE / AA )**2
01264 SCALE = AA
01265 ELSE
01266 S = S + ( AA / SCALE )**2
01267 END IF
01268 END IF
01269 L = L + LDA + 1
01270 END DO
01271
01272
01273 AA = DBLE( A( L ) )
01274
01275 IF( AA.NE.ZERO ) THEN
01276 IF( SCALE.LT.AA ) THEN
01277 S = ONE + S*( SCALE / AA )**2
01278 SCALE = AA
01279 ELSE
01280 S = S + ( AA / SCALE )**2
01281 END IF
01282 END IF
01283 ELSE
01284
01285 DO J = 1, K - 1
01286 CALL ZLASSQ( J, A( 0+( J+1 )*LDA ), 1, SCALE, S )
01287
01288 END DO
01289 DO J = K + 1, N
01290 CALL ZLASSQ( K, A( 0+J*LDA ), 1, SCALE, S )
01291
01292 END DO
01293 DO J = 0, K - 2
01294 CALL ZLASSQ( K-J-1, A( J+1+J*LDA ), 1, SCALE, S )
01295
01296 END DO
01297 S = S + S
01298
01299 L = 0
01300
01301 AA = DBLE( A( L ) )
01302
01303 IF( AA.NE.ZERO ) THEN
01304 IF( SCALE.LT.AA ) THEN
01305 S = ONE + S*( SCALE / AA )**2
01306 SCALE = AA
01307 ELSE
01308 S = S + ( AA / SCALE )**2
01309 END IF
01310 END IF
01311 L = LDA
01312
01313 DO I = 0, K - 2
01314 AA = DBLE( A( L ) )
01315
01316 IF( AA.NE.ZERO ) THEN
01317 IF( SCALE.LT.AA ) THEN
01318 S = ONE + S*( SCALE / AA )**2
01319 SCALE = AA
01320 ELSE
01321 S = S + ( AA / SCALE )**2
01322 END IF
01323 END IF
01324 AA = DBLE( A( L+1 ) )
01325
01326 IF( AA.NE.ZERO ) THEN
01327 IF( SCALE.LT.AA ) THEN
01328 S = ONE + S*( SCALE / AA )**2
01329 SCALE = AA
01330 ELSE
01331 S = S + ( AA / SCALE )**2
01332 END IF
01333 END IF
01334 L = L + LDA + 1
01335 END DO
01336
01337 AA = DBLE( A( L ) )
01338
01339 IF( AA.NE.ZERO ) THEN
01340 IF( SCALE.LT.AA ) THEN
01341 S = ONE + S*( SCALE / AA )**2
01342 SCALE = AA
01343 ELSE
01344 S = S + ( AA / SCALE )**2
01345 END IF
01346 END IF
01347 END IF
01348 END IF
01349 END IF
01350 VALUE = SCALE*SQRT( S )
01351 END IF
01352
01353 ZLANHF = VALUE
01354 RETURN
01355
01356
01357
01358 END