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


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