00001 SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
00002 $ LDY )
00003
00004
00005
00006
00007
00008
00009
00010 INTEGER LDA, LDX, LDY, M, N, NB
00011
00012
00013 DOUBLE PRECISION D( * ), E( * )
00014 COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
00015 $ Y( LDY, * )
00016
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
00139
00140
00141 COMPLEX*16 ZERO, ONE
00142 PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ),
00143 $ ONE = ( 1.0D+0, 0.0D+0 ) )
00144
00145
00146 INTEGER I
00147 COMPLEX*16 ALPHA
00148
00149
00150 EXTERNAL ZGEMV, ZLACGV, ZLARFG, ZSCAL
00151
00152
00153 INTRINSIC MIN
00154
00155
00156
00157
00158
00159 IF( M.LE.0 .OR. N.LE.0 )
00160 $ RETURN
00161
00162 IF( M.GE.N ) THEN
00163
00164
00165
00166 DO 10 I = 1, NB
00167
00168
00169
00170 CALL ZLACGV( I-1, Y( I, 1 ), LDY )
00171 CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ),
00172 $ LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 )
00173 CALL ZLACGV( I-1, Y( I, 1 ), LDY )
00174 CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ),
00175 $ LDX, A( 1, I ), 1, ONE, A( I, I ), 1 )
00176
00177
00178
00179 ALPHA = A( I, I )
00180 CALL ZLARFG( M-I+1, ALPHA, A( MIN( I+1, M ), I ), 1,
00181 $ TAUQ( I ) )
00182 D( I ) = ALPHA
00183 IF( I.LT.N ) THEN
00184 A( I, I ) = ONE
00185
00186
00187
00188 CALL ZGEMV( 'Conjugate transpose', M-I+1, N-I, ONE,
00189 $ A( I, I+1 ), LDA, A( I, I ), 1, ZERO,
00190 $ Y( I+1, I ), 1 )
00191 CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE,
00192 $ A( I, 1 ), LDA, A( I, I ), 1, ZERO,
00193 $ Y( 1, I ), 1 )
00194 CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
00195 $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
00196 CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE,
00197 $ X( I, 1 ), LDX, A( I, I ), 1, ZERO,
00198 $ Y( 1, I ), 1 )
00199 CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE,
00200 $ A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE,
00201 $ Y( I+1, I ), 1 )
00202 CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
00203
00204
00205
00206 CALL ZLACGV( N-I, A( I, I+1 ), LDA )
00207 CALL ZLACGV( I, A( I, 1 ), LDA )
00208 CALL ZGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ),
00209 $ LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA )
00210 CALL ZLACGV( I, A( I, 1 ), LDA )
00211 CALL ZLACGV( I-1, X( I, 1 ), LDX )
00212 CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE,
00213 $ A( 1, I+1 ), LDA, X( I, 1 ), LDX, ONE,
00214 $ A( I, I+1 ), LDA )
00215 CALL ZLACGV( I-1, X( I, 1 ), LDX )
00216
00217
00218
00219 ALPHA = A( I, I+1 )
00220 CALL ZLARFG( N-I, ALPHA, A( I, MIN( I+2, N ) ), LDA,
00221 $ TAUP( I ) )
00222 E( I ) = ALPHA
00223 A( I, I+1 ) = ONE
00224
00225
00226
00227 CALL ZGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ),
00228 $ LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 )
00229 CALL ZGEMV( 'Conjugate transpose', N-I, I, ONE,
00230 $ Y( I+1, 1 ), LDY, A( I, I+1 ), LDA, ZERO,
00231 $ X( 1, I ), 1 )
00232 CALL ZGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ),
00233 $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00234 CALL ZGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ),
00235 $ LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 )
00236 CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
00237 $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00238 CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
00239 CALL ZLACGV( N-I, A( I, I+1 ), LDA )
00240 END IF
00241 10 CONTINUE
00242 ELSE
00243
00244
00245
00246 DO 20 I = 1, NB
00247
00248
00249
00250 CALL ZLACGV( N-I+1, A( I, I ), LDA )
00251 CALL ZLACGV( I-1, A( I, 1 ), LDA )
00252 CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ),
00253 $ LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA )
00254 CALL ZLACGV( I-1, A( I, 1 ), LDA )
00255 CALL ZLACGV( I-1, X( I, 1 ), LDX )
00256 CALL ZGEMV( 'Conjugate transpose', I-1, N-I+1, -ONE,
00257 $ A( 1, I ), LDA, X( I, 1 ), LDX, ONE, A( I, I ),
00258 $ LDA )
00259 CALL ZLACGV( I-1, X( I, 1 ), LDX )
00260
00261
00262
00263 ALPHA = A( I, I )
00264 CALL ZLARFG( N-I+1, ALPHA, A( I, MIN( I+1, N ) ), LDA,
00265 $ TAUP( I ) )
00266 D( I ) = ALPHA
00267 IF( I.LT.M ) THEN
00268 A( I, I ) = ONE
00269
00270
00271
00272 CALL ZGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ),
00273 $ LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 )
00274 CALL ZGEMV( 'Conjugate transpose', N-I+1, I-1, ONE,
00275 $ Y( I, 1 ), LDY, A( I, I ), LDA, ZERO,
00276 $ X( 1, I ), 1 )
00277 CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
00278 $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00279 CALL ZGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ),
00280 $ LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 )
00281 CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
00282 $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00283 CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
00284 CALL ZLACGV( N-I+1, A( I, I ), LDA )
00285
00286
00287
00288 CALL ZLACGV( I-1, Y( I, 1 ), LDY )
00289 CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
00290 $ LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 )
00291 CALL ZLACGV( I-1, Y( I, 1 ), LDY )
00292 CALL ZGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ),
00293 $ LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 )
00294
00295
00296
00297 ALPHA = A( I+1, I )
00298 CALL ZLARFG( M-I, ALPHA, A( MIN( I+2, M ), I ), 1,
00299 $ TAUQ( I ) )
00300 E( I ) = ALPHA
00301 A( I+1, I ) = ONE
00302
00303
00304
00305 CALL ZGEMV( 'Conjugate transpose', M-I, N-I, ONE,
00306 $ A( I+1, I+1 ), LDA, A( I+1, I ), 1, ZERO,
00307 $ Y( I+1, I ), 1 )
00308 CALL ZGEMV( 'Conjugate transpose', M-I, I-1, ONE,
00309 $ A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO,
00310 $ Y( 1, I ), 1 )
00311 CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
00312 $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
00313 CALL ZGEMV( 'Conjugate transpose', M-I, I, ONE,
00314 $ X( I+1, 1 ), LDX, A( I+1, I ), 1, ZERO,
00315 $ Y( 1, I ), 1 )
00316 CALL ZGEMV( 'Conjugate transpose', I, N-I, -ONE,
00317 $ A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE,
00318 $ Y( I+1, I ), 1 )
00319 CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
00320 ELSE
00321 CALL ZLACGV( N-I+1, A( I, I ), LDA )
00322 END IF
00323 20 CONTINUE
00324 END IF
00325 RETURN
00326
00327
00328
00329 END