00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 static doublereal c_b4 = -1.;
00019 static doublereal c_b5 = 1.;
00020 static integer c__1 = 1;
00021 static doublereal c_b16 = 0.;
00022
00023 int dlabrd_(integer *m, integer *n, integer *nb, doublereal *
00024 a, integer *lda, doublereal *d__, doublereal *e, doublereal *tauq,
00025 doublereal *taup, doublereal *x, integer *ldx, doublereal *y, integer
00026 *ldy)
00027 {
00028
00029 integer a_dim1, a_offset, x_dim1, x_offset, y_dim1, y_offset, i__1, i__2,
00030 i__3;
00031
00032
00033 integer i__;
00034 extern int dscal_(integer *, doublereal *, doublereal *,
00035 integer *), dgemv_(char *, integer *, integer *, doublereal *,
00036 doublereal *, integer *, doublereal *, integer *, doublereal *,
00037 doublereal *, integer *), dlarfg_(integer *, doublereal *,
00038 doublereal *, integer *, doublereal *);
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 a_dim1 = *lda;
00185 a_offset = 1 + a_dim1;
00186 a -= a_offset;
00187 --d__;
00188 --e;
00189 --tauq;
00190 --taup;
00191 x_dim1 = *ldx;
00192 x_offset = 1 + x_dim1;
00193 x -= x_offset;
00194 y_dim1 = *ldy;
00195 y_offset = 1 + y_dim1;
00196 y -= y_offset;
00197
00198
00199 if (*m <= 0 || *n <= 0) {
00200 return 0;
00201 }
00202
00203 if (*m >= *n) {
00204
00205
00206
00207 i__1 = *nb;
00208 for (i__ = 1; i__ <= i__1; ++i__) {
00209
00210
00211
00212 i__2 = *m - i__ + 1;
00213 i__3 = i__ - 1;
00214 dgemv_("No transpose", &i__2, &i__3, &c_b4, &a[i__ + a_dim1], lda,
00215 &y[i__ + y_dim1], ldy, &c_b5, &a[i__ + i__ * a_dim1], &
00216 c__1);
00217 i__2 = *m - i__ + 1;
00218 i__3 = i__ - 1;
00219 dgemv_("No transpose", &i__2, &i__3, &c_b4, &x[i__ + x_dim1], ldx,
00220 &a[i__ * a_dim1 + 1], &c__1, &c_b5, &a[i__ + i__ *
00221 a_dim1], &c__1);
00222
00223
00224
00225 i__2 = *m - i__ + 1;
00226
00227 i__3 = i__ + 1;
00228 dlarfg_(&i__2, &a[i__ + i__ * a_dim1], &a[min(i__3, *m)+ i__ *
00229 a_dim1], &c__1, &tauq[i__]);
00230 d__[i__] = a[i__ + i__ * a_dim1];
00231 if (i__ < *n) {
00232 a[i__ + i__ * a_dim1] = 1.;
00233
00234
00235
00236 i__2 = *m - i__ + 1;
00237 i__3 = *n - i__;
00238 dgemv_("Transpose", &i__2, &i__3, &c_b5, &a[i__ + (i__ + 1) *
00239 a_dim1], lda, &a[i__ + i__ * a_dim1], &c__1, &c_b16, &
00240 y[i__ + 1 + i__ * y_dim1], &c__1);
00241 i__2 = *m - i__ + 1;
00242 i__3 = i__ - 1;
00243 dgemv_("Transpose", &i__2, &i__3, &c_b5, &a[i__ + a_dim1],
00244 lda, &a[i__ + i__ * a_dim1], &c__1, &c_b16, &y[i__ *
00245 y_dim1 + 1], &c__1);
00246 i__2 = *n - i__;
00247 i__3 = i__ - 1;
00248 dgemv_("No transpose", &i__2, &i__3, &c_b4, &y[i__ + 1 +
00249 y_dim1], ldy, &y[i__ * y_dim1 + 1], &c__1, &c_b5, &y[
00250 i__ + 1 + i__ * y_dim1], &c__1);
00251 i__2 = *m - i__ + 1;
00252 i__3 = i__ - 1;
00253 dgemv_("Transpose", &i__2, &i__3, &c_b5, &x[i__ + x_dim1],
00254 ldx, &a[i__ + i__ * a_dim1], &c__1, &c_b16, &y[i__ *
00255 y_dim1 + 1], &c__1);
00256 i__2 = i__ - 1;
00257 i__3 = *n - i__;
00258 dgemv_("Transpose", &i__2, &i__3, &c_b4, &a[(i__ + 1) *
00259 a_dim1 + 1], lda, &y[i__ * y_dim1 + 1], &c__1, &c_b5,
00260 &y[i__ + 1 + i__ * y_dim1], &c__1);
00261 i__2 = *n - i__;
00262 dscal_(&i__2, &tauq[i__], &y[i__ + 1 + i__ * y_dim1], &c__1);
00263
00264
00265
00266 i__2 = *n - i__;
00267 dgemv_("No transpose", &i__2, &i__, &c_b4, &y[i__ + 1 +
00268 y_dim1], ldy, &a[i__ + a_dim1], lda, &c_b5, &a[i__ + (
00269 i__ + 1) * a_dim1], lda);
00270 i__2 = i__ - 1;
00271 i__3 = *n - i__;
00272 dgemv_("Transpose", &i__2, &i__3, &c_b4, &a[(i__ + 1) *
00273 a_dim1 + 1], lda, &x[i__ + x_dim1], ldx, &c_b5, &a[
00274 i__ + (i__ + 1) * a_dim1], lda);
00275
00276
00277
00278 i__2 = *n - i__;
00279
00280 i__3 = i__ + 2;
00281 dlarfg_(&i__2, &a[i__ + (i__ + 1) * a_dim1], &a[i__ + min(
00282 i__3, *n)* a_dim1], lda, &taup[i__]);
00283 e[i__] = a[i__ + (i__ + 1) * a_dim1];
00284 a[i__ + (i__ + 1) * a_dim1] = 1.;
00285
00286
00287
00288 i__2 = *m - i__;
00289 i__3 = *n - i__;
00290 dgemv_("No transpose", &i__2, &i__3, &c_b5, &a[i__ + 1 + (i__
00291 + 1) * a_dim1], lda, &a[i__ + (i__ + 1) * a_dim1],
00292 lda, &c_b16, &x[i__ + 1 + i__ * x_dim1], &c__1);
00293 i__2 = *n - i__;
00294 dgemv_("Transpose", &i__2, &i__, &c_b5, &y[i__ + 1 + y_dim1],
00295 ldy, &a[i__ + (i__ + 1) * a_dim1], lda, &c_b16, &x[
00296 i__ * x_dim1 + 1], &c__1);
00297 i__2 = *m - i__;
00298 dgemv_("No transpose", &i__2, &i__, &c_b4, &a[i__ + 1 +
00299 a_dim1], lda, &x[i__ * x_dim1 + 1], &c__1, &c_b5, &x[
00300 i__ + 1 + i__ * x_dim1], &c__1);
00301 i__2 = i__ - 1;
00302 i__3 = *n - i__;
00303 dgemv_("No transpose", &i__2, &i__3, &c_b5, &a[(i__ + 1) *
00304 a_dim1 + 1], lda, &a[i__ + (i__ + 1) * a_dim1], lda, &
00305 c_b16, &x[i__ * x_dim1 + 1], &c__1);
00306 i__2 = *m - i__;
00307 i__3 = i__ - 1;
00308 dgemv_("No transpose", &i__2, &i__3, &c_b4, &x[i__ + 1 +
00309 x_dim1], ldx, &x[i__ * x_dim1 + 1], &c__1, &c_b5, &x[
00310 i__ + 1 + i__ * x_dim1], &c__1);
00311 i__2 = *m - i__;
00312 dscal_(&i__2, &taup[i__], &x[i__ + 1 + i__ * x_dim1], &c__1);
00313 }
00314
00315 }
00316 } else {
00317
00318
00319
00320 i__1 = *nb;
00321 for (i__ = 1; i__ <= i__1; ++i__) {
00322
00323
00324
00325 i__2 = *n - i__ + 1;
00326 i__3 = i__ - 1;
00327 dgemv_("No transpose", &i__2, &i__3, &c_b4, &y[i__ + y_dim1], ldy,
00328 &a[i__ + a_dim1], lda, &c_b5, &a[i__ + i__ * a_dim1],
00329 lda);
00330 i__2 = i__ - 1;
00331 i__3 = *n - i__ + 1;
00332 dgemv_("Transpose", &i__2, &i__3, &c_b4, &a[i__ * a_dim1 + 1],
00333 lda, &x[i__ + x_dim1], ldx, &c_b5, &a[i__ + i__ * a_dim1],
00334 lda);
00335
00336
00337
00338 i__2 = *n - i__ + 1;
00339
00340 i__3 = i__ + 1;
00341 dlarfg_(&i__2, &a[i__ + i__ * a_dim1], &a[i__ + min(i__3, *n)*
00342 a_dim1], lda, &taup[i__]);
00343 d__[i__] = a[i__ + i__ * a_dim1];
00344 if (i__ < *m) {
00345 a[i__ + i__ * a_dim1] = 1.;
00346
00347
00348
00349 i__2 = *m - i__;
00350 i__3 = *n - i__ + 1;
00351 dgemv_("No transpose", &i__2, &i__3, &c_b5, &a[i__ + 1 + i__ *
00352 a_dim1], lda, &a[i__ + i__ * a_dim1], lda, &c_b16, &
00353 x[i__ + 1 + i__ * x_dim1], &c__1);
00354 i__2 = *n - i__ + 1;
00355 i__3 = i__ - 1;
00356 dgemv_("Transpose", &i__2, &i__3, &c_b5, &y[i__ + y_dim1],
00357 ldy, &a[i__ + i__ * a_dim1], lda, &c_b16, &x[i__ *
00358 x_dim1 + 1], &c__1);
00359 i__2 = *m - i__;
00360 i__3 = i__ - 1;
00361 dgemv_("No transpose", &i__2, &i__3, &c_b4, &a[i__ + 1 +
00362 a_dim1], lda, &x[i__ * x_dim1 + 1], &c__1, &c_b5, &x[
00363 i__ + 1 + i__ * x_dim1], &c__1);
00364 i__2 = i__ - 1;
00365 i__3 = *n - i__ + 1;
00366 dgemv_("No transpose", &i__2, &i__3, &c_b5, &a[i__ * a_dim1 +
00367 1], lda, &a[i__ + i__ * a_dim1], lda, &c_b16, &x[i__ *
00368 x_dim1 + 1], &c__1);
00369 i__2 = *m - i__;
00370 i__3 = i__ - 1;
00371 dgemv_("No transpose", &i__2, &i__3, &c_b4, &x[i__ + 1 +
00372 x_dim1], ldx, &x[i__ * x_dim1 + 1], &c__1, &c_b5, &x[
00373 i__ + 1 + i__ * x_dim1], &c__1);
00374 i__2 = *m - i__;
00375 dscal_(&i__2, &taup[i__], &x[i__ + 1 + i__ * x_dim1], &c__1);
00376
00377
00378
00379 i__2 = *m - i__;
00380 i__3 = i__ - 1;
00381 dgemv_("No transpose", &i__2, &i__3, &c_b4, &a[i__ + 1 +
00382 a_dim1], lda, &y[i__ + y_dim1], ldy, &c_b5, &a[i__ +
00383 1 + i__ * a_dim1], &c__1);
00384 i__2 = *m - i__;
00385 dgemv_("No transpose", &i__2, &i__, &c_b4, &x[i__ + 1 +
00386 x_dim1], ldx, &a[i__ * a_dim1 + 1], &c__1, &c_b5, &a[
00387 i__ + 1 + i__ * a_dim1], &c__1);
00388
00389
00390
00391 i__2 = *m - i__;
00392
00393 i__3 = i__ + 2;
00394 dlarfg_(&i__2, &a[i__ + 1 + i__ * a_dim1], &a[min(i__3, *m)+
00395 i__ * a_dim1], &c__1, &tauq[i__]);
00396 e[i__] = a[i__ + 1 + i__ * a_dim1];
00397 a[i__ + 1 + i__ * a_dim1] = 1.;
00398
00399
00400
00401 i__2 = *m - i__;
00402 i__3 = *n - i__;
00403 dgemv_("Transpose", &i__2, &i__3, &c_b5, &a[i__ + 1 + (i__ +
00404 1) * a_dim1], lda, &a[i__ + 1 + i__ * a_dim1], &c__1,
00405 &c_b16, &y[i__ + 1 + i__ * y_dim1], &c__1);
00406 i__2 = *m - i__;
00407 i__3 = i__ - 1;
00408 dgemv_("Transpose", &i__2, &i__3, &c_b5, &a[i__ + 1 + a_dim1],
00409 lda, &a[i__ + 1 + i__ * a_dim1], &c__1, &c_b16, &y[
00410 i__ * y_dim1 + 1], &c__1);
00411 i__2 = *n - i__;
00412 i__3 = i__ - 1;
00413 dgemv_("No transpose", &i__2, &i__3, &c_b4, &y[i__ + 1 +
00414 y_dim1], ldy, &y[i__ * y_dim1 + 1], &c__1, &c_b5, &y[
00415 i__ + 1 + i__ * y_dim1], &c__1);
00416 i__2 = *m - i__;
00417 dgemv_("Transpose", &i__2, &i__, &c_b5, &x[i__ + 1 + x_dim1],
00418 ldx, &a[i__ + 1 + i__ * a_dim1], &c__1, &c_b16, &y[
00419 i__ * y_dim1 + 1], &c__1);
00420 i__2 = *n - i__;
00421 dgemv_("Transpose", &i__, &i__2, &c_b4, &a[(i__ + 1) * a_dim1
00422 + 1], lda, &y[i__ * y_dim1 + 1], &c__1, &c_b5, &y[i__
00423 + 1 + i__ * y_dim1], &c__1);
00424 i__2 = *n - i__;
00425 dscal_(&i__2, &tauq[i__], &y[i__ + 1 + i__ * y_dim1], &c__1);
00426 }
00427
00428 }
00429 }
00430 return 0;
00431
00432
00433
00434 }