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 doublecomplex c_b1 = {0.,0.};
00019 static doublecomplex c_b2 = {1.,0.};
00020 static integer c__1 = 1;
00021
00022 int zlabrd_(integer *m, integer *n, integer *nb,
00023 doublecomplex *a, integer *lda, doublereal *d__, doublereal *e,
00024 doublecomplex *tauq, doublecomplex *taup, doublecomplex *x, integer *
00025 ldx, doublecomplex *y, integer *ldy)
00026 {
00027
00028 integer a_dim1, a_offset, x_dim1, x_offset, y_dim1, y_offset, i__1, i__2,
00029 i__3;
00030 doublecomplex z__1;
00031
00032
00033 integer i__;
00034 doublecomplex alpha;
00035 extern int zscal_(integer *, doublecomplex *,
00036 doublecomplex *, integer *), zgemv_(char *, integer *, integer *,
00037 doublecomplex *, doublecomplex *, integer *, doublecomplex *,
00038 integer *, doublecomplex *, doublecomplex *, integer *),
00039 zlarfg_(integer *, doublecomplex *, doublecomplex *, integer *,
00040 doublecomplex *), zlacgv_(integer *, doublecomplex *, integer *);
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 a_dim1 = *lda;
00188 a_offset = 1 + a_dim1;
00189 a -= a_offset;
00190 --d__;
00191 --e;
00192 --tauq;
00193 --taup;
00194 x_dim1 = *ldx;
00195 x_offset = 1 + x_dim1;
00196 x -= x_offset;
00197 y_dim1 = *ldy;
00198 y_offset = 1 + y_dim1;
00199 y -= y_offset;
00200
00201
00202 if (*m <= 0 || *n <= 0) {
00203 return 0;
00204 }
00205
00206 if (*m >= *n) {
00207
00208
00209
00210 i__1 = *nb;
00211 for (i__ = 1; i__ <= i__1; ++i__) {
00212
00213
00214
00215 i__2 = i__ - 1;
00216 zlacgv_(&i__2, &y[i__ + y_dim1], ldy);
00217 i__2 = *m - i__ + 1;
00218 i__3 = i__ - 1;
00219 z__1.r = -1., z__1.i = -0.;
00220 zgemv_("No transpose", &i__2, &i__3, &z__1, &a[i__ + a_dim1], lda,
00221 &y[i__ + y_dim1], ldy, &c_b2, &a[i__ + i__ * a_dim1], &
00222 c__1);
00223 i__2 = i__ - 1;
00224 zlacgv_(&i__2, &y[i__ + y_dim1], ldy);
00225 i__2 = *m - i__ + 1;
00226 i__3 = i__ - 1;
00227 z__1.r = -1., z__1.i = -0.;
00228 zgemv_("No transpose", &i__2, &i__3, &z__1, &x[i__ + x_dim1], ldx,
00229 &a[i__ * a_dim1 + 1], &c__1, &c_b2, &a[i__ + i__ *
00230 a_dim1], &c__1);
00231
00232
00233
00234 i__2 = i__ + i__ * a_dim1;
00235 alpha.r = a[i__2].r, alpha.i = a[i__2].i;
00236 i__2 = *m - i__ + 1;
00237
00238 i__3 = i__ + 1;
00239 zlarfg_(&i__2, &alpha, &a[min(i__3, *m)+ i__ * a_dim1], &c__1, &
00240 tauq[i__]);
00241 i__2 = i__;
00242 d__[i__2] = alpha.r;
00243 if (i__ < *n) {
00244 i__2 = i__ + i__ * a_dim1;
00245 a[i__2].r = 1., a[i__2].i = 0.;
00246
00247
00248
00249 i__2 = *m - i__ + 1;
00250 i__3 = *n - i__;
00251 zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[i__ + (
00252 i__ + 1) * a_dim1], lda, &a[i__ + i__ * a_dim1], &
00253 c__1, &c_b1, &y[i__ + 1 + i__ * y_dim1], &c__1);
00254 i__2 = *m - i__ + 1;
00255 i__3 = i__ - 1;
00256 zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[i__ +
00257 a_dim1], lda, &a[i__ + i__ * a_dim1], &c__1, &c_b1, &
00258 y[i__ * y_dim1 + 1], &c__1);
00259 i__2 = *n - i__;
00260 i__3 = i__ - 1;
00261 z__1.r = -1., z__1.i = -0.;
00262 zgemv_("No transpose", &i__2, &i__3, &z__1, &y[i__ + 1 +
00263 y_dim1], ldy, &y[i__ * y_dim1 + 1], &c__1, &c_b2, &y[
00264 i__ + 1 + i__ * y_dim1], &c__1);
00265 i__2 = *m - i__ + 1;
00266 i__3 = i__ - 1;
00267 zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &x[i__ +
00268 x_dim1], ldx, &a[i__ + i__ * a_dim1], &c__1, &c_b1, &
00269 y[i__ * y_dim1 + 1], &c__1);
00270 i__2 = i__ - 1;
00271 i__3 = *n - i__;
00272 z__1.r = -1., z__1.i = -0.;
00273 zgemv_("Conjugate transpose", &i__2, &i__3, &z__1, &a[(i__ +
00274 1) * a_dim1 + 1], lda, &y[i__ * y_dim1 + 1], &c__1, &
00275 c_b2, &y[i__ + 1 + i__ * y_dim1], &c__1);
00276 i__2 = *n - i__;
00277 zscal_(&i__2, &tauq[i__], &y[i__ + 1 + i__ * y_dim1], &c__1);
00278
00279
00280
00281 i__2 = *n - i__;
00282 zlacgv_(&i__2, &a[i__ + (i__ + 1) * a_dim1], lda);
00283 zlacgv_(&i__, &a[i__ + a_dim1], lda);
00284 i__2 = *n - i__;
00285 z__1.r = -1., z__1.i = -0.;
00286 zgemv_("No transpose", &i__2, &i__, &z__1, &y[i__ + 1 +
00287 y_dim1], ldy, &a[i__ + a_dim1], lda, &c_b2, &a[i__ + (
00288 i__ + 1) * a_dim1], lda);
00289 zlacgv_(&i__, &a[i__ + a_dim1], lda);
00290 i__2 = i__ - 1;
00291 zlacgv_(&i__2, &x[i__ + x_dim1], ldx);
00292 i__2 = i__ - 1;
00293 i__3 = *n - i__;
00294 z__1.r = -1., z__1.i = -0.;
00295 zgemv_("Conjugate transpose", &i__2, &i__3, &z__1, &a[(i__ +
00296 1) * a_dim1 + 1], lda, &x[i__ + x_dim1], ldx, &c_b2, &
00297 a[i__ + (i__ + 1) * a_dim1], lda);
00298 i__2 = i__ - 1;
00299 zlacgv_(&i__2, &x[i__ + x_dim1], ldx);
00300
00301
00302
00303 i__2 = i__ + (i__ + 1) * a_dim1;
00304 alpha.r = a[i__2].r, alpha.i = a[i__2].i;
00305 i__2 = *n - i__;
00306
00307 i__3 = i__ + 2;
00308 zlarfg_(&i__2, &alpha, &a[i__ + min(i__3, *n)* a_dim1], lda, &
00309 taup[i__]);
00310 i__2 = i__;
00311 e[i__2] = alpha.r;
00312 i__2 = i__ + (i__ + 1) * a_dim1;
00313 a[i__2].r = 1., a[i__2].i = 0.;
00314
00315
00316
00317 i__2 = *m - i__;
00318 i__3 = *n - i__;
00319 zgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i__ + 1 + (i__
00320 + 1) * a_dim1], lda, &a[i__ + (i__ + 1) * a_dim1],
00321 lda, &c_b1, &x[i__ + 1 + i__ * x_dim1], &c__1);
00322 i__2 = *n - i__;
00323 zgemv_("Conjugate transpose", &i__2, &i__, &c_b2, &y[i__ + 1
00324 + y_dim1], ldy, &a[i__ + (i__ + 1) * a_dim1], lda, &
00325 c_b1, &x[i__ * x_dim1 + 1], &c__1);
00326 i__2 = *m - i__;
00327 z__1.r = -1., z__1.i = -0.;
00328 zgemv_("No transpose", &i__2, &i__, &z__1, &a[i__ + 1 +
00329 a_dim1], lda, &x[i__ * x_dim1 + 1], &c__1, &c_b2, &x[
00330 i__ + 1 + i__ * x_dim1], &c__1);
00331 i__2 = i__ - 1;
00332 i__3 = *n - i__;
00333 zgemv_("No transpose", &i__2, &i__3, &c_b2, &a[(i__ + 1) *
00334 a_dim1 + 1], lda, &a[i__ + (i__ + 1) * a_dim1], lda, &
00335 c_b1, &x[i__ * x_dim1 + 1], &c__1);
00336 i__2 = *m - i__;
00337 i__3 = i__ - 1;
00338 z__1.r = -1., z__1.i = -0.;
00339 zgemv_("No transpose", &i__2, &i__3, &z__1, &x[i__ + 1 +
00340 x_dim1], ldx, &x[i__ * x_dim1 + 1], &c__1, &c_b2, &x[
00341 i__ + 1 + i__ * x_dim1], &c__1);
00342 i__2 = *m - i__;
00343 zscal_(&i__2, &taup[i__], &x[i__ + 1 + i__ * x_dim1], &c__1);
00344 i__2 = *n - i__;
00345 zlacgv_(&i__2, &a[i__ + (i__ + 1) * a_dim1], lda);
00346 }
00347
00348 }
00349 } else {
00350
00351
00352
00353 i__1 = *nb;
00354 for (i__ = 1; i__ <= i__1; ++i__) {
00355
00356
00357
00358 i__2 = *n - i__ + 1;
00359 zlacgv_(&i__2, &a[i__ + i__ * a_dim1], lda);
00360 i__2 = i__ - 1;
00361 zlacgv_(&i__2, &a[i__ + a_dim1], lda);
00362 i__2 = *n - i__ + 1;
00363 i__3 = i__ - 1;
00364 z__1.r = -1., z__1.i = -0.;
00365 zgemv_("No transpose", &i__2, &i__3, &z__1, &y[i__ + y_dim1], ldy,
00366 &a[i__ + a_dim1], lda, &c_b2, &a[i__ + i__ * a_dim1],
00367 lda);
00368 i__2 = i__ - 1;
00369 zlacgv_(&i__2, &a[i__ + a_dim1], lda);
00370 i__2 = i__ - 1;
00371 zlacgv_(&i__2, &x[i__ + x_dim1], ldx);
00372 i__2 = i__ - 1;
00373 i__3 = *n - i__ + 1;
00374 z__1.r = -1., z__1.i = -0.;
00375 zgemv_("Conjugate transpose", &i__2, &i__3, &z__1, &a[i__ *
00376 a_dim1 + 1], lda, &x[i__ + x_dim1], ldx, &c_b2, &a[i__ +
00377 i__ * a_dim1], lda);
00378 i__2 = i__ - 1;
00379 zlacgv_(&i__2, &x[i__ + x_dim1], ldx);
00380
00381
00382
00383 i__2 = i__ + i__ * a_dim1;
00384 alpha.r = a[i__2].r, alpha.i = a[i__2].i;
00385 i__2 = *n - i__ + 1;
00386
00387 i__3 = i__ + 1;
00388 zlarfg_(&i__2, &alpha, &a[i__ + min(i__3, *n)* a_dim1], lda, &
00389 taup[i__]);
00390 i__2 = i__;
00391 d__[i__2] = alpha.r;
00392 if (i__ < *m) {
00393 i__2 = i__ + i__ * a_dim1;
00394 a[i__2].r = 1., a[i__2].i = 0.;
00395
00396
00397
00398 i__2 = *m - i__;
00399 i__3 = *n - i__ + 1;
00400 zgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i__ + 1 + i__ *
00401 a_dim1], lda, &a[i__ + i__ * a_dim1], lda, &c_b1, &x[
00402 i__ + 1 + i__ * x_dim1], &c__1);
00403 i__2 = *n - i__ + 1;
00404 i__3 = i__ - 1;
00405 zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &y[i__ +
00406 y_dim1], ldy, &a[i__ + i__ * a_dim1], lda, &c_b1, &x[
00407 i__ * x_dim1 + 1], &c__1);
00408 i__2 = *m - i__;
00409 i__3 = i__ - 1;
00410 z__1.r = -1., z__1.i = -0.;
00411 zgemv_("No transpose", &i__2, &i__3, &z__1, &a[i__ + 1 +
00412 a_dim1], lda, &x[i__ * x_dim1 + 1], &c__1, &c_b2, &x[
00413 i__ + 1 + i__ * x_dim1], &c__1);
00414 i__2 = i__ - 1;
00415 i__3 = *n - i__ + 1;
00416 zgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i__ * a_dim1 +
00417 1], lda, &a[i__ + i__ * a_dim1], lda, &c_b1, &x[i__ *
00418 x_dim1 + 1], &c__1);
00419 i__2 = *m - i__;
00420 i__3 = i__ - 1;
00421 z__1.r = -1., z__1.i = -0.;
00422 zgemv_("No transpose", &i__2, &i__3, &z__1, &x[i__ + 1 +
00423 x_dim1], ldx, &x[i__ * x_dim1 + 1], &c__1, &c_b2, &x[
00424 i__ + 1 + i__ * x_dim1], &c__1);
00425 i__2 = *m - i__;
00426 zscal_(&i__2, &taup[i__], &x[i__ + 1 + i__ * x_dim1], &c__1);
00427 i__2 = *n - i__ + 1;
00428 zlacgv_(&i__2, &a[i__ + i__ * a_dim1], lda);
00429
00430
00431
00432 i__2 = i__ - 1;
00433 zlacgv_(&i__2, &y[i__ + y_dim1], ldy);
00434 i__2 = *m - i__;
00435 i__3 = i__ - 1;
00436 z__1.r = -1., z__1.i = -0.;
00437 zgemv_("No transpose", &i__2, &i__3, &z__1, &a[i__ + 1 +
00438 a_dim1], lda, &y[i__ + y_dim1], ldy, &c_b2, &a[i__ +
00439 1 + i__ * a_dim1], &c__1);
00440 i__2 = i__ - 1;
00441 zlacgv_(&i__2, &y[i__ + y_dim1], ldy);
00442 i__2 = *m - i__;
00443 z__1.r = -1., z__1.i = -0.;
00444 zgemv_("No transpose", &i__2, &i__, &z__1, &x[i__ + 1 +
00445 x_dim1], ldx, &a[i__ * a_dim1 + 1], &c__1, &c_b2, &a[
00446 i__ + 1 + i__ * a_dim1], &c__1);
00447
00448
00449
00450 i__2 = i__ + 1 + i__ * a_dim1;
00451 alpha.r = a[i__2].r, alpha.i = a[i__2].i;
00452 i__2 = *m - i__;
00453
00454 i__3 = i__ + 2;
00455 zlarfg_(&i__2, &alpha, &a[min(i__3, *m)+ i__ * a_dim1], &c__1,
00456 &tauq[i__]);
00457 i__2 = i__;
00458 e[i__2] = alpha.r;
00459 i__2 = i__ + 1 + i__ * a_dim1;
00460 a[i__2].r = 1., a[i__2].i = 0.;
00461
00462
00463
00464 i__2 = *m - i__;
00465 i__3 = *n - i__;
00466 zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[i__ + 1
00467 + (i__ + 1) * a_dim1], lda, &a[i__ + 1 + i__ * a_dim1]
00468 , &c__1, &c_b1, &y[i__ + 1 + i__ * y_dim1], &c__1);
00469 i__2 = *m - i__;
00470 i__3 = i__ - 1;
00471 zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[i__ + 1
00472 + a_dim1], lda, &a[i__ + 1 + i__ * a_dim1], &c__1, &
00473 c_b1, &y[i__ * y_dim1 + 1], &c__1);
00474 i__2 = *n - i__;
00475 i__3 = i__ - 1;
00476 z__1.r = -1., z__1.i = -0.;
00477 zgemv_("No transpose", &i__2, &i__3, &z__1, &y[i__ + 1 +
00478 y_dim1], ldy, &y[i__ * y_dim1 + 1], &c__1, &c_b2, &y[
00479 i__ + 1 + i__ * y_dim1], &c__1);
00480 i__2 = *m - i__;
00481 zgemv_("Conjugate transpose", &i__2, &i__, &c_b2, &x[i__ + 1
00482 + x_dim1], ldx, &a[i__ + 1 + i__ * a_dim1], &c__1, &
00483 c_b1, &y[i__ * y_dim1 + 1], &c__1);
00484 i__2 = *n - i__;
00485 z__1.r = -1., z__1.i = -0.;
00486 zgemv_("Conjugate transpose", &i__, &i__2, &z__1, &a[(i__ + 1)
00487 * a_dim1 + 1], lda, &y[i__ * y_dim1 + 1], &c__1, &
00488 c_b2, &y[i__ + 1 + i__ * y_dim1], &c__1);
00489 i__2 = *n - i__;
00490 zscal_(&i__2, &tauq[i__], &y[i__ + 1 + i__ * y_dim1], &c__1);
00491 } else {
00492 i__2 = *n - i__ + 1;
00493 zlacgv_(&i__2, &a[i__ + i__ * a_dim1], lda);
00494 }
00495
00496 }
00497 }
00498 return 0;
00499
00500
00501
00502 }