dsptrf.c
Go to the documentation of this file.
00001 /* dsptrf.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 integer c__1 = 1;
00019 
00020 /* Subroutine */ int dsptrf_(char *uplo, integer *n, doublereal *ap, integer *
00021         ipiv, integer *info)
00022 {
00023     /* System generated locals */
00024     integer i__1, i__2;
00025     doublereal d__1, d__2, d__3;
00026 
00027     /* Builtin functions */
00028     double sqrt(doublereal);
00029 
00030     /* Local variables */
00031     integer i__, j, k;
00032     doublereal t, r1, d11, d12, d21, d22;
00033     integer kc, kk, kp;
00034     doublereal wk;
00035     integer kx, knc, kpc, npp;
00036     doublereal wkm1, wkp1;
00037     integer imax, jmax;
00038     extern /* Subroutine */ int dspr_(char *, integer *, doublereal *, 
00039             doublereal *, integer *, doublereal *);
00040     doublereal alpha;
00041     extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *, 
00042             integer *);
00043     extern logical lsame_(char *, char *);
00044     extern /* Subroutine */ int dswap_(integer *, doublereal *, integer *, 
00045             doublereal *, integer *);
00046     integer kstep;
00047     logical upper;
00048     doublereal absakk;
00049     extern integer idamax_(integer *, doublereal *, integer *);
00050     extern /* Subroutine */ int xerbla_(char *, integer *);
00051     doublereal colmax, rowmax;
00052 
00053 
00054 /*  -- LAPACK routine (version 3.2) -- */
00055 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00056 /*     November 2006 */
00057 
00058 /*     .. Scalar Arguments .. */
00059 /*     .. */
00060 /*     .. Array Arguments .. */
00061 /*     .. */
00062 
00063 /*  Purpose */
00064 /*  ======= */
00065 
00066 /*  DSPTRF computes the factorization of a real symmetric matrix A stored */
00067 /*  in packed format using the Bunch-Kaufman diagonal pivoting method: */
00068 
00069 /*     A = U*D*U**T  or  A = L*D*L**T */
00070 
00071 /*  where U (or L) is a product of permutation and unit upper (lower) */
00072 /*  triangular matrices, and D is symmetric and block diagonal with */
00073 /*  1-by-1 and 2-by-2 diagonal blocks. */
00074 
00075 /*  Arguments */
00076 /*  ========= */
00077 
00078 /*  UPLO    (input) CHARACTER*1 */
00079 /*          = 'U':  Upper triangle of A is stored; */
00080 /*          = 'L':  Lower triangle of A is stored. */
00081 
00082 /*  N       (input) INTEGER */
00083 /*          The order of the matrix A.  N >= 0. */
00084 
00085 /*  AP      (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) */
00086 /*          On entry, the upper or lower triangle of the symmetric matrix */
00087 /*          A, packed columnwise in a linear array.  The j-th column of A */
00088 /*          is stored in the array AP as follows: */
00089 /*          if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; */
00090 /*          if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. */
00091 
00092 /*          On exit, the block diagonal matrix D and the multipliers used */
00093 /*          to obtain the factor U or L, stored as a packed triangular */
00094 /*          matrix overwriting A (see below for further details). */
00095 
00096 /*  IPIV    (output) INTEGER array, dimension (N) */
00097 /*          Details of the interchanges and the block structure of D. */
00098 /*          If IPIV(k) > 0, then rows and columns k and IPIV(k) were */
00099 /*          interchanged and D(k,k) is a 1-by-1 diagonal block. */
00100 /*          If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and */
00101 /*          columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) */
00102 /*          is a 2-by-2 diagonal block.  If UPLO = 'L' and IPIV(k) = */
00103 /*          IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were */
00104 /*          interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. */
00105 
00106 /*  INFO    (output) INTEGER */
00107 /*          = 0: successful exit */
00108 /*          < 0: if INFO = -i, the i-th argument had an illegal value */
00109 /*          > 0: if INFO = i, D(i,i) is exactly zero.  The factorization */
00110 /*               has been completed, but the block diagonal matrix D is */
00111 /*               exactly singular, and division by zero will occur if it */
00112 /*               is used to solve a system of equations. */
00113 
00114 /*  Further Details */
00115 /*  =============== */
00116 
00117 /*  5-96 - Based on modifications by J. Lewis, Boeing Computer Services */
00118 /*         Company */
00119 
00120 /*  If UPLO = 'U', then A = U*D*U', where */
00121 /*     U = P(n)*U(n)* ... *P(k)U(k)* ..., */
00122 /*  i.e., U is a product of terms P(k)*U(k), where k decreases from n to */
00123 /*  1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 */
00124 /*  and 2-by-2 diagonal blocks D(k).  P(k) is a permutation matrix as */
00125 /*  defined by IPIV(k), and U(k) is a unit upper triangular matrix, such */
00126 /*  that if the diagonal block D(k) is of order s (s = 1 or 2), then */
00127 
00128 /*             (   I    v    0   )   k-s */
00129 /*     U(k) =  (   0    I    0   )   s */
00130 /*             (   0    0    I   )   n-k */
00131 /*                k-s   s   n-k */
00132 
00133 /*  If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k). */
00134 /*  If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), */
00135 /*  and A(k,k), and v overwrites A(1:k-2,k-1:k). */
00136 
00137 /*  If UPLO = 'L', then A = L*D*L', where */
00138 /*     L = P(1)*L(1)* ... *P(k)*L(k)* ..., */
00139 /*  i.e., L is a product of terms P(k)*L(k), where k increases from 1 to */
00140 /*  n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 */
00141 /*  and 2-by-2 diagonal blocks D(k).  P(k) is a permutation matrix as */
00142 /*  defined by IPIV(k), and L(k) is a unit lower triangular matrix, such */
00143 /*  that if the diagonal block D(k) is of order s (s = 1 or 2), then */
00144 
00145 /*             (   I    0     0   )  k-1 */
00146 /*     L(k) =  (   0    I     0   )  s */
00147 /*             (   0    v     I   )  n-k-s+1 */
00148 /*                k-1   s  n-k-s+1 */
00149 
00150 /*  If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k). */
00151 /*  If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), */
00152 /*  and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1). */
00153 
00154 /*  ===================================================================== */
00155 
00156 /*     .. Parameters .. */
00157 /*     .. */
00158 /*     .. Local Scalars .. */
00159 /*     .. */
00160 /*     .. External Functions .. */
00161 /*     .. */
00162 /*     .. External Subroutines .. */
00163 /*     .. */
00164 /*     .. Intrinsic Functions .. */
00165 /*     .. */
00166 /*     .. Executable Statements .. */
00167 
00168 /*     Test the input parameters. */
00169 
00170     /* Parameter adjustments */
00171     --ipiv;
00172     --ap;
00173 
00174     /* Function Body */
00175     *info = 0;
00176     upper = lsame_(uplo, "U");
00177     if (! upper && ! lsame_(uplo, "L")) {
00178         *info = -1;
00179     } else if (*n < 0) {
00180         *info = -2;
00181     }
00182     if (*info != 0) {
00183         i__1 = -(*info);
00184         xerbla_("DSPTRF", &i__1);
00185         return 0;
00186     }
00187 
00188 /*     Initialize ALPHA for use in choosing pivot block size. */
00189 
00190     alpha = (sqrt(17.) + 1.) / 8.;
00191 
00192     if (upper) {
00193 
00194 /*        Factorize A as U*D*U' using the upper triangle of A */
00195 
00196 /*        K is the main loop index, decreasing from N to 1 in steps of */
00197 /*        1 or 2 */
00198 
00199         k = *n;
00200         kc = (*n - 1) * *n / 2 + 1;
00201 L10:
00202         knc = kc;
00203 
00204 /*        If K < 1, exit from loop */
00205 
00206         if (k < 1) {
00207             goto L110;
00208         }
00209         kstep = 1;
00210 
00211 /*        Determine rows and columns to be interchanged and whether */
00212 /*        a 1-by-1 or 2-by-2 pivot block will be used */
00213 
00214         absakk = (d__1 = ap[kc + k - 1], abs(d__1));
00215 
00216 /*        IMAX is the row-index of the largest off-diagonal element in */
00217 /*        column K, and COLMAX is its absolute value */
00218 
00219         if (k > 1) {
00220             i__1 = k - 1;
00221             imax = idamax_(&i__1, &ap[kc], &c__1);
00222             colmax = (d__1 = ap[kc + imax - 1], abs(d__1));
00223         } else {
00224             colmax = 0.;
00225         }
00226 
00227         if (max(absakk,colmax) == 0.) {
00228 
00229 /*           Column K is zero: set INFO and continue */
00230 
00231             if (*info == 0) {
00232                 *info = k;
00233             }
00234             kp = k;
00235         } else {
00236             if (absakk >= alpha * colmax) {
00237 
00238 /*              no interchange, use 1-by-1 pivot block */
00239 
00240                 kp = k;
00241             } else {
00242 
00243 /*              JMAX is the column-index of the largest off-diagonal */
00244 /*              element in row IMAX, and ROWMAX is its absolute value */
00245 
00246                 rowmax = 0.;
00247                 jmax = imax;
00248                 kx = imax * (imax + 1) / 2 + imax;
00249                 i__1 = k;
00250                 for (j = imax + 1; j <= i__1; ++j) {
00251                     if ((d__1 = ap[kx], abs(d__1)) > rowmax) {
00252                         rowmax = (d__1 = ap[kx], abs(d__1));
00253                         jmax = j;
00254                     }
00255                     kx += j;
00256 /* L20: */
00257                 }
00258                 kpc = (imax - 1) * imax / 2 + 1;
00259                 if (imax > 1) {
00260                     i__1 = imax - 1;
00261                     jmax = idamax_(&i__1, &ap[kpc], &c__1);
00262 /* Computing MAX */
00263                     d__2 = rowmax, d__3 = (d__1 = ap[kpc + jmax - 1], abs(
00264                             d__1));
00265                     rowmax = max(d__2,d__3);
00266                 }
00267 
00268                 if (absakk >= alpha * colmax * (colmax / rowmax)) {
00269 
00270 /*                 no interchange, use 1-by-1 pivot block */
00271 
00272                     kp = k;
00273                 } else if ((d__1 = ap[kpc + imax - 1], abs(d__1)) >= alpha * 
00274                         rowmax) {
00275 
00276 /*                 interchange rows and columns K and IMAX, use 1-by-1 */
00277 /*                 pivot block */
00278 
00279                     kp = imax;
00280                 } else {
00281 
00282 /*                 interchange rows and columns K-1 and IMAX, use 2-by-2 */
00283 /*                 pivot block */
00284 
00285                     kp = imax;
00286                     kstep = 2;
00287                 }
00288             }
00289 
00290             kk = k - kstep + 1;
00291             if (kstep == 2) {
00292                 knc = knc - k + 1;
00293             }
00294             if (kp != kk) {
00295 
00296 /*              Interchange rows and columns KK and KP in the leading */
00297 /*              submatrix A(1:k,1:k) */
00298 
00299                 i__1 = kp - 1;
00300                 dswap_(&i__1, &ap[knc], &c__1, &ap[kpc], &c__1);
00301                 kx = kpc + kp - 1;
00302                 i__1 = kk - 1;
00303                 for (j = kp + 1; j <= i__1; ++j) {
00304                     kx = kx + j - 1;
00305                     t = ap[knc + j - 1];
00306                     ap[knc + j - 1] = ap[kx];
00307                     ap[kx] = t;
00308 /* L30: */
00309                 }
00310                 t = ap[knc + kk - 1];
00311                 ap[knc + kk - 1] = ap[kpc + kp - 1];
00312                 ap[kpc + kp - 1] = t;
00313                 if (kstep == 2) {
00314                     t = ap[kc + k - 2];
00315                     ap[kc + k - 2] = ap[kc + kp - 1];
00316                     ap[kc + kp - 1] = t;
00317                 }
00318             }
00319 
00320 /*           Update the leading submatrix */
00321 
00322             if (kstep == 1) {
00323 
00324 /*              1-by-1 pivot block D(k): column k now holds */
00325 
00326 /*              W(k) = U(k)*D(k) */
00327 
00328 /*              where U(k) is the k-th column of U */
00329 
00330 /*              Perform a rank-1 update of A(1:k-1,1:k-1) as */
00331 
00332 /*              A := A - U(k)*D(k)*U(k)' = A - W(k)*1/D(k)*W(k)' */
00333 
00334                 r1 = 1. / ap[kc + k - 1];
00335                 i__1 = k - 1;
00336                 d__1 = -r1;
00337                 dspr_(uplo, &i__1, &d__1, &ap[kc], &c__1, &ap[1]);
00338 
00339 /*              Store U(k) in column k */
00340 
00341                 i__1 = k - 1;
00342                 dscal_(&i__1, &r1, &ap[kc], &c__1);
00343             } else {
00344 
00345 /*              2-by-2 pivot block D(k): columns k and k-1 now hold */
00346 
00347 /*              ( W(k-1) W(k) ) = ( U(k-1) U(k) )*D(k) */
00348 
00349 /*              where U(k) and U(k-1) are the k-th and (k-1)-th columns */
00350 /*              of U */
00351 
00352 /*              Perform a rank-2 update of A(1:k-2,1:k-2) as */
00353 
00354 /*              A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )' */
00355 /*                 = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )' */
00356 
00357                 if (k > 2) {
00358 
00359                     d12 = ap[k - 1 + (k - 1) * k / 2];
00360                     d22 = ap[k - 1 + (k - 2) * (k - 1) / 2] / d12;
00361                     d11 = ap[k + (k - 1) * k / 2] / d12;
00362                     t = 1. / (d11 * d22 - 1.);
00363                     d12 = t / d12;
00364 
00365                     for (j = k - 2; j >= 1; --j) {
00366                         wkm1 = d12 * (d11 * ap[j + (k - 2) * (k - 1) / 2] - 
00367                                 ap[j + (k - 1) * k / 2]);
00368                         wk = d12 * (d22 * ap[j + (k - 1) * k / 2] - ap[j + (k 
00369                                 - 2) * (k - 1) / 2]);
00370                         for (i__ = j; i__ >= 1; --i__) {
00371                             ap[i__ + (j - 1) * j / 2] = ap[i__ + (j - 1) * j /
00372                                      2] - ap[i__ + (k - 1) * k / 2] * wk - ap[
00373                                     i__ + (k - 2) * (k - 1) / 2] * wkm1;
00374 /* L40: */
00375                         }
00376                         ap[j + (k - 1) * k / 2] = wk;
00377                         ap[j + (k - 2) * (k - 1) / 2] = wkm1;
00378 /* L50: */
00379                     }
00380 
00381                 }
00382 
00383             }
00384         }
00385 
00386 /*        Store details of the interchanges in IPIV */
00387 
00388         if (kstep == 1) {
00389             ipiv[k] = kp;
00390         } else {
00391             ipiv[k] = -kp;
00392             ipiv[k - 1] = -kp;
00393         }
00394 
00395 /*        Decrease K and return to the start of the main loop */
00396 
00397         k -= kstep;
00398         kc = knc - k;
00399         goto L10;
00400 
00401     } else {
00402 
00403 /*        Factorize A as L*D*L' using the lower triangle of A */
00404 
00405 /*        K is the main loop index, increasing from 1 to N in steps of */
00406 /*        1 or 2 */
00407 
00408         k = 1;
00409         kc = 1;
00410         npp = *n * (*n + 1) / 2;
00411 L60:
00412         knc = kc;
00413 
00414 /*        If K > N, exit from loop */
00415 
00416         if (k > *n) {
00417             goto L110;
00418         }
00419         kstep = 1;
00420 
00421 /*        Determine rows and columns to be interchanged and whether */
00422 /*        a 1-by-1 or 2-by-2 pivot block will be used */
00423 
00424         absakk = (d__1 = ap[kc], abs(d__1));
00425 
00426 /*        IMAX is the row-index of the largest off-diagonal element in */
00427 /*        column K, and COLMAX is its absolute value */
00428 
00429         if (k < *n) {
00430             i__1 = *n - k;
00431             imax = k + idamax_(&i__1, &ap[kc + 1], &c__1);
00432             colmax = (d__1 = ap[kc + imax - k], abs(d__1));
00433         } else {
00434             colmax = 0.;
00435         }
00436 
00437         if (max(absakk,colmax) == 0.) {
00438 
00439 /*           Column K is zero: set INFO and continue */
00440 
00441             if (*info == 0) {
00442                 *info = k;
00443             }
00444             kp = k;
00445         } else {
00446             if (absakk >= alpha * colmax) {
00447 
00448 /*              no interchange, use 1-by-1 pivot block */
00449 
00450                 kp = k;
00451             } else {
00452 
00453 /*              JMAX is the column-index of the largest off-diagonal */
00454 /*              element in row IMAX, and ROWMAX is its absolute value */
00455 
00456                 rowmax = 0.;
00457                 kx = kc + imax - k;
00458                 i__1 = imax - 1;
00459                 for (j = k; j <= i__1; ++j) {
00460                     if ((d__1 = ap[kx], abs(d__1)) > rowmax) {
00461                         rowmax = (d__1 = ap[kx], abs(d__1));
00462                         jmax = j;
00463                     }
00464                     kx = kx + *n - j;
00465 /* L70: */
00466                 }
00467                 kpc = npp - (*n - imax + 1) * (*n - imax + 2) / 2 + 1;
00468                 if (imax < *n) {
00469                     i__1 = *n - imax;
00470                     jmax = imax + idamax_(&i__1, &ap[kpc + 1], &c__1);
00471 /* Computing MAX */
00472                     d__2 = rowmax, d__3 = (d__1 = ap[kpc + jmax - imax], abs(
00473                             d__1));
00474                     rowmax = max(d__2,d__3);
00475                 }
00476 
00477                 if (absakk >= alpha * colmax * (colmax / rowmax)) {
00478 
00479 /*                 no interchange, use 1-by-1 pivot block */
00480 
00481                     kp = k;
00482                 } else if ((d__1 = ap[kpc], abs(d__1)) >= alpha * rowmax) {
00483 
00484 /*                 interchange rows and columns K and IMAX, use 1-by-1 */
00485 /*                 pivot block */
00486 
00487                     kp = imax;
00488                 } else {
00489 
00490 /*                 interchange rows and columns K+1 and IMAX, use 2-by-2 */
00491 /*                 pivot block */
00492 
00493                     kp = imax;
00494                     kstep = 2;
00495                 }
00496             }
00497 
00498             kk = k + kstep - 1;
00499             if (kstep == 2) {
00500                 knc = knc + *n - k + 1;
00501             }
00502             if (kp != kk) {
00503 
00504 /*              Interchange rows and columns KK and KP in the trailing */
00505 /*              submatrix A(k:n,k:n) */
00506 
00507                 if (kp < *n) {
00508                     i__1 = *n - kp;
00509                     dswap_(&i__1, &ap[knc + kp - kk + 1], &c__1, &ap[kpc + 1], 
00510                              &c__1);
00511                 }
00512                 kx = knc + kp - kk;
00513                 i__1 = kp - 1;
00514                 for (j = kk + 1; j <= i__1; ++j) {
00515                     kx = kx + *n - j + 1;
00516                     t = ap[knc + j - kk];
00517                     ap[knc + j - kk] = ap[kx];
00518                     ap[kx] = t;
00519 /* L80: */
00520                 }
00521                 t = ap[knc];
00522                 ap[knc] = ap[kpc];
00523                 ap[kpc] = t;
00524                 if (kstep == 2) {
00525                     t = ap[kc + 1];
00526                     ap[kc + 1] = ap[kc + kp - k];
00527                     ap[kc + kp - k] = t;
00528                 }
00529             }
00530 
00531 /*           Update the trailing submatrix */
00532 
00533             if (kstep == 1) {
00534 
00535 /*              1-by-1 pivot block D(k): column k now holds */
00536 
00537 /*              W(k) = L(k)*D(k) */
00538 
00539 /*              where L(k) is the k-th column of L */
00540 
00541                 if (k < *n) {
00542 
00543 /*                 Perform a rank-1 update of A(k+1:n,k+1:n) as */
00544 
00545 /*                 A := A - L(k)*D(k)*L(k)' = A - W(k)*(1/D(k))*W(k)' */
00546 
00547                     r1 = 1. / ap[kc];
00548                     i__1 = *n - k;
00549                     d__1 = -r1;
00550                     dspr_(uplo, &i__1, &d__1, &ap[kc + 1], &c__1, &ap[kc + *n 
00551                             - k + 1]);
00552 
00553 /*                 Store L(k) in column K */
00554 
00555                     i__1 = *n - k;
00556                     dscal_(&i__1, &r1, &ap[kc + 1], &c__1);
00557                 }
00558             } else {
00559 
00560 /*              2-by-2 pivot block D(k): columns K and K+1 now hold */
00561 
00562 /*              ( W(k) W(k+1) ) = ( L(k) L(k+1) )*D(k) */
00563 
00564 /*              where L(k) and L(k+1) are the k-th and (k+1)-th columns */
00565 /*              of L */
00566 
00567                 if (k < *n - 1) {
00568 
00569 /*                 Perform a rank-2 update of A(k+2:n,k+2:n) as */
00570 
00571 /*                 A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )' */
00572 /*                    = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )' */
00573 
00574                     d21 = ap[k + 1 + (k - 1) * ((*n << 1) - k) / 2];
00575                     d11 = ap[k + 1 + k * ((*n << 1) - k - 1) / 2] / d21;
00576                     d22 = ap[k + (k - 1) * ((*n << 1) - k) / 2] / d21;
00577                     t = 1. / (d11 * d22 - 1.);
00578                     d21 = t / d21;
00579 
00580                     i__1 = *n;
00581                     for (j = k + 2; j <= i__1; ++j) {
00582                         wk = d21 * (d11 * ap[j + (k - 1) * ((*n << 1) - k) / 
00583                                 2] - ap[j + k * ((*n << 1) - k - 1) / 2]);
00584                         wkp1 = d21 * (d22 * ap[j + k * ((*n << 1) - k - 1) / 
00585                                 2] - ap[j + (k - 1) * ((*n << 1) - k) / 2]);
00586 
00587                         i__2 = *n;
00588                         for (i__ = j; i__ <= i__2; ++i__) {
00589                             ap[i__ + (j - 1) * ((*n << 1) - j) / 2] = ap[i__ 
00590                                     + (j - 1) * ((*n << 1) - j) / 2] - ap[i__ 
00591                                     + (k - 1) * ((*n << 1) - k) / 2] * wk - 
00592                                     ap[i__ + k * ((*n << 1) - k - 1) / 2] * 
00593                                     wkp1;
00594 /* L90: */
00595                         }
00596 
00597                         ap[j + (k - 1) * ((*n << 1) - k) / 2] = wk;
00598                         ap[j + k * ((*n << 1) - k - 1) / 2] = wkp1;
00599 
00600 /* L100: */
00601                     }
00602                 }
00603             }
00604         }
00605 
00606 /*        Store details of the interchanges in IPIV */
00607 
00608         if (kstep == 1) {
00609             ipiv[k] = kp;
00610         } else {
00611             ipiv[k] = -kp;
00612             ipiv[k + 1] = -kp;
00613         }
00614 
00615 /*        Increase K and return to the start of the main loop */
00616 
00617         k += kstep;
00618         kc = knc + *n - k + 2;
00619         goto L60;
00620 
00621     }
00622 
00623 L110:
00624     return 0;
00625 
00626 /*     End of DSPTRF */
00627 
00628 } /* dsptrf_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:49