00001 SUBROUTINE SLABRD( 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 REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
00014 $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
00015
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 REAL ZERO, ONE
00140 PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
00141
00142
00143 INTEGER I
00144
00145
00146 EXTERNAL SGEMV, SLARFG, SSCAL
00147
00148
00149 INTRINSIC MIN
00150
00151
00152
00153
00154
00155 IF( M.LE.0 .OR. N.LE.0 )
00156 $ RETURN
00157
00158 IF( M.GE.N ) THEN
00159
00160
00161
00162 DO 10 I = 1, NB
00163
00164
00165
00166 CALL SGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ),
00167 $ LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 )
00168 CALL SGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ),
00169 $ LDX, A( 1, I ), 1, ONE, A( I, I ), 1 )
00170
00171
00172
00173 CALL SLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1,
00174 $ TAUQ( I ) )
00175 D( I ) = A( I, I )
00176 IF( I.LT.N ) THEN
00177 A( I, I ) = ONE
00178
00179
00180
00181 CALL SGEMV( 'Transpose', M-I+1, N-I, ONE, A( I, I+1 ),
00182 $ LDA, A( I, I ), 1, ZERO, Y( I+1, I ), 1 )
00183 CALL SGEMV( 'Transpose', M-I+1, I-1, ONE, A( I, 1 ), LDA,
00184 $ A( I, I ), 1, ZERO, Y( 1, I ), 1 )
00185 CALL SGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
00186 $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
00187 CALL SGEMV( 'Transpose', M-I+1, I-1, ONE, X( I, 1 ), LDX,
00188 $ A( I, I ), 1, ZERO, Y( 1, I ), 1 )
00189 CALL SGEMV( 'Transpose', I-1, N-I, -ONE, A( 1, I+1 ),
00190 $ LDA, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
00191 CALL SSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
00192
00193
00194
00195 CALL SGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ),
00196 $ LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA )
00197 CALL SGEMV( 'Transpose', I-1, N-I, -ONE, A( 1, I+1 ),
00198 $ LDA, X( I, 1 ), LDX, ONE, A( I, I+1 ), LDA )
00199
00200
00201
00202 CALL SLARFG( N-I, A( I, I+1 ), A( I, MIN( I+2, N ) ),
00203 $ LDA, TAUP( I ) )
00204 E( I ) = A( I, I+1 )
00205 A( I, I+1 ) = ONE
00206
00207
00208
00209 CALL SGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ),
00210 $ LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 )
00211 CALL SGEMV( 'Transpose', N-I, I, ONE, Y( I+1, 1 ), LDY,
00212 $ A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 )
00213 CALL SGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ),
00214 $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00215 CALL SGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ),
00216 $ LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 )
00217 CALL SGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
00218 $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00219 CALL SSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
00220 END IF
00221 10 CONTINUE
00222 ELSE
00223
00224
00225
00226 DO 20 I = 1, NB
00227
00228
00229
00230 CALL SGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ),
00231 $ LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA )
00232 CALL SGEMV( 'Transpose', I-1, N-I+1, -ONE, A( 1, I ), LDA,
00233 $ X( I, 1 ), LDX, ONE, A( I, I ), LDA )
00234
00235
00236
00237 CALL SLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA,
00238 $ TAUP( I ) )
00239 D( I ) = A( I, I )
00240 IF( I.LT.M ) THEN
00241 A( I, I ) = ONE
00242
00243
00244
00245 CALL SGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ),
00246 $ LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 )
00247 CALL SGEMV( 'Transpose', N-I+1, I-1, ONE, Y( I, 1 ), LDY,
00248 $ A( I, I ), LDA, ZERO, X( 1, I ), 1 )
00249 CALL SGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
00250 $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00251 CALL SGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ),
00252 $ LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 )
00253 CALL SGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
00254 $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
00255 CALL SSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
00256
00257
00258
00259 CALL SGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
00260 $ LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 )
00261 CALL SGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ),
00262 $ LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 )
00263
00264
00265
00266 CALL SLARFG( M-I, A( I+1, I ), A( MIN( I+2, M ), I ), 1,
00267 $ TAUQ( I ) )
00268 E( I ) = A( I+1, I )
00269 A( I+1, I ) = ONE
00270
00271
00272
00273 CALL SGEMV( 'Transpose', M-I, N-I, ONE, A( I+1, I+1 ),
00274 $ LDA, A( I+1, I ), 1, ZERO, Y( I+1, I ), 1 )
00275 CALL SGEMV( 'Transpose', M-I, I-1, ONE, A( I+1, 1 ), LDA,
00276 $ A( I+1, I ), 1, ZERO, Y( 1, I ), 1 )
00277 CALL SGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
00278 $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
00279 CALL SGEMV( 'Transpose', M-I, I, ONE, X( I+1, 1 ), LDX,
00280 $ A( I+1, I ), 1, ZERO, Y( 1, I ), 1 )
00281 CALL SGEMV( 'Transpose', I, N-I, -ONE, A( 1, I+1 ), LDA,
00282 $ Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
00283 CALL SSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
00284 END IF
00285 20 CONTINUE
00286 END IF
00287 RETURN
00288
00289
00290
00291 END