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


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