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


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