zlals0.c
Go to the documentation of this file.
00001 /* zlals0.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Table of constant values */
00017 
00018 static doublereal c_b5 = -1.;
00019 static integer c__1 = 1;
00020 static doublereal c_b13 = 1.;
00021 static doublereal c_b15 = 0.;
00022 static integer c__0 = 0;
00023 
00024 /* Subroutine */ int zlals0_(integer *icompq, integer *nl, integer *nr, 
00025         integer *sqre, integer *nrhs, doublecomplex *b, integer *ldb, 
00026         doublecomplex *bx, integer *ldbx, integer *perm, integer *givptr, 
00027         integer *givcol, integer *ldgcol, doublereal *givnum, integer *ldgnum, 
00028          doublereal *poles, doublereal *difl, doublereal *difr, doublereal *
00029         z__, integer *k, doublereal *c__, doublereal *s, doublereal *rwork, 
00030         integer *info)
00031 {
00032     /* System generated locals */
00033     integer givcol_dim1, givcol_offset, difr_dim1, difr_offset, givnum_dim1, 
00034             givnum_offset, poles_dim1, poles_offset, b_dim1, b_offset, 
00035             bx_dim1, bx_offset, i__1, i__2, i__3, i__4, i__5;
00036     doublereal d__1;
00037     doublecomplex z__1;
00038 
00039     /* Builtin functions */
00040     double d_imag(doublecomplex *);
00041 
00042     /* Local variables */
00043     integer i__, j, m, n;
00044     doublereal dj;
00045     integer nlp1, jcol;
00046     doublereal temp;
00047     integer jrow;
00048     extern doublereal dnrm2_(integer *, doublereal *, integer *);
00049     doublereal diflj, difrj, dsigj;
00050     extern /* Subroutine */ int dgemv_(char *, integer *, integer *, 
00051             doublereal *, doublereal *, integer *, doublereal *, integer *, 
00052             doublereal *, doublereal *, integer *), zdrot_(integer *, 
00053             doublecomplex *, integer *, doublecomplex *, integer *, 
00054             doublereal *, doublereal *);
00055     extern doublereal dlamc3_(doublereal *, doublereal *);
00056     extern /* Subroutine */ int zcopy_(integer *, doublecomplex *, integer *, 
00057             doublecomplex *, integer *), xerbla_(char *, integer *);
00058     doublereal dsigjp;
00059     extern /* Subroutine */ int zdscal_(integer *, doublereal *, 
00060             doublecomplex *, integer *), zlascl_(char *, integer *, integer *, 
00061              doublereal *, doublereal *, integer *, integer *, doublecomplex *
00062 , integer *, integer *), zlacpy_(char *, integer *, 
00063             integer *, doublecomplex *, integer *, doublecomplex *, integer *);
00064 
00065 
00066 /*  -- LAPACK routine (version 3.2) -- */
00067 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00068 /*     November 2006 */
00069 
00070 /*     .. Scalar Arguments .. */
00071 /*     .. */
00072 /*     .. Array Arguments .. */
00073 /*     .. */
00074 
00075 /*  Purpose */
00076 /*  ======= */
00077 
00078 /*  ZLALS0 applies back the multiplying factors of either the left or the */
00079 /*  right singular vector matrix of a diagonal matrix appended by a row */
00080 /*  to the right hand side matrix B in solving the least squares problem */
00081 /*  using the divide-and-conquer SVD approach. */
00082 
00083 /*  For the left singular vector matrix, three types of orthogonal */
00084 /*  matrices are involved: */
00085 
00086 /*  (1L) Givens rotations: the number of such rotations is GIVPTR; the */
00087 /*       pairs of columns/rows they were applied to are stored in GIVCOL; */
00088 /*       and the C- and S-values of these rotations are stored in GIVNUM. */
00089 
00090 /*  (2L) Permutation. The (NL+1)-st row of B is to be moved to the first */
00091 /*       row, and for J=2:N, PERM(J)-th row of B is to be moved to the */
00092 /*       J-th row. */
00093 
00094 /*  (3L) The left singular vector matrix of the remaining matrix. */
00095 
00096 /*  For the right singular vector matrix, four types of orthogonal */
00097 /*  matrices are involved: */
00098 
00099 /*  (1R) The right singular vector matrix of the remaining matrix. */
00100 
00101 /*  (2R) If SQRE = 1, one extra Givens rotation to generate the right */
00102 /*       null space. */
00103 
00104 /*  (3R) The inverse transformation of (2L). */
00105 
00106 /*  (4R) The inverse transformation of (1L). */
00107 
00108 /*  Arguments */
00109 /*  ========= */
00110 
00111 /*  ICOMPQ (input) INTEGER */
00112 /*         Specifies whether singular vectors are to be computed in */
00113 /*         factored form: */
00114 /*         = 0: Left singular vector matrix. */
00115 /*         = 1: Right singular vector matrix. */
00116 
00117 /*  NL     (input) INTEGER */
00118 /*         The row dimension of the upper block. NL >= 1. */
00119 
00120 /*  NR     (input) INTEGER */
00121 /*         The row dimension of the lower block. NR >= 1. */
00122 
00123 /*  SQRE   (input) INTEGER */
00124 /*         = 0: the lower block is an NR-by-NR square matrix. */
00125 /*         = 1: the lower block is an NR-by-(NR+1) rectangular matrix. */
00126 
00127 /*         The bidiagonal matrix has row dimension N = NL + NR + 1, */
00128 /*         and column dimension M = N + SQRE. */
00129 
00130 /*  NRHS   (input) INTEGER */
00131 /*         The number of columns of B and BX. NRHS must be at least 1. */
00132 
00133 /*  B      (input/output) COMPLEX*16 array, dimension ( LDB, NRHS ) */
00134 /*         On input, B contains the right hand sides of the least */
00135 /*         squares problem in rows 1 through M. On output, B contains */
00136 /*         the solution X in rows 1 through N. */
00137 
00138 /*  LDB    (input) INTEGER */
00139 /*         The leading dimension of B. LDB must be at least */
00140 /*         max(1,MAX( M, N ) ). */
00141 
00142 /*  BX     (workspace) COMPLEX*16 array, dimension ( LDBX, NRHS ) */
00143 
00144 /*  LDBX   (input) INTEGER */
00145 /*         The leading dimension of BX. */
00146 
00147 /*  PERM   (input) INTEGER array, dimension ( N ) */
00148 /*         The permutations (from deflation and sorting) applied */
00149 /*         to the two blocks. */
00150 
00151 /*  GIVPTR (input) INTEGER */
00152 /*         The number of Givens rotations which took place in this */
00153 /*         subproblem. */
00154 
00155 /*  GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 ) */
00156 /*         Each pair of numbers indicates a pair of rows/columns */
00157 /*         involved in a Givens rotation. */
00158 
00159 /*  LDGCOL (input) INTEGER */
00160 /*         The leading dimension of GIVCOL, must be at least N. */
00161 
00162 /*  GIVNUM (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ) */
00163 /*         Each number indicates the C or S value used in the */
00164 /*         corresponding Givens rotation. */
00165 
00166 /*  LDGNUM (input) INTEGER */
00167 /*         The leading dimension of arrays DIFR, POLES and */
00168 /*         GIVNUM, must be at least K. */
00169 
00170 /*  POLES  (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ) */
00171 /*         On entry, POLES(1:K, 1) contains the new singular */
00172 /*         values obtained from solving the secular equation, and */
00173 /*         POLES(1:K, 2) is an array containing the poles in the secular */
00174 /*         equation. */
00175 
00176 /*  DIFL   (input) DOUBLE PRECISION array, dimension ( K ). */
00177 /*         On entry, DIFL(I) is the distance between I-th updated */
00178 /*         (undeflated) singular value and the I-th (undeflated) old */
00179 /*         singular value. */
00180 
00181 /*  DIFR   (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ). */
00182 /*         On entry, DIFR(I, 1) contains the distances between I-th */
00183 /*         updated (undeflated) singular value and the I+1-th */
00184 /*         (undeflated) old singular value. And DIFR(I, 2) is the */
00185 /*         normalizing factor for the I-th right singular vector. */
00186 
00187 /*  Z      (input) DOUBLE PRECISION array, dimension ( K ) */
00188 /*         Contain the components of the deflation-adjusted updating row */
00189 /*         vector. */
00190 
00191 /*  K      (input) INTEGER */
00192 /*         Contains the dimension of the non-deflated matrix, */
00193 /*         This is the order of the related secular equation. 1 <= K <=N. */
00194 
00195 /*  C      (input) DOUBLE PRECISION */
00196 /*         C contains garbage if SQRE =0 and the C-value of a Givens */
00197 /*         rotation related to the right null space if SQRE = 1. */
00198 
00199 /*  S      (input) DOUBLE PRECISION */
00200 /*         S contains garbage if SQRE =0 and the S-value of a Givens */
00201 /*         rotation related to the right null space if SQRE = 1. */
00202 
00203 /*  RWORK  (workspace) DOUBLE PRECISION array, dimension */
00204 /*         ( K*(1+NRHS) + 2*NRHS ) */
00205 
00206 /*  INFO   (output) INTEGER */
00207 /*          = 0:  successful exit. */
00208 /*          < 0:  if INFO = -i, the i-th argument had an illegal value. */
00209 
00210 /*  Further Details */
00211 /*  =============== */
00212 
00213 /*  Based on contributions by */
00214 /*     Ming Gu and Ren-Cang Li, Computer Science Division, University of */
00215 /*       California at Berkeley, USA */
00216 /*     Osni Marques, LBNL/NERSC, USA */
00217 
00218 /*  ===================================================================== */
00219 
00220 /*     .. Parameters .. */
00221 /*     .. */
00222 /*     .. Local Scalars .. */
00223 /*     .. */
00224 /*     .. External Subroutines .. */
00225 /*     .. */
00226 /*     .. External Functions .. */
00227 /*     .. */
00228 /*     .. Intrinsic Functions .. */
00229 /*     .. */
00230 /*     .. Executable Statements .. */
00231 
00232 /*     Test the input parameters. */
00233 
00234     /* Parameter adjustments */
00235     b_dim1 = *ldb;
00236     b_offset = 1 + b_dim1;
00237     b -= b_offset;
00238     bx_dim1 = *ldbx;
00239     bx_offset = 1 + bx_dim1;
00240     bx -= bx_offset;
00241     --perm;
00242     givcol_dim1 = *ldgcol;
00243     givcol_offset = 1 + givcol_dim1;
00244     givcol -= givcol_offset;
00245     difr_dim1 = *ldgnum;
00246     difr_offset = 1 + difr_dim1;
00247     difr -= difr_offset;
00248     poles_dim1 = *ldgnum;
00249     poles_offset = 1 + poles_dim1;
00250     poles -= poles_offset;
00251     givnum_dim1 = *ldgnum;
00252     givnum_offset = 1 + givnum_dim1;
00253     givnum -= givnum_offset;
00254     --difl;
00255     --z__;
00256     --rwork;
00257 
00258     /* Function Body */
00259     *info = 0;
00260 
00261     if (*icompq < 0 || *icompq > 1) {
00262         *info = -1;
00263     } else if (*nl < 1) {
00264         *info = -2;
00265     } else if (*nr < 1) {
00266         *info = -3;
00267     } else if (*sqre < 0 || *sqre > 1) {
00268         *info = -4;
00269     }
00270 
00271     n = *nl + *nr + 1;
00272 
00273     if (*nrhs < 1) {
00274         *info = -5;
00275     } else if (*ldb < n) {
00276         *info = -7;
00277     } else if (*ldbx < n) {
00278         *info = -9;
00279     } else if (*givptr < 0) {
00280         *info = -11;
00281     } else if (*ldgcol < n) {
00282         *info = -13;
00283     } else if (*ldgnum < n) {
00284         *info = -15;
00285     } else if (*k < 1) {
00286         *info = -20;
00287     }
00288     if (*info != 0) {
00289         i__1 = -(*info);
00290         xerbla_("ZLALS0", &i__1);
00291         return 0;
00292     }
00293 
00294     m = n + *sqre;
00295     nlp1 = *nl + 1;
00296 
00297     if (*icompq == 0) {
00298 
00299 /*        Apply back orthogonal transformations from the left. */
00300 
00301 /*        Step (1L): apply back the Givens rotations performed. */
00302 
00303         i__1 = *givptr;
00304         for (i__ = 1; i__ <= i__1; ++i__) {
00305             zdrot_(nrhs, &b[givcol[i__ + (givcol_dim1 << 1)] + b_dim1], ldb, &
00306                     b[givcol[i__ + givcol_dim1] + b_dim1], ldb, &givnum[i__ + 
00307                     (givnum_dim1 << 1)], &givnum[i__ + givnum_dim1]);
00308 /* L10: */
00309         }
00310 
00311 /*        Step (2L): permute rows of B. */
00312 
00313         zcopy_(nrhs, &b[nlp1 + b_dim1], ldb, &bx[bx_dim1 + 1], ldbx);
00314         i__1 = n;
00315         for (i__ = 2; i__ <= i__1; ++i__) {
00316             zcopy_(nrhs, &b[perm[i__] + b_dim1], ldb, &bx[i__ + bx_dim1], 
00317                     ldbx);
00318 /* L20: */
00319         }
00320 
00321 /*        Step (3L): apply the inverse of the left singular vector */
00322 /*        matrix to BX. */
00323 
00324         if (*k == 1) {
00325             zcopy_(nrhs, &bx[bx_offset], ldbx, &b[b_offset], ldb);
00326             if (z__[1] < 0.) {
00327                 zdscal_(nrhs, &c_b5, &b[b_offset], ldb);
00328             }
00329         } else {
00330             i__1 = *k;
00331             for (j = 1; j <= i__1; ++j) {
00332                 diflj = difl[j];
00333                 dj = poles[j + poles_dim1];
00334                 dsigj = -poles[j + (poles_dim1 << 1)];
00335                 if (j < *k) {
00336                     difrj = -difr[j + difr_dim1];
00337                     dsigjp = -poles[j + 1 + (poles_dim1 << 1)];
00338                 }
00339                 if (z__[j] == 0. || poles[j + (poles_dim1 << 1)] == 0.) {
00340                     rwork[j] = 0.;
00341                 } else {
00342                     rwork[j] = -poles[j + (poles_dim1 << 1)] * z__[j] / diflj 
00343                             / (poles[j + (poles_dim1 << 1)] + dj);
00344                 }
00345                 i__2 = j - 1;
00346                 for (i__ = 1; i__ <= i__2; ++i__) {
00347                     if (z__[i__] == 0. || poles[i__ + (poles_dim1 << 1)] == 
00348                             0.) {
00349                         rwork[i__] = 0.;
00350                     } else {
00351                         rwork[i__] = poles[i__ + (poles_dim1 << 1)] * z__[i__]
00352                                  / (dlamc3_(&poles[i__ + (poles_dim1 << 1)], &
00353                                 dsigj) - diflj) / (poles[i__ + (poles_dim1 << 
00354                                 1)] + dj);
00355                     }
00356 /* L30: */
00357                 }
00358                 i__2 = *k;
00359                 for (i__ = j + 1; i__ <= i__2; ++i__) {
00360                     if (z__[i__] == 0. || poles[i__ + (poles_dim1 << 1)] == 
00361                             0.) {
00362                         rwork[i__] = 0.;
00363                     } else {
00364                         rwork[i__] = poles[i__ + (poles_dim1 << 1)] * z__[i__]
00365                                  / (dlamc3_(&poles[i__ + (poles_dim1 << 1)], &
00366                                 dsigjp) + difrj) / (poles[i__ + (poles_dim1 <<
00367                                  1)] + dj);
00368                     }
00369 /* L40: */
00370                 }
00371                 rwork[1] = -1.;
00372                 temp = dnrm2_(k, &rwork[1], &c__1);
00373 
00374 /*              Since B and BX are complex, the following call to DGEMV */
00375 /*              is performed in two steps (real and imaginary parts). */
00376 
00377 /*              CALL DGEMV( 'T', K, NRHS, ONE, BX, LDBX, WORK, 1, ZERO, */
00378 /*    $                     B( J, 1 ), LDB ) */
00379 
00380                 i__ = *k + (*nrhs << 1);
00381                 i__2 = *nrhs;
00382                 for (jcol = 1; jcol <= i__2; ++jcol) {
00383                     i__3 = *k;
00384                     for (jrow = 1; jrow <= i__3; ++jrow) {
00385                         ++i__;
00386                         i__4 = jrow + jcol * bx_dim1;
00387                         rwork[i__] = bx[i__4].r;
00388 /* L50: */
00389                     }
00390 /* L60: */
00391                 }
00392                 dgemv_("T", k, nrhs, &c_b13, &rwork[*k + 1 + (*nrhs << 1)], k, 
00393                          &rwork[1], &c__1, &c_b15, &rwork[*k + 1], &c__1);
00394                 i__ = *k + (*nrhs << 1);
00395                 i__2 = *nrhs;
00396                 for (jcol = 1; jcol <= i__2; ++jcol) {
00397                     i__3 = *k;
00398                     for (jrow = 1; jrow <= i__3; ++jrow) {
00399                         ++i__;
00400                         rwork[i__] = d_imag(&bx[jrow + jcol * bx_dim1]);
00401 /* L70: */
00402                     }
00403 /* L80: */
00404                 }
00405                 dgemv_("T", k, nrhs, &c_b13, &rwork[*k + 1 + (*nrhs << 1)], k, 
00406                          &rwork[1], &c__1, &c_b15, &rwork[*k + 1 + *nrhs], &
00407                         c__1);
00408                 i__2 = *nrhs;
00409                 for (jcol = 1; jcol <= i__2; ++jcol) {
00410                     i__3 = j + jcol * b_dim1;
00411                     i__4 = jcol + *k;
00412                     i__5 = jcol + *k + *nrhs;
00413                     z__1.r = rwork[i__4], z__1.i = rwork[i__5];
00414                     b[i__3].r = z__1.r, b[i__3].i = z__1.i;
00415 /* L90: */
00416                 }
00417                 zlascl_("G", &c__0, &c__0, &temp, &c_b13, &c__1, nrhs, &b[j + 
00418                         b_dim1], ldb, info);
00419 /* L100: */
00420             }
00421         }
00422 
00423 /*        Move the deflated rows of BX to B also. */
00424 
00425         if (*k < max(m,n)) {
00426             i__1 = n - *k;
00427             zlacpy_("A", &i__1, nrhs, &bx[*k + 1 + bx_dim1], ldbx, &b[*k + 1 
00428                     + b_dim1], ldb);
00429         }
00430     } else {
00431 
00432 /*        Apply back the right orthogonal transformations. */
00433 
00434 /*        Step (1R): apply back the new right singular vector matrix */
00435 /*        to B. */
00436 
00437         if (*k == 1) {
00438             zcopy_(nrhs, &b[b_offset], ldb, &bx[bx_offset], ldbx);
00439         } else {
00440             i__1 = *k;
00441             for (j = 1; j <= i__1; ++j) {
00442                 dsigj = poles[j + (poles_dim1 << 1)];
00443                 if (z__[j] == 0.) {
00444                     rwork[j] = 0.;
00445                 } else {
00446                     rwork[j] = -z__[j] / difl[j] / (dsigj + poles[j + 
00447                             poles_dim1]) / difr[j + (difr_dim1 << 1)];
00448                 }
00449                 i__2 = j - 1;
00450                 for (i__ = 1; i__ <= i__2; ++i__) {
00451                     if (z__[j] == 0.) {
00452                         rwork[i__] = 0.;
00453                     } else {
00454                         d__1 = -poles[i__ + 1 + (poles_dim1 << 1)];
00455                         rwork[i__] = z__[j] / (dlamc3_(&dsigj, &d__1) - difr[
00456                                 i__ + difr_dim1]) / (dsigj + poles[i__ + 
00457                                 poles_dim1]) / difr[i__ + (difr_dim1 << 1)];
00458                     }
00459 /* L110: */
00460                 }
00461                 i__2 = *k;
00462                 for (i__ = j + 1; i__ <= i__2; ++i__) {
00463                     if (z__[j] == 0.) {
00464                         rwork[i__] = 0.;
00465                     } else {
00466                         d__1 = -poles[i__ + (poles_dim1 << 1)];
00467                         rwork[i__] = z__[j] / (dlamc3_(&dsigj, &d__1) - difl[
00468                                 i__]) / (dsigj + poles[i__ + poles_dim1]) / 
00469                                 difr[i__ + (difr_dim1 << 1)];
00470                     }
00471 /* L120: */
00472                 }
00473 
00474 /*              Since B and BX are complex, the following call to DGEMV */
00475 /*              is performed in two steps (real and imaginary parts). */
00476 
00477 /*              CALL DGEMV( 'T', K, NRHS, ONE, B, LDB, WORK, 1, ZERO, */
00478 /*    $                     BX( J, 1 ), LDBX ) */
00479 
00480                 i__ = *k + (*nrhs << 1);
00481                 i__2 = *nrhs;
00482                 for (jcol = 1; jcol <= i__2; ++jcol) {
00483                     i__3 = *k;
00484                     for (jrow = 1; jrow <= i__3; ++jrow) {
00485                         ++i__;
00486                         i__4 = jrow + jcol * b_dim1;
00487                         rwork[i__] = b[i__4].r;
00488 /* L130: */
00489                     }
00490 /* L140: */
00491                 }
00492                 dgemv_("T", k, nrhs, &c_b13, &rwork[*k + 1 + (*nrhs << 1)], k, 
00493                          &rwork[1], &c__1, &c_b15, &rwork[*k + 1], &c__1);
00494                 i__ = *k + (*nrhs << 1);
00495                 i__2 = *nrhs;
00496                 for (jcol = 1; jcol <= i__2; ++jcol) {
00497                     i__3 = *k;
00498                     for (jrow = 1; jrow <= i__3; ++jrow) {
00499                         ++i__;
00500                         rwork[i__] = d_imag(&b[jrow + jcol * b_dim1]);
00501 /* L150: */
00502                     }
00503 /* L160: */
00504                 }
00505                 dgemv_("T", k, nrhs, &c_b13, &rwork[*k + 1 + (*nrhs << 1)], k, 
00506                          &rwork[1], &c__1, &c_b15, &rwork[*k + 1 + *nrhs], &
00507                         c__1);
00508                 i__2 = *nrhs;
00509                 for (jcol = 1; jcol <= i__2; ++jcol) {
00510                     i__3 = j + jcol * bx_dim1;
00511                     i__4 = jcol + *k;
00512                     i__5 = jcol + *k + *nrhs;
00513                     z__1.r = rwork[i__4], z__1.i = rwork[i__5];
00514                     bx[i__3].r = z__1.r, bx[i__3].i = z__1.i;
00515 /* L170: */
00516                 }
00517 /* L180: */
00518             }
00519         }
00520 
00521 /*        Step (2R): if SQRE = 1, apply back the rotation that is */
00522 /*        related to the right null space of the subproblem. */
00523 
00524         if (*sqre == 1) {
00525             zcopy_(nrhs, &b[m + b_dim1], ldb, &bx[m + bx_dim1], ldbx);
00526             zdrot_(nrhs, &bx[bx_dim1 + 1], ldbx, &bx[m + bx_dim1], ldbx, c__, 
00527                     s);
00528         }
00529         if (*k < max(m,n)) {
00530             i__1 = n - *k;
00531             zlacpy_("A", &i__1, nrhs, &b[*k + 1 + b_dim1], ldb, &bx[*k + 1 + 
00532                     bx_dim1], ldbx);
00533         }
00534 
00535 /*        Step (3R): permute rows of B. */
00536 
00537         zcopy_(nrhs, &bx[bx_dim1 + 1], ldbx, &b[nlp1 + b_dim1], ldb);
00538         if (*sqre == 1) {
00539             zcopy_(nrhs, &bx[m + bx_dim1], ldbx, &b[m + b_dim1], ldb);
00540         }
00541         i__1 = n;
00542         for (i__ = 2; i__ <= i__1; ++i__) {
00543             zcopy_(nrhs, &bx[i__ + bx_dim1], ldbx, &b[perm[i__] + b_dim1], 
00544                     ldb);
00545 /* L190: */
00546         }
00547 
00548 /*        Step (4R): apply back the Givens rotations performed. */
00549 
00550         for (i__ = *givptr; i__ >= 1; --i__) {
00551             d__1 = -givnum[i__ + givnum_dim1];
00552             zdrot_(nrhs, &b[givcol[i__ + (givcol_dim1 << 1)] + b_dim1], ldb, &
00553                     b[givcol[i__ + givcol_dim1] + b_dim1], ldb, &givnum[i__ + 
00554                     (givnum_dim1 << 1)], &d__1);
00555 /* L200: */
00556         }
00557     }
00558 
00559     return 0;
00560 
00561 /*     End of ZLALS0 */
00562 
00563 } /* zlals0_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:41