zgbtrf.c
Go to the documentation of this file.
00001 /* zgbtrf.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 doublecomplex c_b1 = {1.,0.};
00019 static integer c__1 = 1;
00020 static integer c__65 = 65;
00021 
00022 /* Subroutine */ int zgbtrf_(integer *m, integer *n, integer *kl, integer *ku, 
00023          doublecomplex *ab, integer *ldab, integer *ipiv, integer *info)
00024 {
00025     /* System generated locals */
00026     integer ab_dim1, ab_offset, i__1, i__2, i__3, i__4, i__5, i__6;
00027     doublecomplex z__1;
00028 
00029     /* Builtin functions */
00030     void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
00031 
00032     /* Local variables */
00033     integer i__, j, i2, i3, j2, j3, k2, jb, nb, ii, jj, jm, ip, jp, km, ju, 
00034             kv, nw;
00035     doublecomplex temp;
00036     extern /* Subroutine */ int zscal_(integer *, doublecomplex *, 
00037             doublecomplex *, integer *), zgemm_(char *, char *, integer *, 
00038             integer *, integer *, doublecomplex *, doublecomplex *, integer *, 
00039              doublecomplex *, integer *, doublecomplex *, doublecomplex *, 
00040             integer *);
00041     doublecomplex work13[4160]  /* was [65][64] */, work31[4160]        /* 
00042             was [65][64] */;
00043     extern /* Subroutine */ int zgeru_(integer *, integer *, doublecomplex *, 
00044             doublecomplex *, integer *, doublecomplex *, integer *, 
00045             doublecomplex *, integer *), zcopy_(integer *, doublecomplex *, 
00046             integer *, doublecomplex *, integer *), zswap_(integer *, 
00047             doublecomplex *, integer *, doublecomplex *, integer *), ztrsm_(
00048             char *, char *, char *, char *, integer *, integer *, 
00049             doublecomplex *, doublecomplex *, integer *, doublecomplex *, 
00050             integer *), zgbtf2_(integer *, 
00051             integer *, integer *, integer *, doublecomplex *, integer *, 
00052             integer *, integer *), xerbla_(char *, integer *);
00053     extern integer ilaenv_(integer *, char *, char *, integer *, integer *, 
00054             integer *, integer *), izamax_(integer *, 
00055             doublecomplex *, integer *);
00056     extern /* Subroutine */ int zlaswp_(integer *, doublecomplex *, integer *, 
00057              integer *, integer *, integer *, integer *);
00058 
00059 
00060 /*  -- LAPACK routine (version 3.2) -- */
00061 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00062 /*     November 2006 */
00063 
00064 /*     .. Scalar Arguments .. */
00065 /*     .. */
00066 /*     .. Array Arguments .. */
00067 /*     .. */
00068 
00069 /*  Purpose */
00070 /*  ======= */
00071 
00072 /*  ZGBTRF computes an LU factorization of a complex m-by-n band matrix A */
00073 /*  using partial pivoting with row interchanges. */
00074 
00075 /*  This is the blocked version of the algorithm, calling Level 3 BLAS. */
00076 
00077 /*  Arguments */
00078 /*  ========= */
00079 
00080 /*  M       (input) INTEGER */
00081 /*          The number of rows of the matrix A.  M >= 0. */
00082 
00083 /*  N       (input) INTEGER */
00084 /*          The number of columns of the matrix A.  N >= 0. */
00085 
00086 /*  KL      (input) INTEGER */
00087 /*          The number of subdiagonals within the band of A.  KL >= 0. */
00088 
00089 /*  KU      (input) INTEGER */
00090 /*          The number of superdiagonals within the band of A.  KU >= 0. */
00091 
00092 /*  AB      (input/output) COMPLEX*16 array, dimension (LDAB,N) */
00093 /*          On entry, the matrix A in band storage, in rows KL+1 to */
00094 /*          2*KL+KU+1; rows 1 to KL of the array need not be set. */
00095 /*          The j-th column of A is stored in the j-th column of the */
00096 /*          array AB as follows: */
00097 /*          AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl) */
00098 
00099 /*          On exit, details of the factorization: U is stored as an */
00100 /*          upper triangular band matrix with KL+KU superdiagonals in */
00101 /*          rows 1 to KL+KU+1, and the multipliers used during the */
00102 /*          factorization are stored in rows KL+KU+2 to 2*KL+KU+1. */
00103 /*          See below for further details. */
00104 
00105 /*  LDAB    (input) INTEGER */
00106 /*          The leading dimension of the array AB.  LDAB >= 2*KL+KU+1. */
00107 
00108 /*  IPIV    (output) INTEGER array, dimension (min(M,N)) */
00109 /*          The pivot indices; for 1 <= i <= min(M,N), row i of the */
00110 /*          matrix was interchanged with row IPIV(i). */
00111 
00112 /*  INFO    (output) INTEGER */
00113 /*          = 0: successful exit */
00114 /*          < 0: if INFO = -i, the i-th argument had an illegal value */
00115 /*          > 0: if INFO = +i, U(i,i) is exactly zero. The factorization */
00116 /*               has been completed, but the factor U is exactly */
00117 /*               singular, and division by zero will occur if it is used */
00118 /*               to solve a system of equations. */
00119 
00120 /*  Further Details */
00121 /*  =============== */
00122 
00123 /*  The band storage scheme is illustrated by the following example, when */
00124 /*  M = N = 6, KL = 2, KU = 1: */
00125 
00126 /*  On entry:                       On exit: */
00127 
00128 /*      *    *    *    +    +    +       *    *    *   u14  u25  u36 */
00129 /*      *    *    +    +    +    +       *    *   u13  u24  u35  u46 */
00130 /*      *   a12  a23  a34  a45  a56      *   u12  u23  u34  u45  u56 */
00131 /*     a11  a22  a33  a44  a55  a66     u11  u22  u33  u44  u55  u66 */
00132 /*     a21  a32  a43  a54  a65   *      m21  m32  m43  m54  m65   * */
00133 /*     a31  a42  a53  a64   *    *      m31  m42  m53  m64   *    * */
00134 
00135 /*  Array elements marked * are not used by the routine; elements marked */
00136 /*  + need not be set on entry, but are required by the routine to store */
00137 /*  elements of U because of fill-in resulting from the row interchanges. */
00138 
00139 /*  ===================================================================== */
00140 
00141 /*     .. Parameters .. */
00142 /*     .. */
00143 /*     .. Local Scalars .. */
00144 /*     .. */
00145 /*     .. Local Arrays .. */
00146 /*     .. */
00147 /*     .. External Functions .. */
00148 /*     .. */
00149 /*     .. External Subroutines .. */
00150 /*     .. */
00151 /*     .. Intrinsic Functions .. */
00152 /*     .. */
00153 /*     .. Executable Statements .. */
00154 
00155 /*     KV is the number of superdiagonals in the factor U, allowing for */
00156 /*     fill-in */
00157 
00158     /* Parameter adjustments */
00159     ab_dim1 = *ldab;
00160     ab_offset = 1 + ab_dim1;
00161     ab -= ab_offset;
00162     --ipiv;
00163 
00164     /* Function Body */
00165     kv = *ku + *kl;
00166 
00167 /*     Test the input parameters. */
00168 
00169     *info = 0;
00170     if (*m < 0) {
00171         *info = -1;
00172     } else if (*n < 0) {
00173         *info = -2;
00174     } else if (*kl < 0) {
00175         *info = -3;
00176     } else if (*ku < 0) {
00177         *info = -4;
00178     } else if (*ldab < *kl + kv + 1) {
00179         *info = -6;
00180     }
00181     if (*info != 0) {
00182         i__1 = -(*info);
00183         xerbla_("ZGBTRF", &i__1);
00184         return 0;
00185     }
00186 
00187 /*     Quick return if possible */
00188 
00189     if (*m == 0 || *n == 0) {
00190         return 0;
00191     }
00192 
00193 /*     Determine the block size for this environment */
00194 
00195     nb = ilaenv_(&c__1, "ZGBTRF", " ", m, n, kl, ku);
00196 
00197 /*     The block size must not exceed the limit set by the size of the */
00198 /*     local arrays WORK13 and WORK31. */
00199 
00200     nb = min(nb,64);
00201 
00202     if (nb <= 1 || nb > *kl) {
00203 
00204 /*        Use unblocked code */
00205 
00206         zgbtf2_(m, n, kl, ku, &ab[ab_offset], ldab, &ipiv[1], info);
00207     } else {
00208 
00209 /*        Use blocked code */
00210 
00211 /*        Zero the superdiagonal elements of the work array WORK13 */
00212 
00213         i__1 = nb;
00214         for (j = 1; j <= i__1; ++j) {
00215             i__2 = j - 1;
00216             for (i__ = 1; i__ <= i__2; ++i__) {
00217                 i__3 = i__ + j * 65 - 66;
00218                 work13[i__3].r = 0., work13[i__3].i = 0.;
00219 /* L10: */
00220             }
00221 /* L20: */
00222         }
00223 
00224 /*        Zero the subdiagonal elements of the work array WORK31 */
00225 
00226         i__1 = nb;
00227         for (j = 1; j <= i__1; ++j) {
00228             i__2 = nb;
00229             for (i__ = j + 1; i__ <= i__2; ++i__) {
00230                 i__3 = i__ + j * 65 - 66;
00231                 work31[i__3].r = 0., work31[i__3].i = 0.;
00232 /* L30: */
00233             }
00234 /* L40: */
00235         }
00236 
00237 /*        Gaussian elimination with partial pivoting */
00238 
00239 /*        Set fill-in elements in columns KU+2 to KV to zero */
00240 
00241         i__1 = min(kv,*n);
00242         for (j = *ku + 2; j <= i__1; ++j) {
00243             i__2 = *kl;
00244             for (i__ = kv - j + 2; i__ <= i__2; ++i__) {
00245                 i__3 = i__ + j * ab_dim1;
00246                 ab[i__3].r = 0., ab[i__3].i = 0.;
00247 /* L50: */
00248             }
00249 /* L60: */
00250         }
00251 
00252 /*        JU is the index of the last column affected by the current */
00253 /*        stage of the factorization */
00254 
00255         ju = 1;
00256 
00257         i__1 = min(*m,*n);
00258         i__2 = nb;
00259         for (j = 1; i__2 < 0 ? j >= i__1 : j <= i__1; j += i__2) {
00260 /* Computing MIN */
00261             i__3 = nb, i__4 = min(*m,*n) - j + 1;
00262             jb = min(i__3,i__4);
00263 
00264 /*           The active part of the matrix is partitioned */
00265 
00266 /*              A11   A12   A13 */
00267 /*              A21   A22   A23 */
00268 /*              A31   A32   A33 */
00269 
00270 /*           Here A11, A21 and A31 denote the current block of JB columns */
00271 /*           which is about to be factorized. The number of rows in the */
00272 /*           partitioning are JB, I2, I3 respectively, and the numbers */
00273 /*           of columns are JB, J2, J3. The superdiagonal elements of A13 */
00274 /*           and the subdiagonal elements of A31 lie outside the band. */
00275 
00276 /* Computing MIN */
00277             i__3 = *kl - jb, i__4 = *m - j - jb + 1;
00278             i2 = min(i__3,i__4);
00279 /* Computing MIN */
00280             i__3 = jb, i__4 = *m - j - *kl + 1;
00281             i3 = min(i__3,i__4);
00282 
00283 /*           J2 and J3 are computed after JU has been updated. */
00284 
00285 /*           Factorize the current block of JB columns */
00286 
00287             i__3 = j + jb - 1;
00288             for (jj = j; jj <= i__3; ++jj) {
00289 
00290 /*              Set fill-in elements in column JJ+KV to zero */
00291 
00292                 if (jj + kv <= *n) {
00293                     i__4 = *kl;
00294                     for (i__ = 1; i__ <= i__4; ++i__) {
00295                         i__5 = i__ + (jj + kv) * ab_dim1;
00296                         ab[i__5].r = 0., ab[i__5].i = 0.;
00297 /* L70: */
00298                     }
00299                 }
00300 
00301 /*              Find pivot and test for singularity. KM is the number of */
00302 /*              subdiagonal elements in the current column. */
00303 
00304 /* Computing MIN */
00305                 i__4 = *kl, i__5 = *m - jj;
00306                 km = min(i__4,i__5);
00307                 i__4 = km + 1;
00308                 jp = izamax_(&i__4, &ab[kv + 1 + jj * ab_dim1], &c__1);
00309                 ipiv[jj] = jp + jj - j;
00310                 i__4 = kv + jp + jj * ab_dim1;
00311                 if (ab[i__4].r != 0. || ab[i__4].i != 0.) {
00312 /* Computing MAX */
00313 /* Computing MIN */
00314                     i__6 = jj + *ku + jp - 1;
00315                     i__4 = ju, i__5 = min(i__6,*n);
00316                     ju = max(i__4,i__5);
00317                     if (jp != 1) {
00318 
00319 /*                    Apply interchange to columns J to J+JB-1 */
00320 
00321                         if (jp + jj - 1 < j + *kl) {
00322 
00323                             i__4 = *ldab - 1;
00324                             i__5 = *ldab - 1;
00325                             zswap_(&jb, &ab[kv + 1 + jj - j + j * ab_dim1], &
00326                                     i__4, &ab[kv + jp + jj - j + j * ab_dim1], 
00327                                      &i__5);
00328                         } else {
00329 
00330 /*                       The interchange affects columns J to JJ-1 of A31 */
00331 /*                       which are stored in the work array WORK31 */
00332 
00333                             i__4 = jj - j;
00334                             i__5 = *ldab - 1;
00335                             zswap_(&i__4, &ab[kv + 1 + jj - j + j * ab_dim1], 
00336                                     &i__5, &work31[jp + jj - j - *kl - 1], &
00337                                     c__65);
00338                             i__4 = j + jb - jj;
00339                             i__5 = *ldab - 1;
00340                             i__6 = *ldab - 1;
00341                             zswap_(&i__4, &ab[kv + 1 + jj * ab_dim1], &i__5, &
00342                                     ab[kv + jp + jj * ab_dim1], &i__6);
00343                         }
00344                     }
00345 
00346 /*                 Compute multipliers */
00347 
00348                     z_div(&z__1, &c_b1, &ab[kv + 1 + jj * ab_dim1]);
00349                     zscal_(&km, &z__1, &ab[kv + 2 + jj * ab_dim1], &c__1);
00350 
00351 /*                 Update trailing submatrix within the band and within */
00352 /*                 the current block. JM is the index of the last column */
00353 /*                 which needs to be updated. */
00354 
00355 /* Computing MIN */
00356                     i__4 = ju, i__5 = j + jb - 1;
00357                     jm = min(i__4,i__5);
00358                     if (jm > jj) {
00359                         i__4 = jm - jj;
00360                         z__1.r = -1., z__1.i = -0.;
00361                         i__5 = *ldab - 1;
00362                         i__6 = *ldab - 1;
00363                         zgeru_(&km, &i__4, &z__1, &ab[kv + 2 + jj * ab_dim1], 
00364                                 &c__1, &ab[kv + (jj + 1) * ab_dim1], &i__5, &
00365                                 ab[kv + 1 + (jj + 1) * ab_dim1], &i__6);
00366                     }
00367                 } else {
00368 
00369 /*                 If pivot is zero, set INFO to the index of the pivot */
00370 /*                 unless a zero pivot has already been found. */
00371 
00372                     if (*info == 0) {
00373                         *info = jj;
00374                     }
00375                 }
00376 
00377 /*              Copy current column of A31 into the work array WORK31 */
00378 
00379 /* Computing MIN */
00380                 i__4 = jj - j + 1;
00381                 nw = min(i__4,i3);
00382                 if (nw > 0) {
00383                     zcopy_(&nw, &ab[kv + *kl + 1 - jj + j + jj * ab_dim1], &
00384                             c__1, &work31[(jj - j + 1) * 65 - 65], &c__1);
00385                 }
00386 /* L80: */
00387             }
00388             if (j + jb <= *n) {
00389 
00390 /*              Apply the row interchanges to the other blocks. */
00391 
00392 /* Computing MIN */
00393                 i__3 = ju - j + 1;
00394                 j2 = min(i__3,kv) - jb;
00395 /* Computing MAX */
00396                 i__3 = 0, i__4 = ju - j - kv + 1;
00397                 j3 = max(i__3,i__4);
00398 
00399 /*              Use ZLASWP to apply the row interchanges to A12, A22, and */
00400 /*              A32. */
00401 
00402                 i__3 = *ldab - 1;
00403                 zlaswp_(&j2, &ab[kv + 1 - jb + (j + jb) * ab_dim1], &i__3, &
00404                         c__1, &jb, &ipiv[j], &c__1);
00405 
00406 /*              Adjust the pivot indices. */
00407 
00408                 i__3 = j + jb - 1;
00409                 for (i__ = j; i__ <= i__3; ++i__) {
00410                     ipiv[i__] = ipiv[i__] + j - 1;
00411 /* L90: */
00412                 }
00413 
00414 /*              Apply the row interchanges to A13, A23, and A33 */
00415 /*              columnwise. */
00416 
00417                 k2 = j - 1 + jb + j2;
00418                 i__3 = j3;
00419                 for (i__ = 1; i__ <= i__3; ++i__) {
00420                     jj = k2 + i__;
00421                     i__4 = j + jb - 1;
00422                     for (ii = j + i__ - 1; ii <= i__4; ++ii) {
00423                         ip = ipiv[ii];
00424                         if (ip != ii) {
00425                             i__5 = kv + 1 + ii - jj + jj * ab_dim1;
00426                             temp.r = ab[i__5].r, temp.i = ab[i__5].i;
00427                             i__5 = kv + 1 + ii - jj + jj * ab_dim1;
00428                             i__6 = kv + 1 + ip - jj + jj * ab_dim1;
00429                             ab[i__5].r = ab[i__6].r, ab[i__5].i = ab[i__6].i;
00430                             i__5 = kv + 1 + ip - jj + jj * ab_dim1;
00431                             ab[i__5].r = temp.r, ab[i__5].i = temp.i;
00432                         }
00433 /* L100: */
00434                     }
00435 /* L110: */
00436                 }
00437 
00438 /*              Update the relevant part of the trailing submatrix */
00439 
00440                 if (j2 > 0) {
00441 
00442 /*                 Update A12 */
00443 
00444                     i__3 = *ldab - 1;
00445                     i__4 = *ldab - 1;
00446                     ztrsm_("Left", "Lower", "No transpose", "Unit", &jb, &j2, 
00447                             &c_b1, &ab[kv + 1 + j * ab_dim1], &i__3, &ab[kv + 
00448                             1 - jb + (j + jb) * ab_dim1], &i__4);
00449 
00450                     if (i2 > 0) {
00451 
00452 /*                    Update A22 */
00453 
00454                         z__1.r = -1., z__1.i = -0.;
00455                         i__3 = *ldab - 1;
00456                         i__4 = *ldab - 1;
00457                         i__5 = *ldab - 1;
00458                         zgemm_("No transpose", "No transpose", &i2, &j2, &jb, 
00459                                 &z__1, &ab[kv + 1 + jb + j * ab_dim1], &i__3, 
00460                                 &ab[kv + 1 - jb + (j + jb) * ab_dim1], &i__4, 
00461                                 &c_b1, &ab[kv + 1 + (j + jb) * ab_dim1], &
00462                                 i__5);
00463                     }
00464 
00465                     if (i3 > 0) {
00466 
00467 /*                    Update A32 */
00468 
00469                         z__1.r = -1., z__1.i = -0.;
00470                         i__3 = *ldab - 1;
00471                         i__4 = *ldab - 1;
00472                         zgemm_("No transpose", "No transpose", &i3, &j2, &jb, 
00473                                 &z__1, work31, &c__65, &ab[kv + 1 - jb + (j + 
00474                                 jb) * ab_dim1], &i__3, &c_b1, &ab[kv + *kl + 
00475                                 1 - jb + (j + jb) * ab_dim1], &i__4);
00476                     }
00477                 }
00478 
00479                 if (j3 > 0) {
00480 
00481 /*                 Copy the lower triangle of A13 into the work array */
00482 /*                 WORK13 */
00483 
00484                     i__3 = j3;
00485                     for (jj = 1; jj <= i__3; ++jj) {
00486                         i__4 = jb;
00487                         for (ii = jj; ii <= i__4; ++ii) {
00488                             i__5 = ii + jj * 65 - 66;
00489                             i__6 = ii - jj + 1 + (jj + j + kv - 1) * ab_dim1;
00490                             work13[i__5].r = ab[i__6].r, work13[i__5].i = ab[
00491                                     i__6].i;
00492 /* L120: */
00493                         }
00494 /* L130: */
00495                     }
00496 
00497 /*                 Update A13 in the work array */
00498 
00499                     i__3 = *ldab - 1;
00500                     ztrsm_("Left", "Lower", "No transpose", "Unit", &jb, &j3, 
00501                             &c_b1, &ab[kv + 1 + j * ab_dim1], &i__3, work13, &
00502                             c__65);
00503 
00504                     if (i2 > 0) {
00505 
00506 /*                    Update A23 */
00507 
00508                         z__1.r = -1., z__1.i = -0.;
00509                         i__3 = *ldab - 1;
00510                         i__4 = *ldab - 1;
00511                         zgemm_("No transpose", "No transpose", &i2, &j3, &jb, 
00512                                 &z__1, &ab[kv + 1 + jb + j * ab_dim1], &i__3, 
00513                                 work13, &c__65, &c_b1, &ab[jb + 1 + (j + kv) *
00514                                  ab_dim1], &i__4);
00515                     }
00516 
00517                     if (i3 > 0) {
00518 
00519 /*                    Update A33 */
00520 
00521                         z__1.r = -1., z__1.i = -0.;
00522                         i__3 = *ldab - 1;
00523                         zgemm_("No transpose", "No transpose", &i3, &j3, &jb, 
00524                                 &z__1, work31, &c__65, work13, &c__65, &c_b1, 
00525                                 &ab[*kl + 1 + (j + kv) * ab_dim1], &i__3);
00526                     }
00527 
00528 /*                 Copy the lower triangle of A13 back into place */
00529 
00530                     i__3 = j3;
00531                     for (jj = 1; jj <= i__3; ++jj) {
00532                         i__4 = jb;
00533                         for (ii = jj; ii <= i__4; ++ii) {
00534                             i__5 = ii - jj + 1 + (jj + j + kv - 1) * ab_dim1;
00535                             i__6 = ii + jj * 65 - 66;
00536                             ab[i__5].r = work13[i__6].r, ab[i__5].i = work13[
00537                                     i__6].i;
00538 /* L140: */
00539                         }
00540 /* L150: */
00541                     }
00542                 }
00543             } else {
00544 
00545 /*              Adjust the pivot indices. */
00546 
00547                 i__3 = j + jb - 1;
00548                 for (i__ = j; i__ <= i__3; ++i__) {
00549                     ipiv[i__] = ipiv[i__] + j - 1;
00550 /* L160: */
00551                 }
00552             }
00553 
00554 /*           Partially undo the interchanges in the current block to */
00555 /*           restore the upper triangular form of A31 and copy the upper */
00556 /*           triangle of A31 back into place */
00557 
00558             i__3 = j;
00559             for (jj = j + jb - 1; jj >= i__3; --jj) {
00560                 jp = ipiv[jj] - jj + 1;
00561                 if (jp != 1) {
00562 
00563 /*                 Apply interchange to columns J to JJ-1 */
00564 
00565                     if (jp + jj - 1 < j + *kl) {
00566 
00567 /*                    The interchange does not affect A31 */
00568 
00569                         i__4 = jj - j;
00570                         i__5 = *ldab - 1;
00571                         i__6 = *ldab - 1;
00572                         zswap_(&i__4, &ab[kv + 1 + jj - j + j * ab_dim1], &
00573                                 i__5, &ab[kv + jp + jj - j + j * ab_dim1], &
00574                                 i__6);
00575                     } else {
00576 
00577 /*                    The interchange does affect A31 */
00578 
00579                         i__4 = jj - j;
00580                         i__5 = *ldab - 1;
00581                         zswap_(&i__4, &ab[kv + 1 + jj - j + j * ab_dim1], &
00582                                 i__5, &work31[jp + jj - j - *kl - 1], &c__65);
00583                     }
00584                 }
00585 
00586 /*              Copy the current column of A31 back into place */
00587 
00588 /* Computing MIN */
00589                 i__4 = i3, i__5 = jj - j + 1;
00590                 nw = min(i__4,i__5);
00591                 if (nw > 0) {
00592                     zcopy_(&nw, &work31[(jj - j + 1) * 65 - 65], &c__1, &ab[
00593                             kv + *kl + 1 - jj + j + jj * ab_dim1], &c__1);
00594                 }
00595 /* L170: */
00596             }
00597 /* L180: */
00598         }
00599     }
00600 
00601     return 0;
00602 
00603 /*     End of ZGBTRF */
00604 
00605 } /* zgbtrf_ */


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