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_b15 = -.125;
00019 static integer c__1 = 1;
00020 static doublereal c_b49 = 1.;
00021 static doublereal c_b72 = -1.;
00022
00023 int zbdsqr_(char *uplo, integer *n, integer *ncvt, integer *
00024 nru, integer *ncc, doublereal *d__, doublereal *e, doublecomplex *vt,
00025 integer *ldvt, doublecomplex *u, integer *ldu, doublecomplex *c__,
00026 integer *ldc, doublereal *rwork, integer *info)
00027 {
00028
00029 integer c_dim1, c_offset, u_dim1, u_offset, vt_dim1, vt_offset, i__1,
00030 i__2;
00031 doublereal d__1, d__2, d__3, d__4;
00032
00033
00034 double pow_dd(doublereal *, doublereal *), sqrt(doublereal), d_sign(
00035 doublereal *, doublereal *);
00036
00037
00038 doublereal f, g, h__;
00039 integer i__, j, m;
00040 doublereal r__, cs;
00041 integer ll;
00042 doublereal sn, mu;
00043 integer nm1, nm12, nm13, lll;
00044 doublereal eps, sll, tol, abse;
00045 integer idir;
00046 doublereal abss;
00047 integer oldm;
00048 doublereal cosl;
00049 integer isub, iter;
00050 doublereal unfl, sinl, cosr, smin, smax, sinr;
00051 extern int dlas2_(doublereal *, doublereal *, doublereal
00052 *, doublereal *, doublereal *);
00053 extern logical lsame_(char *, char *);
00054 doublereal oldcs;
00055 integer oldll;
00056 doublereal shift, sigmn, oldsn;
00057 integer maxit;
00058 doublereal sminl, sigmx;
00059 logical lower;
00060 extern int zlasr_(char *, char *, char *, integer *,
00061 integer *, doublereal *, doublereal *, doublecomplex *, integer *), zdrot_(integer *, doublecomplex *,
00062 integer *, doublecomplex *, integer *, doublereal *, doublereal *)
00063 , zswap_(integer *, doublecomplex *, integer *, doublecomplex *,
00064 integer *), dlasq1_(integer *, doublereal *, doublereal *,
00065 doublereal *, integer *), dlasv2_(doublereal *, doublereal *,
00066 doublereal *, doublereal *, doublereal *, doublereal *,
00067 doublereal *, doublereal *, doublereal *);
00068 extern doublereal dlamch_(char *);
00069 extern int dlartg_(doublereal *, doublereal *,
00070 doublereal *, doublereal *, doublereal *), xerbla_(char *,
00071 integer *), zdscal_(integer *, doublereal *,
00072 doublecomplex *, integer *);
00073 doublereal sminoa, thresh;
00074 logical rotate;
00075 doublereal tolmul;
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 --d__;
00231 --e;
00232 vt_dim1 = *ldvt;
00233 vt_offset = 1 + vt_dim1;
00234 vt -= vt_offset;
00235 u_dim1 = *ldu;
00236 u_offset = 1 + u_dim1;
00237 u -= u_offset;
00238 c_dim1 = *ldc;
00239 c_offset = 1 + c_dim1;
00240 c__ -= c_offset;
00241 --rwork;
00242
00243
00244 *info = 0;
00245 lower = lsame_(uplo, "L");
00246 if (! lsame_(uplo, "U") && ! lower) {
00247 *info = -1;
00248 } else if (*n < 0) {
00249 *info = -2;
00250 } else if (*ncvt < 0) {
00251 *info = -3;
00252 } else if (*nru < 0) {
00253 *info = -4;
00254 } else if (*ncc < 0) {
00255 *info = -5;
00256 } else if (*ncvt == 0 && *ldvt < 1 || *ncvt > 0 && *ldvt < max(1,*n)) {
00257 *info = -9;
00258 } else if (*ldu < max(1,*nru)) {
00259 *info = -11;
00260 } else if (*ncc == 0 && *ldc < 1 || *ncc > 0 && *ldc < max(1,*n)) {
00261 *info = -13;
00262 }
00263 if (*info != 0) {
00264 i__1 = -(*info);
00265 xerbla_("ZBDSQR", &i__1);
00266 return 0;
00267 }
00268 if (*n == 0) {
00269 return 0;
00270 }
00271 if (*n == 1) {
00272 goto L160;
00273 }
00274
00275
00276
00277 rotate = *ncvt > 0 || *nru > 0 || *ncc > 0;
00278
00279
00280
00281 if (! rotate) {
00282 dlasq1_(n, &d__[1], &e[1], &rwork[1], info);
00283 return 0;
00284 }
00285
00286 nm1 = *n - 1;
00287 nm12 = nm1 + nm1;
00288 nm13 = nm12 + nm1;
00289 idir = 0;
00290
00291
00292
00293 eps = dlamch_("Epsilon");
00294 unfl = dlamch_("Safe minimum");
00295
00296
00297
00298
00299 if (lower) {
00300 i__1 = *n - 1;
00301 for (i__ = 1; i__ <= i__1; ++i__) {
00302 dlartg_(&d__[i__], &e[i__], &cs, &sn, &r__);
00303 d__[i__] = r__;
00304 e[i__] = sn * d__[i__ + 1];
00305 d__[i__ + 1] = cs * d__[i__ + 1];
00306 rwork[i__] = cs;
00307 rwork[nm1 + i__] = sn;
00308
00309 }
00310
00311
00312
00313 if (*nru > 0) {
00314 zlasr_("R", "V", "F", nru, n, &rwork[1], &rwork[*n], &u[u_offset],
00315 ldu);
00316 }
00317 if (*ncc > 0) {
00318 zlasr_("L", "V", "F", n, ncc, &rwork[1], &rwork[*n], &c__[
00319 c_offset], ldc);
00320 }
00321 }
00322
00323
00324
00325
00326
00327
00328
00329 d__3 = 100., d__4 = pow_dd(&eps, &c_b15);
00330 d__1 = 10., d__2 = min(d__3,d__4);
00331 tolmul = max(d__1,d__2);
00332 tol = tolmul * eps;
00333
00334
00335
00336 smax = 0.;
00337 i__1 = *n;
00338 for (i__ = 1; i__ <= i__1; ++i__) {
00339
00340 d__2 = smax, d__3 = (d__1 = d__[i__], abs(d__1));
00341 smax = max(d__2,d__3);
00342
00343 }
00344 i__1 = *n - 1;
00345 for (i__ = 1; i__ <= i__1; ++i__) {
00346
00347 d__2 = smax, d__3 = (d__1 = e[i__], abs(d__1));
00348 smax = max(d__2,d__3);
00349
00350 }
00351 sminl = 0.;
00352 if (tol >= 0.) {
00353
00354
00355
00356 sminoa = abs(d__[1]);
00357 if (sminoa == 0.) {
00358 goto L50;
00359 }
00360 mu = sminoa;
00361 i__1 = *n;
00362 for (i__ = 2; i__ <= i__1; ++i__) {
00363 mu = (d__2 = d__[i__], abs(d__2)) * (mu / (mu + (d__1 = e[i__ - 1]
00364 , abs(d__1))));
00365 sminoa = min(sminoa,mu);
00366 if (sminoa == 0.) {
00367 goto L50;
00368 }
00369
00370 }
00371 L50:
00372 sminoa /= sqrt((doublereal) (*n));
00373
00374 d__1 = tol * sminoa, d__2 = *n * 6 * *n * unfl;
00375 thresh = max(d__1,d__2);
00376 } else {
00377
00378
00379
00380
00381 d__1 = abs(tol) * smax, d__2 = *n * 6 * *n * unfl;
00382 thresh = max(d__1,d__2);
00383 }
00384
00385
00386
00387
00388
00389 maxit = *n * 6 * *n;
00390 iter = 0;
00391 oldll = -1;
00392 oldm = -1;
00393
00394
00395
00396 m = *n;
00397
00398
00399
00400 L60:
00401
00402
00403
00404 if (m <= 1) {
00405 goto L160;
00406 }
00407 if (iter > maxit) {
00408 goto L200;
00409 }
00410
00411
00412
00413 if (tol < 0. && (d__1 = d__[m], abs(d__1)) <= thresh) {
00414 d__[m] = 0.;
00415 }
00416 smax = (d__1 = d__[m], abs(d__1));
00417 smin = smax;
00418 i__1 = m - 1;
00419 for (lll = 1; lll <= i__1; ++lll) {
00420 ll = m - lll;
00421 abss = (d__1 = d__[ll], abs(d__1));
00422 abse = (d__1 = e[ll], abs(d__1));
00423 if (tol < 0. && abss <= thresh) {
00424 d__[ll] = 0.;
00425 }
00426 if (abse <= thresh) {
00427 goto L80;
00428 }
00429 smin = min(smin,abss);
00430
00431 d__1 = max(smax,abss);
00432 smax = max(d__1,abse);
00433
00434 }
00435 ll = 0;
00436 goto L90;
00437 L80:
00438 e[ll] = 0.;
00439
00440
00441
00442 if (ll == m - 1) {
00443
00444
00445
00446 --m;
00447 goto L60;
00448 }
00449 L90:
00450 ++ll;
00451
00452
00453
00454 if (ll == m - 1) {
00455
00456
00457
00458 dlasv2_(&d__[m - 1], &e[m - 1], &d__[m], &sigmn, &sigmx, &sinr, &cosr,
00459 &sinl, &cosl);
00460 d__[m - 1] = sigmx;
00461 e[m - 1] = 0.;
00462 d__[m] = sigmn;
00463
00464
00465
00466 if (*ncvt > 0) {
00467 zdrot_(ncvt, &vt[m - 1 + vt_dim1], ldvt, &vt[m + vt_dim1], ldvt, &
00468 cosr, &sinr);
00469 }
00470 if (*nru > 0) {
00471 zdrot_(nru, &u[(m - 1) * u_dim1 + 1], &c__1, &u[m * u_dim1 + 1], &
00472 c__1, &cosl, &sinl);
00473 }
00474 if (*ncc > 0) {
00475 zdrot_(ncc, &c__[m - 1 + c_dim1], ldc, &c__[m + c_dim1], ldc, &
00476 cosl, &sinl);
00477 }
00478 m += -2;
00479 goto L60;
00480 }
00481
00482
00483
00484
00485 if (ll > oldm || m < oldll) {
00486 if ((d__1 = d__[ll], abs(d__1)) >= (d__2 = d__[m], abs(d__2))) {
00487
00488
00489
00490 idir = 1;
00491 } else {
00492
00493
00494
00495 idir = 2;
00496 }
00497 }
00498
00499
00500
00501 if (idir == 1) {
00502
00503
00504
00505
00506 if ((d__2 = e[m - 1], abs(d__2)) <= abs(tol) * (d__1 = d__[m], abs(
00507 d__1)) || tol < 0. && (d__3 = e[m - 1], abs(d__3)) <= thresh)
00508 {
00509 e[m - 1] = 0.;
00510 goto L60;
00511 }
00512
00513 if (tol >= 0.) {
00514
00515
00516
00517
00518 mu = (d__1 = d__[ll], abs(d__1));
00519 sminl = mu;
00520 i__1 = m - 1;
00521 for (lll = ll; lll <= i__1; ++lll) {
00522 if ((d__1 = e[lll], abs(d__1)) <= tol * mu) {
00523 e[lll] = 0.;
00524 goto L60;
00525 }
00526 mu = (d__2 = d__[lll + 1], abs(d__2)) * (mu / (mu + (d__1 = e[
00527 lll], abs(d__1))));
00528 sminl = min(sminl,mu);
00529
00530 }
00531 }
00532
00533 } else {
00534
00535
00536
00537
00538 if ((d__2 = e[ll], abs(d__2)) <= abs(tol) * (d__1 = d__[ll], abs(d__1)
00539 ) || tol < 0. && (d__3 = e[ll], abs(d__3)) <= thresh) {
00540 e[ll] = 0.;
00541 goto L60;
00542 }
00543
00544 if (tol >= 0.) {
00545
00546
00547
00548
00549 mu = (d__1 = d__[m], abs(d__1));
00550 sminl = mu;
00551 i__1 = ll;
00552 for (lll = m - 1; lll >= i__1; --lll) {
00553 if ((d__1 = e[lll], abs(d__1)) <= tol * mu) {
00554 e[lll] = 0.;
00555 goto L60;
00556 }
00557 mu = (d__2 = d__[lll], abs(d__2)) * (mu / (mu + (d__1 = e[lll]
00558 , abs(d__1))));
00559 sminl = min(sminl,mu);
00560
00561 }
00562 }
00563 }
00564 oldll = ll;
00565 oldm = m;
00566
00567
00568
00569
00570
00571 d__1 = eps, d__2 = tol * .01;
00572 if (tol >= 0. && *n * tol * (sminl / smax) <= max(d__1,d__2)) {
00573
00574
00575
00576 shift = 0.;
00577 } else {
00578
00579
00580
00581 if (idir == 1) {
00582 sll = (d__1 = d__[ll], abs(d__1));
00583 dlas2_(&d__[m - 1], &e[m - 1], &d__[m], &shift, &r__);
00584 } else {
00585 sll = (d__1 = d__[m], abs(d__1));
00586 dlas2_(&d__[ll], &e[ll], &d__[ll + 1], &shift, &r__);
00587 }
00588
00589
00590
00591 if (sll > 0.) {
00592
00593 d__1 = shift / sll;
00594 if (d__1 * d__1 < eps) {
00595 shift = 0.;
00596 }
00597 }
00598 }
00599
00600
00601
00602 iter = iter + m - ll;
00603
00604
00605
00606 if (shift == 0.) {
00607 if (idir == 1) {
00608
00609
00610
00611
00612 cs = 1.;
00613 oldcs = 1.;
00614 i__1 = m - 1;
00615 for (i__ = ll; i__ <= i__1; ++i__) {
00616 d__1 = d__[i__] * cs;
00617 dlartg_(&d__1, &e[i__], &cs, &sn, &r__);
00618 if (i__ > ll) {
00619 e[i__ - 1] = oldsn * r__;
00620 }
00621 d__1 = oldcs * r__;
00622 d__2 = d__[i__ + 1] * sn;
00623 dlartg_(&d__1, &d__2, &oldcs, &oldsn, &d__[i__]);
00624 rwork[i__ - ll + 1] = cs;
00625 rwork[i__ - ll + 1 + nm1] = sn;
00626 rwork[i__ - ll + 1 + nm12] = oldcs;
00627 rwork[i__ - ll + 1 + nm13] = oldsn;
00628
00629 }
00630 h__ = d__[m] * cs;
00631 d__[m] = h__ * oldcs;
00632 e[m - 1] = h__ * oldsn;
00633
00634
00635
00636 if (*ncvt > 0) {
00637 i__1 = m - ll + 1;
00638 zlasr_("L", "V", "F", &i__1, ncvt, &rwork[1], &rwork[*n], &vt[
00639 ll + vt_dim1], ldvt);
00640 }
00641 if (*nru > 0) {
00642 i__1 = m - ll + 1;
00643 zlasr_("R", "V", "F", nru, &i__1, &rwork[nm12 + 1], &rwork[
00644 nm13 + 1], &u[ll * u_dim1 + 1], ldu);
00645 }
00646 if (*ncc > 0) {
00647 i__1 = m - ll + 1;
00648 zlasr_("L", "V", "F", &i__1, ncc, &rwork[nm12 + 1], &rwork[
00649 nm13 + 1], &c__[ll + c_dim1], ldc);
00650 }
00651
00652
00653
00654 if ((d__1 = e[m - 1], abs(d__1)) <= thresh) {
00655 e[m - 1] = 0.;
00656 }
00657
00658 } else {
00659
00660
00661
00662
00663 cs = 1.;
00664 oldcs = 1.;
00665 i__1 = ll + 1;
00666 for (i__ = m; i__ >= i__1; --i__) {
00667 d__1 = d__[i__] * cs;
00668 dlartg_(&d__1, &e[i__ - 1], &cs, &sn, &r__);
00669 if (i__ < m) {
00670 e[i__] = oldsn * r__;
00671 }
00672 d__1 = oldcs * r__;
00673 d__2 = d__[i__ - 1] * sn;
00674 dlartg_(&d__1, &d__2, &oldcs, &oldsn, &d__[i__]);
00675 rwork[i__ - ll] = cs;
00676 rwork[i__ - ll + nm1] = -sn;
00677 rwork[i__ - ll + nm12] = oldcs;
00678 rwork[i__ - ll + nm13] = -oldsn;
00679
00680 }
00681 h__ = d__[ll] * cs;
00682 d__[ll] = h__ * oldcs;
00683 e[ll] = h__ * oldsn;
00684
00685
00686
00687 if (*ncvt > 0) {
00688 i__1 = m - ll + 1;
00689 zlasr_("L", "V", "B", &i__1, ncvt, &rwork[nm12 + 1], &rwork[
00690 nm13 + 1], &vt[ll + vt_dim1], ldvt);
00691 }
00692 if (*nru > 0) {
00693 i__1 = m - ll + 1;
00694 zlasr_("R", "V", "B", nru, &i__1, &rwork[1], &rwork[*n], &u[
00695 ll * u_dim1 + 1], ldu);
00696 }
00697 if (*ncc > 0) {
00698 i__1 = m - ll + 1;
00699 zlasr_("L", "V", "B", &i__1, ncc, &rwork[1], &rwork[*n], &c__[
00700 ll + c_dim1], ldc);
00701 }
00702
00703
00704
00705 if ((d__1 = e[ll], abs(d__1)) <= thresh) {
00706 e[ll] = 0.;
00707 }
00708 }
00709 } else {
00710
00711
00712
00713 if (idir == 1) {
00714
00715
00716
00717
00718 f = ((d__1 = d__[ll], abs(d__1)) - shift) * (d_sign(&c_b49, &d__[
00719 ll]) + shift / d__[ll]);
00720 g = e[ll];
00721 i__1 = m - 1;
00722 for (i__ = ll; i__ <= i__1; ++i__) {
00723 dlartg_(&f, &g, &cosr, &sinr, &r__);
00724 if (i__ > ll) {
00725 e[i__ - 1] = r__;
00726 }
00727 f = cosr * d__[i__] + sinr * e[i__];
00728 e[i__] = cosr * e[i__] - sinr * d__[i__];
00729 g = sinr * d__[i__ + 1];
00730 d__[i__ + 1] = cosr * d__[i__ + 1];
00731 dlartg_(&f, &g, &cosl, &sinl, &r__);
00732 d__[i__] = r__;
00733 f = cosl * e[i__] + sinl * d__[i__ + 1];
00734 d__[i__ + 1] = cosl * d__[i__ + 1] - sinl * e[i__];
00735 if (i__ < m - 1) {
00736 g = sinl * e[i__ + 1];
00737 e[i__ + 1] = cosl * e[i__ + 1];
00738 }
00739 rwork[i__ - ll + 1] = cosr;
00740 rwork[i__ - ll + 1 + nm1] = sinr;
00741 rwork[i__ - ll + 1 + nm12] = cosl;
00742 rwork[i__ - ll + 1 + nm13] = sinl;
00743
00744 }
00745 e[m - 1] = f;
00746
00747
00748
00749 if (*ncvt > 0) {
00750 i__1 = m - ll + 1;
00751 zlasr_("L", "V", "F", &i__1, ncvt, &rwork[1], &rwork[*n], &vt[
00752 ll + vt_dim1], ldvt);
00753 }
00754 if (*nru > 0) {
00755 i__1 = m - ll + 1;
00756 zlasr_("R", "V", "F", nru, &i__1, &rwork[nm12 + 1], &rwork[
00757 nm13 + 1], &u[ll * u_dim1 + 1], ldu);
00758 }
00759 if (*ncc > 0) {
00760 i__1 = m - ll + 1;
00761 zlasr_("L", "V", "F", &i__1, ncc, &rwork[nm12 + 1], &rwork[
00762 nm13 + 1], &c__[ll + c_dim1], ldc);
00763 }
00764
00765
00766
00767 if ((d__1 = e[m - 1], abs(d__1)) <= thresh) {
00768 e[m - 1] = 0.;
00769 }
00770
00771 } else {
00772
00773
00774
00775
00776 f = ((d__1 = d__[m], abs(d__1)) - shift) * (d_sign(&c_b49, &d__[m]
00777 ) + shift / d__[m]);
00778 g = e[m - 1];
00779 i__1 = ll + 1;
00780 for (i__ = m; i__ >= i__1; --i__) {
00781 dlartg_(&f, &g, &cosr, &sinr, &r__);
00782 if (i__ < m) {
00783 e[i__] = r__;
00784 }
00785 f = cosr * d__[i__] + sinr * e[i__ - 1];
00786 e[i__ - 1] = cosr * e[i__ - 1] - sinr * d__[i__];
00787 g = sinr * d__[i__ - 1];
00788 d__[i__ - 1] = cosr * d__[i__ - 1];
00789 dlartg_(&f, &g, &cosl, &sinl, &r__);
00790 d__[i__] = r__;
00791 f = cosl * e[i__ - 1] + sinl * d__[i__ - 1];
00792 d__[i__ - 1] = cosl * d__[i__ - 1] - sinl * e[i__ - 1];
00793 if (i__ > ll + 1) {
00794 g = sinl * e[i__ - 2];
00795 e[i__ - 2] = cosl * e[i__ - 2];
00796 }
00797 rwork[i__ - ll] = cosr;
00798 rwork[i__ - ll + nm1] = -sinr;
00799 rwork[i__ - ll + nm12] = cosl;
00800 rwork[i__ - ll + nm13] = -sinl;
00801
00802 }
00803 e[ll] = f;
00804
00805
00806
00807 if ((d__1 = e[ll], abs(d__1)) <= thresh) {
00808 e[ll] = 0.;
00809 }
00810
00811
00812
00813 if (*ncvt > 0) {
00814 i__1 = m - ll + 1;
00815 zlasr_("L", "V", "B", &i__1, ncvt, &rwork[nm12 + 1], &rwork[
00816 nm13 + 1], &vt[ll + vt_dim1], ldvt);
00817 }
00818 if (*nru > 0) {
00819 i__1 = m - ll + 1;
00820 zlasr_("R", "V", "B", nru, &i__1, &rwork[1], &rwork[*n], &u[
00821 ll * u_dim1 + 1], ldu);
00822 }
00823 if (*ncc > 0) {
00824 i__1 = m - ll + 1;
00825 zlasr_("L", "V", "B", &i__1, ncc, &rwork[1], &rwork[*n], &c__[
00826 ll + c_dim1], ldc);
00827 }
00828 }
00829 }
00830
00831
00832
00833 goto L60;
00834
00835
00836
00837 L160:
00838 i__1 = *n;
00839 for (i__ = 1; i__ <= i__1; ++i__) {
00840 if (d__[i__] < 0.) {
00841 d__[i__] = -d__[i__];
00842
00843
00844
00845 if (*ncvt > 0) {
00846 zdscal_(ncvt, &c_b72, &vt[i__ + vt_dim1], ldvt);
00847 }
00848 }
00849
00850 }
00851
00852
00853
00854
00855 i__1 = *n - 1;
00856 for (i__ = 1; i__ <= i__1; ++i__) {
00857
00858
00859
00860 isub = 1;
00861 smin = d__[1];
00862 i__2 = *n + 1 - i__;
00863 for (j = 2; j <= i__2; ++j) {
00864 if (d__[j] <= smin) {
00865 isub = j;
00866 smin = d__[j];
00867 }
00868
00869 }
00870 if (isub != *n + 1 - i__) {
00871
00872
00873
00874 d__[isub] = d__[*n + 1 - i__];
00875 d__[*n + 1 - i__] = smin;
00876 if (*ncvt > 0) {
00877 zswap_(ncvt, &vt[isub + vt_dim1], ldvt, &vt[*n + 1 - i__ +
00878 vt_dim1], ldvt);
00879 }
00880 if (*nru > 0) {
00881 zswap_(nru, &u[isub * u_dim1 + 1], &c__1, &u[(*n + 1 - i__) *
00882 u_dim1 + 1], &c__1);
00883 }
00884 if (*ncc > 0) {
00885 zswap_(ncc, &c__[isub + c_dim1], ldc, &c__[*n + 1 - i__ +
00886 c_dim1], ldc);
00887 }
00888 }
00889
00890 }
00891 goto L220;
00892
00893
00894
00895 L200:
00896 *info = 0;
00897 i__1 = *n - 1;
00898 for (i__ = 1; i__ <= i__1; ++i__) {
00899 if (e[i__] != 0.) {
00900 ++(*info);
00901 }
00902
00903 }
00904 L220:
00905 return 0;
00906
00907
00908
00909 }