00001 SUBROUTINE CTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
00002 + B, LDB )
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
00015 INTEGER LDB, M, N
00016 COMPLEX ALPHA
00017
00018
00019 COMPLEX A( 0: * ), B( 0: LDB-1, 0: * )
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
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236 COMPLEX CONE, CZERO
00237 PARAMETER ( CONE = ( 1.0E+0, 0.0E+0 ),
00238 + CZERO = ( 0.0E+0, 0.0E+0 ) )
00239
00240
00241 LOGICAL LOWER, LSIDE, MISODD, NISODD, NORMALTRANSR,
00242 + NOTRANS
00243 INTEGER M1, M2, N1, N2, K, INFO, I, J
00244
00245
00246 LOGICAL LSAME
00247 EXTERNAL LSAME
00248
00249
00250 EXTERNAL XERBLA, CGEMM, CTRSM
00251
00252
00253 INTRINSIC MAX, MOD
00254
00255
00256
00257
00258
00259 INFO = 0
00260 NORMALTRANSR = LSAME( TRANSR, 'N' )
00261 LSIDE = LSAME( SIDE, 'L' )
00262 LOWER = LSAME( UPLO, 'L' )
00263 NOTRANS = LSAME( TRANS, 'N' )
00264 IF( .NOT.NORMALTRANSR .AND. .NOT.LSAME( TRANSR, 'C' ) ) THEN
00265 INFO = -1
00266 ELSE IF( .NOT.LSIDE .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
00267 INFO = -2
00268 ELSE IF( .NOT.LOWER .AND. .NOT.LSAME( UPLO, 'U' ) ) THEN
00269 INFO = -3
00270 ELSE IF( .NOT.NOTRANS .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
00271 INFO = -4
00272 ELSE IF( .NOT.LSAME( DIAG, 'N' ) .AND. .NOT.LSAME( DIAG, 'U' ) )
00273 + THEN
00274 INFO = -5
00275 ELSE IF( M.LT.0 ) THEN
00276 INFO = -6
00277 ELSE IF( N.LT.0 ) THEN
00278 INFO = -7
00279 ELSE IF( LDB.LT.MAX( 1, M ) ) THEN
00280 INFO = -11
00281 END IF
00282 IF( INFO.NE.0 ) THEN
00283 CALL XERBLA( 'CTFSM ', -INFO )
00284 RETURN
00285 END IF
00286
00287
00288
00289 IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
00290 + RETURN
00291
00292
00293
00294 IF( ALPHA.EQ.CZERO ) THEN
00295 DO 20 J = 0, N - 1
00296 DO 10 I = 0, M - 1
00297 B( I, J ) = CZERO
00298 10 CONTINUE
00299 20 CONTINUE
00300 RETURN
00301 END IF
00302
00303 IF( LSIDE ) THEN
00304
00305
00306
00307
00308
00309
00310
00311 IF( MOD( M, 2 ).EQ.0 ) THEN
00312 MISODD = .FALSE.
00313 K = M / 2
00314 ELSE
00315 MISODD = .TRUE.
00316 IF( LOWER ) THEN
00317 M2 = M / 2
00318 M1 = M - M2
00319 ELSE
00320 M1 = M / 2
00321 M2 = M - M1
00322 END IF
00323 END IF
00324
00325 IF( MISODD ) THEN
00326
00327
00328
00329 IF( NORMALTRANSR ) THEN
00330
00331
00332
00333 IF( LOWER ) THEN
00334
00335
00336
00337 IF( NOTRANS ) THEN
00338
00339
00340
00341
00342 IF( M.EQ.1 ) THEN
00343 CALL CTRSM( 'L', 'L', 'N', DIAG, M1, N, ALPHA,
00344 + A, M, B, LDB )
00345 ELSE
00346 CALL CTRSM( 'L', 'L', 'N', DIAG, M1, N, ALPHA,
00347 + A( 0 ), M, B, LDB )
00348 CALL CGEMM( 'N', 'N', M2, N, M1, -CONE, A( M1 ),
00349 + M, B, LDB, ALPHA, B( M1, 0 ), LDB )
00350 CALL CTRSM( 'L', 'U', 'C', DIAG, M2, N, CONE,
00351 + A( M ), M, B( M1, 0 ), LDB )
00352 END IF
00353
00354 ELSE
00355
00356
00357
00358
00359 IF( M.EQ.1 ) THEN
00360 CALL CTRSM( 'L', 'L', 'C', DIAG, M1, N, ALPHA,
00361 + A( 0 ), M, B, LDB )
00362 ELSE
00363 CALL CTRSM( 'L', 'U', 'N', DIAG, M2, N, ALPHA,
00364 + A( M ), M, B( M1, 0 ), LDB )
00365 CALL CGEMM( 'C', 'N', M1, N, M2, -CONE, A( M1 ),
00366 + M, B( M1, 0 ), LDB, ALPHA, B, LDB )
00367 CALL CTRSM( 'L', 'L', 'C', DIAG, M1, N, CONE,
00368 + A( 0 ), M, B, LDB )
00369 END IF
00370
00371 END IF
00372
00373 ELSE
00374
00375
00376
00377 IF( .NOT.NOTRANS ) THEN
00378
00379
00380
00381
00382 CALL CTRSM( 'L', 'L', 'N', DIAG, M1, N, ALPHA,
00383 + A( M2 ), M, B, LDB )
00384 CALL CGEMM( 'C', 'N', M2, N, M1, -CONE, A( 0 ), M,
00385 + B, LDB, ALPHA, B( M1, 0 ), LDB )
00386 CALL CTRSM( 'L', 'U', 'C', DIAG, M2, N, CONE,
00387 + A( M1 ), M, B( M1, 0 ), LDB )
00388
00389 ELSE
00390
00391
00392
00393
00394 CALL CTRSM( 'L', 'U', 'N', DIAG, M2, N, ALPHA,
00395 + A( M1 ), M, B( M1, 0 ), LDB )
00396 CALL CGEMM( 'N', 'N', M1, N, M2, -CONE, A( 0 ), M,
00397 + B( M1, 0 ), LDB, ALPHA, B, LDB )
00398 CALL CTRSM( 'L', 'L', 'C', DIAG, M1, N, CONE,
00399 + A( M2 ), M, B, LDB )
00400
00401 END IF
00402
00403 END IF
00404
00405 ELSE
00406
00407
00408
00409 IF( LOWER ) THEN
00410
00411
00412
00413 IF( NOTRANS ) THEN
00414
00415
00416
00417
00418 IF( M.EQ.1 ) THEN
00419 CALL CTRSM( 'L', 'U', 'C', DIAG, M1, N, ALPHA,
00420 + A( 0 ), M1, B, LDB )
00421 ELSE
00422 CALL CTRSM( 'L', 'U', 'C', DIAG, M1, N, ALPHA,
00423 + A( 0 ), M1, B, LDB )
00424 CALL CGEMM( 'C', 'N', M2, N, M1, -CONE,
00425 + A( M1*M1 ), M1, B, LDB, ALPHA,
00426 + B( M1, 0 ), LDB )
00427 CALL CTRSM( 'L', 'L', 'N', DIAG, M2, N, CONE,
00428 + A( 1 ), M1, B( M1, 0 ), LDB )
00429 END IF
00430
00431 ELSE
00432
00433
00434
00435
00436 IF( M.EQ.1 ) THEN
00437 CALL CTRSM( 'L', 'U', 'N', DIAG, M1, N, ALPHA,
00438 + A( 0 ), M1, B, LDB )
00439 ELSE
00440 CALL CTRSM( 'L', 'L', 'C', DIAG, M2, N, ALPHA,
00441 + A( 1 ), M1, B( M1, 0 ), LDB )
00442 CALL CGEMM( 'N', 'N', M1, N, M2, -CONE,
00443 + A( M1*M1 ), M1, B( M1, 0 ), LDB,
00444 + ALPHA, B, LDB )
00445 CALL CTRSM( 'L', 'U', 'N', DIAG, M1, N, CONE,
00446 + A( 0 ), M1, B, LDB )
00447 END IF
00448
00449 END IF
00450
00451 ELSE
00452
00453
00454
00455 IF( .NOT.NOTRANS ) THEN
00456
00457
00458
00459
00460 CALL CTRSM( 'L', 'U', 'C', DIAG, M1, N, ALPHA,
00461 + A( M2*M2 ), M2, B, LDB )
00462 CALL CGEMM( 'N', 'N', M2, N, M1, -CONE, A( 0 ), M2,
00463 + B, LDB, ALPHA, B( M1, 0 ), LDB )
00464 CALL CTRSM( 'L', 'L', 'N', DIAG, M2, N, CONE,
00465 + A( M1*M2 ), M2, B( M1, 0 ), LDB )
00466
00467 ELSE
00468
00469
00470
00471
00472 CALL CTRSM( 'L', 'L', 'C', DIAG, M2, N, ALPHA,
00473 + A( M1*M2 ), M2, B( M1, 0 ), LDB )
00474 CALL CGEMM( 'C', 'N', M1, N, M2, -CONE, A( 0 ), M2,
00475 + B( M1, 0 ), LDB, ALPHA, B, LDB )
00476 CALL CTRSM( 'L', 'U', 'N', DIAG, M1, N, CONE,
00477 + A( M2*M2 ), M2, B, LDB )
00478
00479 END IF
00480
00481 END IF
00482
00483 END IF
00484
00485 ELSE
00486
00487
00488
00489 IF( NORMALTRANSR ) THEN
00490
00491
00492
00493 IF( LOWER ) THEN
00494
00495
00496
00497 IF( NOTRANS ) THEN
00498
00499
00500
00501
00502 CALL CTRSM( 'L', 'L', 'N', DIAG, K, N, ALPHA,
00503 + A( 1 ), M+1, B, LDB )
00504 CALL CGEMM( 'N', 'N', K, N, K, -CONE, A( K+1 ),
00505 + M+1, B, LDB, ALPHA, B( K, 0 ), LDB )
00506 CALL CTRSM( 'L', 'U', 'C', DIAG, K, N, CONE,
00507 + A( 0 ), M+1, B( K, 0 ), LDB )
00508
00509 ELSE
00510
00511
00512
00513
00514 CALL CTRSM( 'L', 'U', 'N', DIAG, K, N, ALPHA,
00515 + A( 0 ), M+1, B( K, 0 ), LDB )
00516 CALL CGEMM( 'C', 'N', K, N, K, -CONE, A( K+1 ),
00517 + M+1, B( K, 0 ), LDB, ALPHA, B, LDB )
00518 CALL CTRSM( 'L', 'L', 'C', DIAG, K, N, CONE,
00519 + A( 1 ), M+1, B, LDB )
00520
00521 END IF
00522
00523 ELSE
00524
00525
00526
00527 IF( .NOT.NOTRANS ) THEN
00528
00529
00530
00531
00532 CALL CTRSM( 'L', 'L', 'N', DIAG, K, N, ALPHA,
00533 + A( K+1 ), M+1, B, LDB )
00534 CALL CGEMM( 'C', 'N', K, N, K, -CONE, A( 0 ), M+1,
00535 + B, LDB, ALPHA, B( K, 0 ), LDB )
00536 CALL CTRSM( 'L', 'U', 'C', DIAG, K, N, CONE,
00537 + A( K ), M+1, B( K, 0 ), LDB )
00538
00539 ELSE
00540
00541
00542
00543 CALL CTRSM( 'L', 'U', 'N', DIAG, K, N, ALPHA,
00544 + A( K ), M+1, B( K, 0 ), LDB )
00545 CALL CGEMM( 'N', 'N', K, N, K, -CONE, A( 0 ), M+1,
00546 + B( K, 0 ), LDB, ALPHA, B, LDB )
00547 CALL CTRSM( 'L', 'L', 'C', DIAG, K, N, CONE,
00548 + A( K+1 ), M+1, B, LDB )
00549
00550 END IF
00551
00552 END IF
00553
00554 ELSE
00555
00556
00557
00558 IF( LOWER ) THEN
00559
00560
00561
00562 IF( NOTRANS ) THEN
00563
00564
00565
00566
00567 CALL CTRSM( 'L', 'U', 'C', DIAG, K, N, ALPHA,
00568 + A( K ), K, B, LDB )
00569 CALL CGEMM( 'C', 'N', K, N, K, -CONE,
00570 + A( K*( K+1 ) ), K, B, LDB, ALPHA,
00571 + B( K, 0 ), LDB )
00572 CALL CTRSM( 'L', 'L', 'N', DIAG, K, N, CONE,
00573 + A( 0 ), K, B( K, 0 ), LDB )
00574
00575 ELSE
00576
00577
00578
00579
00580 CALL CTRSM( 'L', 'L', 'C', DIAG, K, N, ALPHA,
00581 + A( 0 ), K, B( K, 0 ), LDB )
00582 CALL CGEMM( 'N', 'N', K, N, K, -CONE,
00583 + A( K*( K+1 ) ), K, B( K, 0 ), LDB,
00584 + ALPHA, B, LDB )
00585 CALL CTRSM( 'L', 'U', 'N', DIAG, K, N, CONE,
00586 + A( K ), K, B, LDB )
00587
00588 END IF
00589
00590 ELSE
00591
00592
00593
00594 IF( .NOT.NOTRANS ) THEN
00595
00596
00597
00598
00599 CALL CTRSM( 'L', 'U', 'C', DIAG, K, N, ALPHA,
00600 + A( K*( K+1 ) ), K, B, LDB )
00601 CALL CGEMM( 'N', 'N', K, N, K, -CONE, A( 0 ), K, B,
00602 + LDB, ALPHA, B( K, 0 ), LDB )
00603 CALL CTRSM( 'L', 'L', 'N', DIAG, K, N, CONE,
00604 + A( K*K ), K, B( K, 0 ), LDB )
00605
00606 ELSE
00607
00608
00609
00610
00611 CALL CTRSM( 'L', 'L', 'C', DIAG, K, N, ALPHA,
00612 + A( K*K ), K, B( K, 0 ), LDB )
00613 CALL CGEMM( 'C', 'N', K, N, K, -CONE, A( 0 ), K,
00614 + B( K, 0 ), LDB, ALPHA, B, LDB )
00615 CALL CTRSM( 'L', 'U', 'N', DIAG, K, N, CONE,
00616 + A( K*( K+1 ) ), K, B, LDB )
00617
00618 END IF
00619
00620 END IF
00621
00622 END IF
00623
00624 END IF
00625
00626 ELSE
00627
00628
00629
00630
00631
00632
00633
00634 IF( MOD( N, 2 ).EQ.0 ) THEN
00635 NISODD = .FALSE.
00636 K = N / 2
00637 ELSE
00638 NISODD = .TRUE.
00639 IF( LOWER ) THEN
00640 N2 = N / 2
00641 N1 = N - N2
00642 ELSE
00643 N1 = N / 2
00644 N2 = N - N1
00645 END IF
00646 END IF
00647
00648 IF( NISODD ) THEN
00649
00650
00651
00652 IF( NORMALTRANSR ) THEN
00653
00654
00655
00656 IF( LOWER ) THEN
00657
00658
00659
00660 IF( NOTRANS ) THEN
00661
00662
00663
00664
00665 CALL CTRSM( 'R', 'U', 'C', DIAG, M, N2, ALPHA,
00666 + A( N ), N, B( 0, N1 ), LDB )
00667 CALL CGEMM( 'N', 'N', M, N1, N2, -CONE, B( 0, N1 ),
00668 + LDB, A( N1 ), N, ALPHA, B( 0, 0 ),
00669 + LDB )
00670 CALL CTRSM( 'R', 'L', 'N', DIAG, M, N1, CONE,
00671 + A( 0 ), N, B( 0, 0 ), LDB )
00672
00673 ELSE
00674
00675
00676
00677
00678 CALL CTRSM( 'R', 'L', 'C', DIAG, M, N1, ALPHA,
00679 + A( 0 ), N, B( 0, 0 ), LDB )
00680 CALL CGEMM( 'N', 'C', M, N2, N1, -CONE, B( 0, 0 ),
00681 + LDB, A( N1 ), N, ALPHA, B( 0, N1 ),
00682 + LDB )
00683 CALL CTRSM( 'R', 'U', 'N', DIAG, M, N2, CONE,
00684 + A( N ), N, B( 0, N1 ), LDB )
00685
00686 END IF
00687
00688 ELSE
00689
00690
00691
00692 IF( NOTRANS ) THEN
00693
00694
00695
00696
00697 CALL CTRSM( 'R', 'L', 'C', DIAG, M, N1, ALPHA,
00698 + A( N2 ), N, B( 0, 0 ), LDB )
00699 CALL CGEMM( 'N', 'N', M, N2, N1, -CONE, B( 0, 0 ),
00700 + LDB, A( 0 ), N, ALPHA, B( 0, N1 ),
00701 + LDB )
00702 CALL CTRSM( 'R', 'U', 'N', DIAG, M, N2, CONE,
00703 + A( N1 ), N, B( 0, N1 ), LDB )
00704
00705 ELSE
00706
00707
00708
00709
00710 CALL CTRSM( 'R', 'U', 'C', DIAG, M, N2, ALPHA,
00711 + A( N1 ), N, B( 0, N1 ), LDB )
00712 CALL CGEMM( 'N', 'C', M, N1, N2, -CONE, B( 0, N1 ),
00713 + LDB, A( 0 ), N, ALPHA, B( 0, 0 ), LDB )
00714 CALL CTRSM( 'R', 'L', 'N', DIAG, M, N1, CONE,
00715 + A( N2 ), N, B( 0, 0 ), LDB )
00716
00717 END IF
00718
00719 END IF
00720
00721 ELSE
00722
00723
00724
00725 IF( LOWER ) THEN
00726
00727
00728
00729 IF( NOTRANS ) THEN
00730
00731
00732
00733
00734 CALL CTRSM( 'R', 'L', 'N', DIAG, M, N2, ALPHA,
00735 + A( 1 ), N1, B( 0, N1 ), LDB )
00736 CALL CGEMM( 'N', 'C', M, N1, N2, -CONE, B( 0, N1 ),
00737 + LDB, A( N1*N1 ), N1, ALPHA, B( 0, 0 ),
00738 + LDB )
00739 CALL CTRSM( 'R', 'U', 'C', DIAG, M, N1, CONE,
00740 + A( 0 ), N1, B( 0, 0 ), LDB )
00741
00742 ELSE
00743
00744
00745
00746
00747 CALL CTRSM( 'R', 'U', 'N', DIAG, M, N1, ALPHA,
00748 + A( 0 ), N1, B( 0, 0 ), LDB )
00749 CALL CGEMM( 'N', 'N', M, N2, N1, -CONE, B( 0, 0 ),
00750 + LDB, A( N1*N1 ), N1, ALPHA, B( 0, N1 ),
00751 + LDB )
00752 CALL CTRSM( 'R', 'L', 'C', DIAG, M, N2, CONE,
00753 + A( 1 ), N1, B( 0, N1 ), LDB )
00754
00755 END IF
00756
00757 ELSE
00758
00759
00760
00761 IF( NOTRANS ) THEN
00762
00763
00764
00765
00766 CALL CTRSM( 'R', 'U', 'N', DIAG, M, N1, ALPHA,
00767 + A( N2*N2 ), N2, B( 0, 0 ), LDB )
00768 CALL CGEMM( 'N', 'C', M, N2, N1, -CONE, B( 0, 0 ),
00769 + LDB, A( 0 ), N2, ALPHA, B( 0, N1 ),
00770 + LDB )
00771 CALL CTRSM( 'R', 'L', 'C', DIAG, M, N2, CONE,
00772 + A( N1*N2 ), N2, B( 0, N1 ), LDB )
00773
00774 ELSE
00775
00776
00777
00778
00779 CALL CTRSM( 'R', 'L', 'N', DIAG, M, N2, ALPHA,
00780 + A( N1*N2 ), N2, B( 0, N1 ), LDB )
00781 CALL CGEMM( 'N', 'N', M, N1, N2, -CONE, B( 0, N1 ),
00782 + LDB, A( 0 ), N2, ALPHA, B( 0, 0 ),
00783 + LDB )
00784 CALL CTRSM( 'R', 'U', 'C', DIAG, M, N1, CONE,
00785 + A( N2*N2 ), N2, B( 0, 0 ), LDB )
00786
00787 END IF
00788
00789 END IF
00790
00791 END IF
00792
00793 ELSE
00794
00795
00796
00797 IF( NORMALTRANSR ) THEN
00798
00799
00800
00801 IF( LOWER ) THEN
00802
00803
00804
00805 IF( NOTRANS ) THEN
00806
00807
00808
00809
00810 CALL CTRSM( 'R', 'U', 'C', DIAG, M, K, ALPHA,
00811 + A( 0 ), N+1, B( 0, K ), LDB )
00812 CALL CGEMM( 'N', 'N', M, K, K, -CONE, B( 0, K ),
00813 + LDB, A( K+1 ), N+1, ALPHA, B( 0, 0 ),
00814 + LDB )
00815 CALL CTRSM( 'R', 'L', 'N', DIAG, M, K, CONE,
00816 + A( 1 ), N+1, B( 0, 0 ), LDB )
00817
00818 ELSE
00819
00820
00821
00822
00823 CALL CTRSM( 'R', 'L', 'C', DIAG, M, K, ALPHA,
00824 + A( 1 ), N+1, B( 0, 0 ), LDB )
00825 CALL CGEMM( 'N', 'C', M, K, K, -CONE, B( 0, 0 ),
00826 + LDB, A( K+1 ), N+1, ALPHA, B( 0, K ),
00827 + LDB )
00828 CALL CTRSM( 'R', 'U', 'N', DIAG, M, K, CONE,
00829 + A( 0 ), N+1, B( 0, K ), LDB )
00830
00831 END IF
00832
00833 ELSE
00834
00835
00836
00837 IF( NOTRANS ) THEN
00838
00839
00840
00841
00842 CALL CTRSM( 'R', 'L', 'C', DIAG, M, K, ALPHA,
00843 + A( K+1 ), N+1, B( 0, 0 ), LDB )
00844 CALL CGEMM( 'N', 'N', M, K, K, -CONE, B( 0, 0 ),
00845 + LDB, A( 0 ), N+1, ALPHA, B( 0, K ),
00846 + LDB )
00847 CALL CTRSM( 'R', 'U', 'N', DIAG, M, K, CONE,
00848 + A( K ), N+1, B( 0, K ), LDB )
00849
00850 ELSE
00851
00852
00853
00854
00855 CALL CTRSM( 'R', 'U', 'C', DIAG, M, K, ALPHA,
00856 + A( K ), N+1, B( 0, K ), LDB )
00857 CALL CGEMM( 'N', 'C', M, K, K, -CONE, B( 0, K ),
00858 + LDB, A( 0 ), N+1, ALPHA, B( 0, 0 ),
00859 + LDB )
00860 CALL CTRSM( 'R', 'L', 'N', DIAG, M, K, CONE,
00861 + A( K+1 ), N+1, B( 0, 0 ), LDB )
00862
00863 END IF
00864
00865 END IF
00866
00867 ELSE
00868
00869
00870
00871 IF( LOWER ) THEN
00872
00873
00874
00875 IF( NOTRANS ) THEN
00876
00877
00878
00879
00880 CALL CTRSM( 'R', 'L', 'N', DIAG, M, K, ALPHA,
00881 + A( 0 ), K, B( 0, K ), LDB )
00882 CALL CGEMM( 'N', 'C', M, K, K, -CONE, B( 0, K ),
00883 + LDB, A( ( K+1 )*K ), K, ALPHA,
00884 + B( 0, 0 ), LDB )
00885 CALL CTRSM( 'R', 'U', 'C', DIAG, M, K, CONE,
00886 + A( K ), K, B( 0, 0 ), LDB )
00887
00888 ELSE
00889
00890
00891
00892
00893 CALL CTRSM( 'R', 'U', 'N', DIAG, M, K, ALPHA,
00894 + A( K ), K, B( 0, 0 ), LDB )
00895 CALL CGEMM( 'N', 'N', M, K, K, -CONE, B( 0, 0 ),
00896 + LDB, A( ( K+1 )*K ), K, ALPHA,
00897 + B( 0, K ), LDB )
00898 CALL CTRSM( 'R', 'L', 'C', DIAG, M, K, CONE,
00899 + A( 0 ), K, B( 0, K ), LDB )
00900
00901 END IF
00902
00903 ELSE
00904
00905
00906
00907 IF( NOTRANS ) THEN
00908
00909
00910
00911
00912 CALL CTRSM( 'R', 'U', 'N', DIAG, M, K, ALPHA,
00913 + A( ( K+1 )*K ), K, B( 0, 0 ), LDB )
00914 CALL CGEMM( 'N', 'C', M, K, K, -CONE, B( 0, 0 ),
00915 + LDB, A( 0 ), K, ALPHA, B( 0, K ), LDB )
00916 CALL CTRSM( 'R', 'L', 'C', DIAG, M, K, CONE,
00917 + A( K*K ), K, B( 0, K ), LDB )
00918
00919 ELSE
00920
00921
00922
00923
00924 CALL CTRSM( 'R', 'L', 'N', DIAG, M, K, ALPHA,
00925 + A( K*K ), K, B( 0, K ), LDB )
00926 CALL CGEMM( 'N', 'N', M, K, K, -CONE, B( 0, K ),
00927 + LDB, A( 0 ), K, ALPHA, B( 0, 0 ), LDB )
00928 CALL CTRSM( 'R', 'U', 'C', DIAG, M, K, CONE,
00929 + A( ( K+1 )*K ), K, B( 0, 0 ), LDB )
00930
00931 END IF
00932
00933 END IF
00934
00935 END IF
00936
00937 END IF
00938 END IF
00939
00940 RETURN
00941
00942
00943
00944 END