ztbsv.c
Go to the documentation of this file.
00001 /* ztbsv.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 /* Subroutine */ int ztbsv_(char *uplo, char *trans, char *diag, integer *n, 
00017         integer *k, doublecomplex *a, integer *lda, doublecomplex *x, integer 
00018         *incx)
00019 {
00020     /* System generated locals */
00021     integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
00022     doublecomplex z__1, z__2, z__3;
00023 
00024     /* Builtin functions */
00025     void z_div(doublecomplex *, doublecomplex *, doublecomplex *), d_cnjg(
00026             doublecomplex *, doublecomplex *);
00027 
00028     /* Local variables */
00029     integer i__, j, l, ix, jx, kx, info;
00030     doublecomplex temp;
00031     extern logical lsame_(char *, char *);
00032     integer kplus1;
00033     extern /* Subroutine */ int xerbla_(char *, integer *);
00034     logical noconj, nounit;
00035 
00036 /*     .. Scalar Arguments .. */
00037 /*     .. */
00038 /*     .. Array Arguments .. */
00039 /*     .. */
00040 
00041 /*  Purpose */
00042 /*  ======= */
00043 
00044 /*  ZTBSV  solves one of the systems of equations */
00045 
00046 /*     A*x = b,   or   A'*x = b,   or   conjg( A' )*x = b, */
00047 
00048 /*  where b and x are n element vectors and A is an n by n unit, or */
00049 /*  non-unit, upper or lower triangular band matrix, with ( k + 1 ) */
00050 /*  diagonals. */
00051 
00052 /*  No test for singularity or near-singularity is included in this */
00053 /*  routine. Such tests must be performed before calling this routine. */
00054 
00055 /*  Arguments */
00056 /*  ========== */
00057 
00058 /*  UPLO   - CHARACTER*1. */
00059 /*           On entry, UPLO specifies whether the matrix is an upper or */
00060 /*           lower triangular matrix as follows: */
00061 
00062 /*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */
00063 
00064 /*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */
00065 
00066 /*           Unchanged on exit. */
00067 
00068 /*  TRANS  - CHARACTER*1. */
00069 /*           On entry, TRANS specifies the equations to be solved as */
00070 /*           follows: */
00071 
00072 /*              TRANS = 'N' or 'n'   A*x = b. */
00073 
00074 /*              TRANS = 'T' or 't'   A'*x = b. */
00075 
00076 /*              TRANS = 'C' or 'c'   conjg( A' )*x = b. */
00077 
00078 /*           Unchanged on exit. */
00079 
00080 /*  DIAG   - CHARACTER*1. */
00081 /*           On entry, DIAG specifies whether or not A is unit */
00082 /*           triangular as follows: */
00083 
00084 /*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */
00085 
00086 /*              DIAG = 'N' or 'n'   A is not assumed to be unit */
00087 /*                                  triangular. */
00088 
00089 /*           Unchanged on exit. */
00090 
00091 /*  N      - INTEGER. */
00092 /*           On entry, N specifies the order of the matrix A. */
00093 /*           N must be at least zero. */
00094 /*           Unchanged on exit. */
00095 
00096 /*  K      - INTEGER. */
00097 /*           On entry with UPLO = 'U' or 'u', K specifies the number of */
00098 /*           super-diagonals of the matrix A. */
00099 /*           On entry with UPLO = 'L' or 'l', K specifies the number of */
00100 /*           sub-diagonals of the matrix A. */
00101 /*           K must satisfy  0 .le. K. */
00102 /*           Unchanged on exit. */
00103 
00104 /*  A      - COMPLEX*16       array of DIMENSION ( LDA, n ). */
00105 /*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */
00106 /*           by n part of the array A must contain the upper triangular */
00107 /*           band part of the matrix of coefficients, supplied column by */
00108 /*           column, with the leading diagonal of the matrix in row */
00109 /*           ( k + 1 ) of the array, the first super-diagonal starting at */
00110 /*           position 2 in row k, and so on. The top left k by k triangle */
00111 /*           of the array A is not referenced. */
00112 /*           The following program segment will transfer an upper */
00113 /*           triangular band matrix from conventional full matrix storage */
00114 /*           to band storage: */
00115 
00116 /*                 DO 20, J = 1, N */
00117 /*                    M = K + 1 - J */
00118 /*                    DO 10, I = MAX( 1, J - K ), J */
00119 /*                       A( M + I, J ) = matrix( I, J ) */
00120 /*              10    CONTINUE */
00121 /*              20 CONTINUE */
00122 
00123 /*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */
00124 /*           by n part of the array A must contain the lower triangular */
00125 /*           band part of the matrix of coefficients, supplied column by */
00126 /*           column, with the leading diagonal of the matrix in row 1 of */
00127 /*           the array, the first sub-diagonal starting at position 1 in */
00128 /*           row 2, and so on. The bottom right k by k triangle of the */
00129 /*           array A is not referenced. */
00130 /*           The following program segment will transfer a lower */
00131 /*           triangular band matrix from conventional full matrix storage */
00132 /*           to band storage: */
00133 
00134 /*                 DO 20, J = 1, N */
00135 /*                    M = 1 - J */
00136 /*                    DO 10, I = J, MIN( N, J + K ) */
00137 /*                       A( M + I, J ) = matrix( I, J ) */
00138 /*              10    CONTINUE */
00139 /*              20 CONTINUE */
00140 
00141 /*           Note that when DIAG = 'U' or 'u' the elements of the array A */
00142 /*           corresponding to the diagonal elements of the matrix are not */
00143 /*           referenced, but are assumed to be unity. */
00144 /*           Unchanged on exit. */
00145 
00146 /*  LDA    - INTEGER. */
00147 /*           On entry, LDA specifies the first dimension of A as declared */
00148 /*           in the calling (sub) program. LDA must be at least */
00149 /*           ( k + 1 ). */
00150 /*           Unchanged on exit. */
00151 
00152 /*  X      - COMPLEX*16       array of dimension at least */
00153 /*           ( 1 + ( n - 1 )*abs( INCX ) ). */
00154 /*           Before entry, the incremented array X must contain the n */
00155 /*           element right-hand side vector b. On exit, X is overwritten */
00156 /*           with the solution vector x. */
00157 
00158 /*  INCX   - INTEGER. */
00159 /*           On entry, INCX specifies the increment for the elements of */
00160 /*           X. INCX must not be zero. */
00161 /*           Unchanged on exit. */
00162 
00163 
00164 /*  Level 2 Blas routine. */
00165 
00166 /*  -- Written on 22-October-1986. */
00167 /*     Jack Dongarra, Argonne National Lab. */
00168 /*     Jeremy Du Croz, Nag Central Office. */
00169 /*     Sven Hammarling, Nag Central Office. */
00170 /*     Richard Hanson, Sandia National Labs. */
00171 
00172 
00173 /*     .. Parameters .. */
00174 /*     .. */
00175 /*     .. Local Scalars .. */
00176 /*     .. */
00177 /*     .. External Functions .. */
00178 /*     .. */
00179 /*     .. External Subroutines .. */
00180 /*     .. */
00181 /*     .. Intrinsic Functions .. */
00182 /*     .. */
00183 
00184 /*     Test the input parameters. */
00185 
00186     /* Parameter adjustments */
00187     a_dim1 = *lda;
00188     a_offset = 1 + a_dim1;
00189     a -= a_offset;
00190     --x;
00191 
00192     /* Function Body */
00193     info = 0;
00194     if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
00195         info = 1;
00196     } else if (! lsame_(trans, "N") && ! lsame_(trans, 
00197             "T") && ! lsame_(trans, "C")) {
00198         info = 2;
00199     } else if (! lsame_(diag, "U") && ! lsame_(diag, 
00200             "N")) {
00201         info = 3;
00202     } else if (*n < 0) {
00203         info = 4;
00204     } else if (*k < 0) {
00205         info = 5;
00206     } else if (*lda < *k + 1) {
00207         info = 7;
00208     } else if (*incx == 0) {
00209         info = 9;
00210     }
00211     if (info != 0) {
00212         xerbla_("ZTBSV ", &info);
00213         return 0;
00214     }
00215 
00216 /*     Quick return if possible. */
00217 
00218     if (*n == 0) {
00219         return 0;
00220     }
00221 
00222     noconj = lsame_(trans, "T");
00223     nounit = lsame_(diag, "N");
00224 
00225 /*     Set up the start point in X if the increment is not unity. This */
00226 /*     will be  ( N - 1 )*INCX  too small for descending loops. */
00227 
00228     if (*incx <= 0) {
00229         kx = 1 - (*n - 1) * *incx;
00230     } else if (*incx != 1) {
00231         kx = 1;
00232     }
00233 
00234 /*     Start the operations. In this version the elements of A are */
00235 /*     accessed by sequentially with one pass through A. */
00236 
00237     if (lsame_(trans, "N")) {
00238 
00239 /*        Form  x := inv( A )*x. */
00240 
00241         if (lsame_(uplo, "U")) {
00242             kplus1 = *k + 1;
00243             if (*incx == 1) {
00244                 for (j = *n; j >= 1; --j) {
00245                     i__1 = j;
00246                     if (x[i__1].r != 0. || x[i__1].i != 0.) {
00247                         l = kplus1 - j;
00248                         if (nounit) {
00249                             i__1 = j;
00250                             z_div(&z__1, &x[j], &a[kplus1 + j * a_dim1]);
00251                             x[i__1].r = z__1.r, x[i__1].i = z__1.i;
00252                         }
00253                         i__1 = j;
00254                         temp.r = x[i__1].r, temp.i = x[i__1].i;
00255 /* Computing MAX */
00256                         i__2 = 1, i__3 = j - *k;
00257                         i__1 = max(i__2,i__3);
00258                         for (i__ = j - 1; i__ >= i__1; --i__) {
00259                             i__2 = i__;
00260                             i__3 = i__;
00261                             i__4 = l + i__ + j * a_dim1;
00262                             z__2.r = temp.r * a[i__4].r - temp.i * a[i__4].i, 
00263                                     z__2.i = temp.r * a[i__4].i + temp.i * a[
00264                                     i__4].r;
00265                             z__1.r = x[i__3].r - z__2.r, z__1.i = x[i__3].i - 
00266                                     z__2.i;
00267                             x[i__2].r = z__1.r, x[i__2].i = z__1.i;
00268 /* L10: */
00269                         }
00270                     }
00271 /* L20: */
00272                 }
00273             } else {
00274                 kx += (*n - 1) * *incx;
00275                 jx = kx;
00276                 for (j = *n; j >= 1; --j) {
00277                     kx -= *incx;
00278                     i__1 = jx;
00279                     if (x[i__1].r != 0. || x[i__1].i != 0.) {
00280                         ix = kx;
00281                         l = kplus1 - j;
00282                         if (nounit) {
00283                             i__1 = jx;
00284                             z_div(&z__1, &x[jx], &a[kplus1 + j * a_dim1]);
00285                             x[i__1].r = z__1.r, x[i__1].i = z__1.i;
00286                         }
00287                         i__1 = jx;
00288                         temp.r = x[i__1].r, temp.i = x[i__1].i;
00289 /* Computing MAX */
00290                         i__2 = 1, i__3 = j - *k;
00291                         i__1 = max(i__2,i__3);
00292                         for (i__ = j - 1; i__ >= i__1; --i__) {
00293                             i__2 = ix;
00294                             i__3 = ix;
00295                             i__4 = l + i__ + j * a_dim1;
00296                             z__2.r = temp.r * a[i__4].r - temp.i * a[i__4].i, 
00297                                     z__2.i = temp.r * a[i__4].i + temp.i * a[
00298                                     i__4].r;
00299                             z__1.r = x[i__3].r - z__2.r, z__1.i = x[i__3].i - 
00300                                     z__2.i;
00301                             x[i__2].r = z__1.r, x[i__2].i = z__1.i;
00302                             ix -= *incx;
00303 /* L30: */
00304                         }
00305                     }
00306                     jx -= *incx;
00307 /* L40: */
00308                 }
00309             }
00310         } else {
00311             if (*incx == 1) {
00312                 i__1 = *n;
00313                 for (j = 1; j <= i__1; ++j) {
00314                     i__2 = j;
00315                     if (x[i__2].r != 0. || x[i__2].i != 0.) {
00316                         l = 1 - j;
00317                         if (nounit) {
00318                             i__2 = j;
00319                             z_div(&z__1, &x[j], &a[j * a_dim1 + 1]);
00320                             x[i__2].r = z__1.r, x[i__2].i = z__1.i;
00321                         }
00322                         i__2 = j;
00323                         temp.r = x[i__2].r, temp.i = x[i__2].i;
00324 /* Computing MIN */
00325                         i__3 = *n, i__4 = j + *k;
00326                         i__2 = min(i__3,i__4);
00327                         for (i__ = j + 1; i__ <= i__2; ++i__) {
00328                             i__3 = i__;
00329                             i__4 = i__;
00330                             i__5 = l + i__ + j * a_dim1;
00331                             z__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i, 
00332                                     z__2.i = temp.r * a[i__5].i + temp.i * a[
00333                                     i__5].r;
00334                             z__1.r = x[i__4].r - z__2.r, z__1.i = x[i__4].i - 
00335                                     z__2.i;
00336                             x[i__3].r = z__1.r, x[i__3].i = z__1.i;
00337 /* L50: */
00338                         }
00339                     }
00340 /* L60: */
00341                 }
00342             } else {
00343                 jx = kx;
00344                 i__1 = *n;
00345                 for (j = 1; j <= i__1; ++j) {
00346                     kx += *incx;
00347                     i__2 = jx;
00348                     if (x[i__2].r != 0. || x[i__2].i != 0.) {
00349                         ix = kx;
00350                         l = 1 - j;
00351                         if (nounit) {
00352                             i__2 = jx;
00353                             z_div(&z__1, &x[jx], &a[j * a_dim1 + 1]);
00354                             x[i__2].r = z__1.r, x[i__2].i = z__1.i;
00355                         }
00356                         i__2 = jx;
00357                         temp.r = x[i__2].r, temp.i = x[i__2].i;
00358 /* Computing MIN */
00359                         i__3 = *n, i__4 = j + *k;
00360                         i__2 = min(i__3,i__4);
00361                         for (i__ = j + 1; i__ <= i__2; ++i__) {
00362                             i__3 = ix;
00363                             i__4 = ix;
00364                             i__5 = l + i__ + j * a_dim1;
00365                             z__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i, 
00366                                     z__2.i = temp.r * a[i__5].i + temp.i * a[
00367                                     i__5].r;
00368                             z__1.r = x[i__4].r - z__2.r, z__1.i = x[i__4].i - 
00369                                     z__2.i;
00370                             x[i__3].r = z__1.r, x[i__3].i = z__1.i;
00371                             ix += *incx;
00372 /* L70: */
00373                         }
00374                     }
00375                     jx += *incx;
00376 /* L80: */
00377                 }
00378             }
00379         }
00380     } else {
00381 
00382 /*        Form  x := inv( A' )*x  or  x := inv( conjg( A') )*x. */
00383 
00384         if (lsame_(uplo, "U")) {
00385             kplus1 = *k + 1;
00386             if (*incx == 1) {
00387                 i__1 = *n;
00388                 for (j = 1; j <= i__1; ++j) {
00389                     i__2 = j;
00390                     temp.r = x[i__2].r, temp.i = x[i__2].i;
00391                     l = kplus1 - j;
00392                     if (noconj) {
00393 /* Computing MAX */
00394                         i__2 = 1, i__3 = j - *k;
00395                         i__4 = j - 1;
00396                         for (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {
00397                             i__2 = l + i__ + j * a_dim1;
00398                             i__3 = i__;
00399                             z__2.r = a[i__2].r * x[i__3].r - a[i__2].i * x[
00400                                     i__3].i, z__2.i = a[i__2].r * x[i__3].i + 
00401                                     a[i__2].i * x[i__3].r;
00402                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00403                                     z__2.i;
00404                             temp.r = z__1.r, temp.i = z__1.i;
00405 /* L90: */
00406                         }
00407                         if (nounit) {
00408                             z_div(&z__1, &temp, &a[kplus1 + j * a_dim1]);
00409                             temp.r = z__1.r, temp.i = z__1.i;
00410                         }
00411                     } else {
00412 /* Computing MAX */
00413                         i__4 = 1, i__2 = j - *k;
00414                         i__3 = j - 1;
00415                         for (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {
00416                             d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);
00417                             i__4 = i__;
00418                             z__2.r = z__3.r * x[i__4].r - z__3.i * x[i__4].i, 
00419                                     z__2.i = z__3.r * x[i__4].i + z__3.i * x[
00420                                     i__4].r;
00421                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00422                                     z__2.i;
00423                             temp.r = z__1.r, temp.i = z__1.i;
00424 /* L100: */
00425                         }
00426                         if (nounit) {
00427                             d_cnjg(&z__2, &a[kplus1 + j * a_dim1]);
00428                             z_div(&z__1, &temp, &z__2);
00429                             temp.r = z__1.r, temp.i = z__1.i;
00430                         }
00431                     }
00432                     i__3 = j;
00433                     x[i__3].r = temp.r, x[i__3].i = temp.i;
00434 /* L110: */
00435                 }
00436             } else {
00437                 jx = kx;
00438                 i__1 = *n;
00439                 for (j = 1; j <= i__1; ++j) {
00440                     i__3 = jx;
00441                     temp.r = x[i__3].r, temp.i = x[i__3].i;
00442                     ix = kx;
00443                     l = kplus1 - j;
00444                     if (noconj) {
00445 /* Computing MAX */
00446                         i__3 = 1, i__4 = j - *k;
00447                         i__2 = j - 1;
00448                         for (i__ = max(i__3,i__4); i__ <= i__2; ++i__) {
00449                             i__3 = l + i__ + j * a_dim1;
00450                             i__4 = ix;
00451                             z__2.r = a[i__3].r * x[i__4].r - a[i__3].i * x[
00452                                     i__4].i, z__2.i = a[i__3].r * x[i__4].i + 
00453                                     a[i__3].i * x[i__4].r;
00454                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00455                                     z__2.i;
00456                             temp.r = z__1.r, temp.i = z__1.i;
00457                             ix += *incx;
00458 /* L120: */
00459                         }
00460                         if (nounit) {
00461                             z_div(&z__1, &temp, &a[kplus1 + j * a_dim1]);
00462                             temp.r = z__1.r, temp.i = z__1.i;
00463                         }
00464                     } else {
00465 /* Computing MAX */
00466                         i__2 = 1, i__3 = j - *k;
00467                         i__4 = j - 1;
00468                         for (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {
00469                             d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);
00470                             i__2 = ix;
00471                             z__2.r = z__3.r * x[i__2].r - z__3.i * x[i__2].i, 
00472                                     z__2.i = z__3.r * x[i__2].i + z__3.i * x[
00473                                     i__2].r;
00474                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00475                                     z__2.i;
00476                             temp.r = z__1.r, temp.i = z__1.i;
00477                             ix += *incx;
00478 /* L130: */
00479                         }
00480                         if (nounit) {
00481                             d_cnjg(&z__2, &a[kplus1 + j * a_dim1]);
00482                             z_div(&z__1, &temp, &z__2);
00483                             temp.r = z__1.r, temp.i = z__1.i;
00484                         }
00485                     }
00486                     i__4 = jx;
00487                     x[i__4].r = temp.r, x[i__4].i = temp.i;
00488                     jx += *incx;
00489                     if (j > *k) {
00490                         kx += *incx;
00491                     }
00492 /* L140: */
00493                 }
00494             }
00495         } else {
00496             if (*incx == 1) {
00497                 for (j = *n; j >= 1; --j) {
00498                     i__1 = j;
00499                     temp.r = x[i__1].r, temp.i = x[i__1].i;
00500                     l = 1 - j;
00501                     if (noconj) {
00502 /* Computing MIN */
00503                         i__1 = *n, i__4 = j + *k;
00504                         i__2 = j + 1;
00505                         for (i__ = min(i__1,i__4); i__ >= i__2; --i__) {
00506                             i__1 = l + i__ + j * a_dim1;
00507                             i__4 = i__;
00508                             z__2.r = a[i__1].r * x[i__4].r - a[i__1].i * x[
00509                                     i__4].i, z__2.i = a[i__1].r * x[i__4].i + 
00510                                     a[i__1].i * x[i__4].r;
00511                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00512                                     z__2.i;
00513                             temp.r = z__1.r, temp.i = z__1.i;
00514 /* L150: */
00515                         }
00516                         if (nounit) {
00517                             z_div(&z__1, &temp, &a[j * a_dim1 + 1]);
00518                             temp.r = z__1.r, temp.i = z__1.i;
00519                         }
00520                     } else {
00521 /* Computing MIN */
00522                         i__2 = *n, i__1 = j + *k;
00523                         i__4 = j + 1;
00524                         for (i__ = min(i__2,i__1); i__ >= i__4; --i__) {
00525                             d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);
00526                             i__2 = i__;
00527                             z__2.r = z__3.r * x[i__2].r - z__3.i * x[i__2].i, 
00528                                     z__2.i = z__3.r * x[i__2].i + z__3.i * x[
00529                                     i__2].r;
00530                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00531                                     z__2.i;
00532                             temp.r = z__1.r, temp.i = z__1.i;
00533 /* L160: */
00534                         }
00535                         if (nounit) {
00536                             d_cnjg(&z__2, &a[j * a_dim1 + 1]);
00537                             z_div(&z__1, &temp, &z__2);
00538                             temp.r = z__1.r, temp.i = z__1.i;
00539                         }
00540                     }
00541                     i__4 = j;
00542                     x[i__4].r = temp.r, x[i__4].i = temp.i;
00543 /* L170: */
00544                 }
00545             } else {
00546                 kx += (*n - 1) * *incx;
00547                 jx = kx;
00548                 for (j = *n; j >= 1; --j) {
00549                     i__4 = jx;
00550                     temp.r = x[i__4].r, temp.i = x[i__4].i;
00551                     ix = kx;
00552                     l = 1 - j;
00553                     if (noconj) {
00554 /* Computing MIN */
00555                         i__4 = *n, i__2 = j + *k;
00556                         i__1 = j + 1;
00557                         for (i__ = min(i__4,i__2); i__ >= i__1; --i__) {
00558                             i__4 = l + i__ + j * a_dim1;
00559                             i__2 = ix;
00560                             z__2.r = a[i__4].r * x[i__2].r - a[i__4].i * x[
00561                                     i__2].i, z__2.i = a[i__4].r * x[i__2].i + 
00562                                     a[i__4].i * x[i__2].r;
00563                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00564                                     z__2.i;
00565                             temp.r = z__1.r, temp.i = z__1.i;
00566                             ix -= *incx;
00567 /* L180: */
00568                         }
00569                         if (nounit) {
00570                             z_div(&z__1, &temp, &a[j * a_dim1 + 1]);
00571                             temp.r = z__1.r, temp.i = z__1.i;
00572                         }
00573                     } else {
00574 /* Computing MIN */
00575                         i__1 = *n, i__4 = j + *k;
00576                         i__2 = j + 1;
00577                         for (i__ = min(i__1,i__4); i__ >= i__2; --i__) {
00578                             d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);
00579                             i__1 = ix;
00580                             z__2.r = z__3.r * x[i__1].r - z__3.i * x[i__1].i, 
00581                                     z__2.i = z__3.r * x[i__1].i + z__3.i * x[
00582                                     i__1].r;
00583                             z__1.r = temp.r - z__2.r, z__1.i = temp.i - 
00584                                     z__2.i;
00585                             temp.r = z__1.r, temp.i = z__1.i;
00586                             ix -= *incx;
00587 /* L190: */
00588                         }
00589                         if (nounit) {
00590                             d_cnjg(&z__2, &a[j * a_dim1 + 1]);
00591                             z_div(&z__1, &temp, &z__2);
00592                             temp.r = z__1.r, temp.i = z__1.i;
00593                         }
00594                     }
00595                     i__2 = jx;
00596                     x[i__2].r = temp.r, x[i__2].i = temp.i;
00597                     jx -= *incx;
00598                     if (*n - j >= *k) {
00599                         kx -= *incx;
00600                     }
00601 /* L200: */
00602                 }
00603             }
00604         }
00605     }
00606 
00607     return 0;
00608 
00609 /*     End of ZTBSV . */
00610 
00611 } /* ztbsv_ */


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