clagtm.c
Go to the documentation of this file.
00001 /* clagtm.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 clagtm_(char *trans, integer *n, integer *nrhs, real *
00017         alpha, complex *dl, complex *d__, complex *du, complex *x, integer *
00018         ldx, real *beta, complex *b, integer *ldb)
00019 {
00020     /* System generated locals */
00021     integer b_dim1, b_offset, x_dim1, x_offset, i__1, i__2, i__3, i__4, i__5, 
00022             i__6, i__7, i__8, i__9, i__10;
00023     complex q__1, q__2, q__3, q__4, q__5, q__6, q__7, q__8, q__9;
00024 
00025     /* Builtin functions */
00026     void r_cnjg(complex *, complex *);
00027 
00028     /* Local variables */
00029     integer i__, j;
00030     extern logical lsame_(char *, char *);
00031 
00032 
00033 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00034 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00035 /*     November 2006 */
00036 
00037 /*     .. Scalar Arguments .. */
00038 /*     .. */
00039 /*     .. Array Arguments .. */
00040 /*     .. */
00041 
00042 /*  Purpose */
00043 /*  ======= */
00044 
00045 /*  CLAGTM performs a matrix-vector product of the form */
00046 
00047 /*     B := alpha * A * X + beta * B */
00048 
00049 /*  where A is a tridiagonal matrix of order N, B and X are N by NRHS */
00050 /*  matrices, and alpha and beta are real scalars, each of which may be */
00051 /*  0., 1., or -1. */
00052 
00053 /*  Arguments */
00054 /*  ========= */
00055 
00056 /*  TRANS   (input) CHARACTER*1 */
00057 /*          Specifies the operation applied to A. */
00058 /*          = 'N':  No transpose, B := alpha * A * X + beta * B */
00059 /*          = 'T':  Transpose,    B := alpha * A**T * X + beta * B */
00060 /*          = 'C':  Conjugate transpose, B := alpha * A**H * X + beta * B */
00061 
00062 /*  N       (input) INTEGER */
00063 /*          The order of the matrix A.  N >= 0. */
00064 
00065 /*  NRHS    (input) INTEGER */
00066 /*          The number of right hand sides, i.e., the number of columns */
00067 /*          of the matrices X and B. */
00068 
00069 /*  ALPHA   (input) REAL */
00070 /*          The scalar alpha.  ALPHA must be 0., 1., or -1.; otherwise, */
00071 /*          it is assumed to be 0. */
00072 
00073 /*  DL      (input) COMPLEX array, dimension (N-1) */
00074 /*          The (n-1) sub-diagonal elements of T. */
00075 
00076 /*  D       (input) COMPLEX array, dimension (N) */
00077 /*          The diagonal elements of T. */
00078 
00079 /*  DU      (input) COMPLEX array, dimension (N-1) */
00080 /*          The (n-1) super-diagonal elements of T. */
00081 
00082 /*  X       (input) COMPLEX array, dimension (LDX,NRHS) */
00083 /*          The N by NRHS matrix X. */
00084 /*  LDX     (input) INTEGER */
00085 /*          The leading dimension of the array X.  LDX >= max(N,1). */
00086 
00087 /*  BETA    (input) REAL */
00088 /*          The scalar beta.  BETA must be 0., 1., or -1.; otherwise, */
00089 /*          it is assumed to be 1. */
00090 
00091 /*  B       (input/output) COMPLEX array, dimension (LDB,NRHS) */
00092 /*          On entry, the N by NRHS matrix B. */
00093 /*          On exit, B is overwritten by the matrix expression */
00094 /*          B := alpha * A * X + beta * B. */
00095 
00096 /*  LDB     (input) INTEGER */
00097 /*          The leading dimension of the array B.  LDB >= max(N,1). */
00098 
00099 /*  ===================================================================== */
00100 
00101 /*     .. Parameters .. */
00102 /*     .. */
00103 /*     .. Local Scalars .. */
00104 /*     .. */
00105 /*     .. External Functions .. */
00106 /*     .. */
00107 /*     .. Intrinsic Functions .. */
00108 /*     .. */
00109 /*     .. Executable Statements .. */
00110 
00111     /* Parameter adjustments */
00112     --dl;
00113     --d__;
00114     --du;
00115     x_dim1 = *ldx;
00116     x_offset = 1 + x_dim1;
00117     x -= x_offset;
00118     b_dim1 = *ldb;
00119     b_offset = 1 + b_dim1;
00120     b -= b_offset;
00121 
00122     /* Function Body */
00123     if (*n == 0) {
00124         return 0;
00125     }
00126 
00127 /*     Multiply B by BETA if BETA.NE.1. */
00128 
00129     if (*beta == 0.f) {
00130         i__1 = *nrhs;
00131         for (j = 1; j <= i__1; ++j) {
00132             i__2 = *n;
00133             for (i__ = 1; i__ <= i__2; ++i__) {
00134                 i__3 = i__ + j * b_dim1;
00135                 b[i__3].r = 0.f, b[i__3].i = 0.f;
00136 /* L10: */
00137             }
00138 /* L20: */
00139         }
00140     } else if (*beta == -1.f) {
00141         i__1 = *nrhs;
00142         for (j = 1; j <= i__1; ++j) {
00143             i__2 = *n;
00144             for (i__ = 1; i__ <= i__2; ++i__) {
00145                 i__3 = i__ + j * b_dim1;
00146                 i__4 = i__ + j * b_dim1;
00147                 q__1.r = -b[i__4].r, q__1.i = -b[i__4].i;
00148                 b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00149 /* L30: */
00150             }
00151 /* L40: */
00152         }
00153     }
00154 
00155     if (*alpha == 1.f) {
00156         if (lsame_(trans, "N")) {
00157 
00158 /*           Compute B := B + A*X */
00159 
00160             i__1 = *nrhs;
00161             for (j = 1; j <= i__1; ++j) {
00162                 if (*n == 1) {
00163                     i__2 = j * b_dim1 + 1;
00164                     i__3 = j * b_dim1 + 1;
00165                     i__4 = j * x_dim1 + 1;
00166                     q__2.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00167                             q__2.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00168                             .r;
00169                     q__1.r = b[i__3].r + q__2.r, q__1.i = b[i__3].i + q__2.i;
00170                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00171                 } else {
00172                     i__2 = j * b_dim1 + 1;
00173                     i__3 = j * b_dim1 + 1;
00174                     i__4 = j * x_dim1 + 1;
00175                     q__3.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00176                             q__3.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00177                             .r;
00178                     q__2.r = b[i__3].r + q__3.r, q__2.i = b[i__3].i + q__3.i;
00179                     i__5 = j * x_dim1 + 2;
00180                     q__4.r = du[1].r * x[i__5].r - du[1].i * x[i__5].i, 
00181                             q__4.i = du[1].r * x[i__5].i + du[1].i * x[i__5]
00182                             .r;
00183                     q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
00184                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00185                     i__2 = *n + j * b_dim1;
00186                     i__3 = *n + j * b_dim1;
00187                     i__4 = *n - 1;
00188                     i__5 = *n - 1 + j * x_dim1;
00189                     q__3.r = dl[i__4].r * x[i__5].r - dl[i__4].i * x[i__5].i, 
00190                             q__3.i = dl[i__4].r * x[i__5].i + dl[i__4].i * x[
00191                             i__5].r;
00192                     q__2.r = b[i__3].r + q__3.r, q__2.i = b[i__3].i + q__3.i;
00193                     i__6 = *n;
00194                     i__7 = *n + j * x_dim1;
00195                     q__4.r = d__[i__6].r * x[i__7].r - d__[i__6].i * x[i__7]
00196                             .i, q__4.i = d__[i__6].r * x[i__7].i + d__[i__6]
00197                             .i * x[i__7].r;
00198                     q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
00199                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00200                     i__2 = *n - 1;
00201                     for (i__ = 2; i__ <= i__2; ++i__) {
00202                         i__3 = i__ + j * b_dim1;
00203                         i__4 = i__ + j * b_dim1;
00204                         i__5 = i__ - 1;
00205                         i__6 = i__ - 1 + j * x_dim1;
00206                         q__4.r = dl[i__5].r * x[i__6].r - dl[i__5].i * x[i__6]
00207                                 .i, q__4.i = dl[i__5].r * x[i__6].i + dl[i__5]
00208                                 .i * x[i__6].r;
00209                         q__3.r = b[i__4].r + q__4.r, q__3.i = b[i__4].i + 
00210                                 q__4.i;
00211                         i__7 = i__;
00212                         i__8 = i__ + j * x_dim1;
00213                         q__5.r = d__[i__7].r * x[i__8].r - d__[i__7].i * x[
00214                                 i__8].i, q__5.i = d__[i__7].r * x[i__8].i + 
00215                                 d__[i__7].i * x[i__8].r;
00216                         q__2.r = q__3.r + q__5.r, q__2.i = q__3.i + q__5.i;
00217                         i__9 = i__;
00218                         i__10 = i__ + 1 + j * x_dim1;
00219                         q__6.r = du[i__9].r * x[i__10].r - du[i__9].i * x[
00220                                 i__10].i, q__6.i = du[i__9].r * x[i__10].i + 
00221                                 du[i__9].i * x[i__10].r;
00222                         q__1.r = q__2.r + q__6.r, q__1.i = q__2.i + q__6.i;
00223                         b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00224 /* L50: */
00225                     }
00226                 }
00227 /* L60: */
00228             }
00229         } else if (lsame_(trans, "T")) {
00230 
00231 /*           Compute B := B + A**T * X */
00232 
00233             i__1 = *nrhs;
00234             for (j = 1; j <= i__1; ++j) {
00235                 if (*n == 1) {
00236                     i__2 = j * b_dim1 + 1;
00237                     i__3 = j * b_dim1 + 1;
00238                     i__4 = j * x_dim1 + 1;
00239                     q__2.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00240                             q__2.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00241                             .r;
00242                     q__1.r = b[i__3].r + q__2.r, q__1.i = b[i__3].i + q__2.i;
00243                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00244                 } else {
00245                     i__2 = j * b_dim1 + 1;
00246                     i__3 = j * b_dim1 + 1;
00247                     i__4 = j * x_dim1 + 1;
00248                     q__3.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00249                             q__3.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00250                             .r;
00251                     q__2.r = b[i__3].r + q__3.r, q__2.i = b[i__3].i + q__3.i;
00252                     i__5 = j * x_dim1 + 2;
00253                     q__4.r = dl[1].r * x[i__5].r - dl[1].i * x[i__5].i, 
00254                             q__4.i = dl[1].r * x[i__5].i + dl[1].i * x[i__5]
00255                             .r;
00256                     q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
00257                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00258                     i__2 = *n + j * b_dim1;
00259                     i__3 = *n + j * b_dim1;
00260                     i__4 = *n - 1;
00261                     i__5 = *n - 1 + j * x_dim1;
00262                     q__3.r = du[i__4].r * x[i__5].r - du[i__4].i * x[i__5].i, 
00263                             q__3.i = du[i__4].r * x[i__5].i + du[i__4].i * x[
00264                             i__5].r;
00265                     q__2.r = b[i__3].r + q__3.r, q__2.i = b[i__3].i + q__3.i;
00266                     i__6 = *n;
00267                     i__7 = *n + j * x_dim1;
00268                     q__4.r = d__[i__6].r * x[i__7].r - d__[i__6].i * x[i__7]
00269                             .i, q__4.i = d__[i__6].r * x[i__7].i + d__[i__6]
00270                             .i * x[i__7].r;
00271                     q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
00272                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00273                     i__2 = *n - 1;
00274                     for (i__ = 2; i__ <= i__2; ++i__) {
00275                         i__3 = i__ + j * b_dim1;
00276                         i__4 = i__ + j * b_dim1;
00277                         i__5 = i__ - 1;
00278                         i__6 = i__ - 1 + j * x_dim1;
00279                         q__4.r = du[i__5].r * x[i__6].r - du[i__5].i * x[i__6]
00280                                 .i, q__4.i = du[i__5].r * x[i__6].i + du[i__5]
00281                                 .i * x[i__6].r;
00282                         q__3.r = b[i__4].r + q__4.r, q__3.i = b[i__4].i + 
00283                                 q__4.i;
00284                         i__7 = i__;
00285                         i__8 = i__ + j * x_dim1;
00286                         q__5.r = d__[i__7].r * x[i__8].r - d__[i__7].i * x[
00287                                 i__8].i, q__5.i = d__[i__7].r * x[i__8].i + 
00288                                 d__[i__7].i * x[i__8].r;
00289                         q__2.r = q__3.r + q__5.r, q__2.i = q__3.i + q__5.i;
00290                         i__9 = i__;
00291                         i__10 = i__ + 1 + j * x_dim1;
00292                         q__6.r = dl[i__9].r * x[i__10].r - dl[i__9].i * x[
00293                                 i__10].i, q__6.i = dl[i__9].r * x[i__10].i + 
00294                                 dl[i__9].i * x[i__10].r;
00295                         q__1.r = q__2.r + q__6.r, q__1.i = q__2.i + q__6.i;
00296                         b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00297 /* L70: */
00298                     }
00299                 }
00300 /* L80: */
00301             }
00302         } else if (lsame_(trans, "C")) {
00303 
00304 /*           Compute B := B + A**H * X */
00305 
00306             i__1 = *nrhs;
00307             for (j = 1; j <= i__1; ++j) {
00308                 if (*n == 1) {
00309                     i__2 = j * b_dim1 + 1;
00310                     i__3 = j * b_dim1 + 1;
00311                     r_cnjg(&q__3, &d__[1]);
00312                     i__4 = j * x_dim1 + 1;
00313                     q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, q__2.i =
00314                              q__3.r * x[i__4].i + q__3.i * x[i__4].r;
00315                     q__1.r = b[i__3].r + q__2.r, q__1.i = b[i__3].i + q__2.i;
00316                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00317                 } else {
00318                     i__2 = j * b_dim1 + 1;
00319                     i__3 = j * b_dim1 + 1;
00320                     r_cnjg(&q__4, &d__[1]);
00321                     i__4 = j * x_dim1 + 1;
00322                     q__3.r = q__4.r * x[i__4].r - q__4.i * x[i__4].i, q__3.i =
00323                              q__4.r * x[i__4].i + q__4.i * x[i__4].r;
00324                     q__2.r = b[i__3].r + q__3.r, q__2.i = b[i__3].i + q__3.i;
00325                     r_cnjg(&q__6, &dl[1]);
00326                     i__5 = j * x_dim1 + 2;
00327                     q__5.r = q__6.r * x[i__5].r - q__6.i * x[i__5].i, q__5.i =
00328                              q__6.r * x[i__5].i + q__6.i * x[i__5].r;
00329                     q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i;
00330                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00331                     i__2 = *n + j * b_dim1;
00332                     i__3 = *n + j * b_dim1;
00333                     r_cnjg(&q__4, &du[*n - 1]);
00334                     i__4 = *n - 1 + j * x_dim1;
00335                     q__3.r = q__4.r * x[i__4].r - q__4.i * x[i__4].i, q__3.i =
00336                              q__4.r * x[i__4].i + q__4.i * x[i__4].r;
00337                     q__2.r = b[i__3].r + q__3.r, q__2.i = b[i__3].i + q__3.i;
00338                     r_cnjg(&q__6, &d__[*n]);
00339                     i__5 = *n + j * x_dim1;
00340                     q__5.r = q__6.r * x[i__5].r - q__6.i * x[i__5].i, q__5.i =
00341                              q__6.r * x[i__5].i + q__6.i * x[i__5].r;
00342                     q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i;
00343                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00344                     i__2 = *n - 1;
00345                     for (i__ = 2; i__ <= i__2; ++i__) {
00346                         i__3 = i__ + j * b_dim1;
00347                         i__4 = i__ + j * b_dim1;
00348                         r_cnjg(&q__5, &du[i__ - 1]);
00349                         i__5 = i__ - 1 + j * x_dim1;
00350                         q__4.r = q__5.r * x[i__5].r - q__5.i * x[i__5].i, 
00351                                 q__4.i = q__5.r * x[i__5].i + q__5.i * x[i__5]
00352                                 .r;
00353                         q__3.r = b[i__4].r + q__4.r, q__3.i = b[i__4].i + 
00354                                 q__4.i;
00355                         r_cnjg(&q__7, &d__[i__]);
00356                         i__6 = i__ + j * x_dim1;
00357                         q__6.r = q__7.r * x[i__6].r - q__7.i * x[i__6].i, 
00358                                 q__6.i = q__7.r * x[i__6].i + q__7.i * x[i__6]
00359                                 .r;
00360                         q__2.r = q__3.r + q__6.r, q__2.i = q__3.i + q__6.i;
00361                         r_cnjg(&q__9, &dl[i__]);
00362                         i__7 = i__ + 1 + j * x_dim1;
00363                         q__8.r = q__9.r * x[i__7].r - q__9.i * x[i__7].i, 
00364                                 q__8.i = q__9.r * x[i__7].i + q__9.i * x[i__7]
00365                                 .r;
00366                         q__1.r = q__2.r + q__8.r, q__1.i = q__2.i + q__8.i;
00367                         b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00368 /* L90: */
00369                     }
00370                 }
00371 /* L100: */
00372             }
00373         }
00374     } else if (*alpha == -1.f) {
00375         if (lsame_(trans, "N")) {
00376 
00377 /*           Compute B := B - A*X */
00378 
00379             i__1 = *nrhs;
00380             for (j = 1; j <= i__1; ++j) {
00381                 if (*n == 1) {
00382                     i__2 = j * b_dim1 + 1;
00383                     i__3 = j * b_dim1 + 1;
00384                     i__4 = j * x_dim1 + 1;
00385                     q__2.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00386                             q__2.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00387                             .r;
00388                     q__1.r = b[i__3].r - q__2.r, q__1.i = b[i__3].i - q__2.i;
00389                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00390                 } else {
00391                     i__2 = j * b_dim1 + 1;
00392                     i__3 = j * b_dim1 + 1;
00393                     i__4 = j * x_dim1 + 1;
00394                     q__3.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00395                             q__3.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00396                             .r;
00397                     q__2.r = b[i__3].r - q__3.r, q__2.i = b[i__3].i - q__3.i;
00398                     i__5 = j * x_dim1 + 2;
00399                     q__4.r = du[1].r * x[i__5].r - du[1].i * x[i__5].i, 
00400                             q__4.i = du[1].r * x[i__5].i + du[1].i * x[i__5]
00401                             .r;
00402                     q__1.r = q__2.r - q__4.r, q__1.i = q__2.i - q__4.i;
00403                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00404                     i__2 = *n + j * b_dim1;
00405                     i__3 = *n + j * b_dim1;
00406                     i__4 = *n - 1;
00407                     i__5 = *n - 1 + j * x_dim1;
00408                     q__3.r = dl[i__4].r * x[i__5].r - dl[i__4].i * x[i__5].i, 
00409                             q__3.i = dl[i__4].r * x[i__5].i + dl[i__4].i * x[
00410                             i__5].r;
00411                     q__2.r = b[i__3].r - q__3.r, q__2.i = b[i__3].i - q__3.i;
00412                     i__6 = *n;
00413                     i__7 = *n + j * x_dim1;
00414                     q__4.r = d__[i__6].r * x[i__7].r - d__[i__6].i * x[i__7]
00415                             .i, q__4.i = d__[i__6].r * x[i__7].i + d__[i__6]
00416                             .i * x[i__7].r;
00417                     q__1.r = q__2.r - q__4.r, q__1.i = q__2.i - q__4.i;
00418                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00419                     i__2 = *n - 1;
00420                     for (i__ = 2; i__ <= i__2; ++i__) {
00421                         i__3 = i__ + j * b_dim1;
00422                         i__4 = i__ + j * b_dim1;
00423                         i__5 = i__ - 1;
00424                         i__6 = i__ - 1 + j * x_dim1;
00425                         q__4.r = dl[i__5].r * x[i__6].r - dl[i__5].i * x[i__6]
00426                                 .i, q__4.i = dl[i__5].r * x[i__6].i + dl[i__5]
00427                                 .i * x[i__6].r;
00428                         q__3.r = b[i__4].r - q__4.r, q__3.i = b[i__4].i - 
00429                                 q__4.i;
00430                         i__7 = i__;
00431                         i__8 = i__ + j * x_dim1;
00432                         q__5.r = d__[i__7].r * x[i__8].r - d__[i__7].i * x[
00433                                 i__8].i, q__5.i = d__[i__7].r * x[i__8].i + 
00434                                 d__[i__7].i * x[i__8].r;
00435                         q__2.r = q__3.r - q__5.r, q__2.i = q__3.i - q__5.i;
00436                         i__9 = i__;
00437                         i__10 = i__ + 1 + j * x_dim1;
00438                         q__6.r = du[i__9].r * x[i__10].r - du[i__9].i * x[
00439                                 i__10].i, q__6.i = du[i__9].r * x[i__10].i + 
00440                                 du[i__9].i * x[i__10].r;
00441                         q__1.r = q__2.r - q__6.r, q__1.i = q__2.i - q__6.i;
00442                         b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00443 /* L110: */
00444                     }
00445                 }
00446 /* L120: */
00447             }
00448         } else if (lsame_(trans, "T")) {
00449 
00450 /*           Compute B := B - A'*X */
00451 
00452             i__1 = *nrhs;
00453             for (j = 1; j <= i__1; ++j) {
00454                 if (*n == 1) {
00455                     i__2 = j * b_dim1 + 1;
00456                     i__3 = j * b_dim1 + 1;
00457                     i__4 = j * x_dim1 + 1;
00458                     q__2.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00459                             q__2.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00460                             .r;
00461                     q__1.r = b[i__3].r - q__2.r, q__1.i = b[i__3].i - q__2.i;
00462                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00463                 } else {
00464                     i__2 = j * b_dim1 + 1;
00465                     i__3 = j * b_dim1 + 1;
00466                     i__4 = j * x_dim1 + 1;
00467                     q__3.r = d__[1].r * x[i__4].r - d__[1].i * x[i__4].i, 
00468                             q__3.i = d__[1].r * x[i__4].i + d__[1].i * x[i__4]
00469                             .r;
00470                     q__2.r = b[i__3].r - q__3.r, q__2.i = b[i__3].i - q__3.i;
00471                     i__5 = j * x_dim1 + 2;
00472                     q__4.r = dl[1].r * x[i__5].r - dl[1].i * x[i__5].i, 
00473                             q__4.i = dl[1].r * x[i__5].i + dl[1].i * x[i__5]
00474                             .r;
00475                     q__1.r = q__2.r - q__4.r, q__1.i = q__2.i - q__4.i;
00476                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00477                     i__2 = *n + j * b_dim1;
00478                     i__3 = *n + j * b_dim1;
00479                     i__4 = *n - 1;
00480                     i__5 = *n - 1 + j * x_dim1;
00481                     q__3.r = du[i__4].r * x[i__5].r - du[i__4].i * x[i__5].i, 
00482                             q__3.i = du[i__4].r * x[i__5].i + du[i__4].i * x[
00483                             i__5].r;
00484                     q__2.r = b[i__3].r - q__3.r, q__2.i = b[i__3].i - q__3.i;
00485                     i__6 = *n;
00486                     i__7 = *n + j * x_dim1;
00487                     q__4.r = d__[i__6].r * x[i__7].r - d__[i__6].i * x[i__7]
00488                             .i, q__4.i = d__[i__6].r * x[i__7].i + d__[i__6]
00489                             .i * x[i__7].r;
00490                     q__1.r = q__2.r - q__4.r, q__1.i = q__2.i - q__4.i;
00491                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00492                     i__2 = *n - 1;
00493                     for (i__ = 2; i__ <= i__2; ++i__) {
00494                         i__3 = i__ + j * b_dim1;
00495                         i__4 = i__ + j * b_dim1;
00496                         i__5 = i__ - 1;
00497                         i__6 = i__ - 1 + j * x_dim1;
00498                         q__4.r = du[i__5].r * x[i__6].r - du[i__5].i * x[i__6]
00499                                 .i, q__4.i = du[i__5].r * x[i__6].i + du[i__5]
00500                                 .i * x[i__6].r;
00501                         q__3.r = b[i__4].r - q__4.r, q__3.i = b[i__4].i - 
00502                                 q__4.i;
00503                         i__7 = i__;
00504                         i__8 = i__ + j * x_dim1;
00505                         q__5.r = d__[i__7].r * x[i__8].r - d__[i__7].i * x[
00506                                 i__8].i, q__5.i = d__[i__7].r * x[i__8].i + 
00507                                 d__[i__7].i * x[i__8].r;
00508                         q__2.r = q__3.r - q__5.r, q__2.i = q__3.i - q__5.i;
00509                         i__9 = i__;
00510                         i__10 = i__ + 1 + j * x_dim1;
00511                         q__6.r = dl[i__9].r * x[i__10].r - dl[i__9].i * x[
00512                                 i__10].i, q__6.i = dl[i__9].r * x[i__10].i + 
00513                                 dl[i__9].i * x[i__10].r;
00514                         q__1.r = q__2.r - q__6.r, q__1.i = q__2.i - q__6.i;
00515                         b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00516 /* L130: */
00517                     }
00518                 }
00519 /* L140: */
00520             }
00521         } else if (lsame_(trans, "C")) {
00522 
00523 /*           Compute B := B - A'*X */
00524 
00525             i__1 = *nrhs;
00526             for (j = 1; j <= i__1; ++j) {
00527                 if (*n == 1) {
00528                     i__2 = j * b_dim1 + 1;
00529                     i__3 = j * b_dim1 + 1;
00530                     r_cnjg(&q__3, &d__[1]);
00531                     i__4 = j * x_dim1 + 1;
00532                     q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, q__2.i =
00533                              q__3.r * x[i__4].i + q__3.i * x[i__4].r;
00534                     q__1.r = b[i__3].r - q__2.r, q__1.i = b[i__3].i - q__2.i;
00535                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00536                 } else {
00537                     i__2 = j * b_dim1 + 1;
00538                     i__3 = j * b_dim1 + 1;
00539                     r_cnjg(&q__4, &d__[1]);
00540                     i__4 = j * x_dim1 + 1;
00541                     q__3.r = q__4.r * x[i__4].r - q__4.i * x[i__4].i, q__3.i =
00542                              q__4.r * x[i__4].i + q__4.i * x[i__4].r;
00543                     q__2.r = b[i__3].r - q__3.r, q__2.i = b[i__3].i - q__3.i;
00544                     r_cnjg(&q__6, &dl[1]);
00545                     i__5 = j * x_dim1 + 2;
00546                     q__5.r = q__6.r * x[i__5].r - q__6.i * x[i__5].i, q__5.i =
00547                              q__6.r * x[i__5].i + q__6.i * x[i__5].r;
00548                     q__1.r = q__2.r - q__5.r, q__1.i = q__2.i - q__5.i;
00549                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00550                     i__2 = *n + j * b_dim1;
00551                     i__3 = *n + j * b_dim1;
00552                     r_cnjg(&q__4, &du[*n - 1]);
00553                     i__4 = *n - 1 + j * x_dim1;
00554                     q__3.r = q__4.r * x[i__4].r - q__4.i * x[i__4].i, q__3.i =
00555                              q__4.r * x[i__4].i + q__4.i * x[i__4].r;
00556                     q__2.r = b[i__3].r - q__3.r, q__2.i = b[i__3].i - q__3.i;
00557                     r_cnjg(&q__6, &d__[*n]);
00558                     i__5 = *n + j * x_dim1;
00559                     q__5.r = q__6.r * x[i__5].r - q__6.i * x[i__5].i, q__5.i =
00560                              q__6.r * x[i__5].i + q__6.i * x[i__5].r;
00561                     q__1.r = q__2.r - q__5.r, q__1.i = q__2.i - q__5.i;
00562                     b[i__2].r = q__1.r, b[i__2].i = q__1.i;
00563                     i__2 = *n - 1;
00564                     for (i__ = 2; i__ <= i__2; ++i__) {
00565                         i__3 = i__ + j * b_dim1;
00566                         i__4 = i__ + j * b_dim1;
00567                         r_cnjg(&q__5, &du[i__ - 1]);
00568                         i__5 = i__ - 1 + j * x_dim1;
00569                         q__4.r = q__5.r * x[i__5].r - q__5.i * x[i__5].i, 
00570                                 q__4.i = q__5.r * x[i__5].i + q__5.i * x[i__5]
00571                                 .r;
00572                         q__3.r = b[i__4].r - q__4.r, q__3.i = b[i__4].i - 
00573                                 q__4.i;
00574                         r_cnjg(&q__7, &d__[i__]);
00575                         i__6 = i__ + j * x_dim1;
00576                         q__6.r = q__7.r * x[i__6].r - q__7.i * x[i__6].i, 
00577                                 q__6.i = q__7.r * x[i__6].i + q__7.i * x[i__6]
00578                                 .r;
00579                         q__2.r = q__3.r - q__6.r, q__2.i = q__3.i - q__6.i;
00580                         r_cnjg(&q__9, &dl[i__]);
00581                         i__7 = i__ + 1 + j * x_dim1;
00582                         q__8.r = q__9.r * x[i__7].r - q__9.i * x[i__7].i, 
00583                                 q__8.i = q__9.r * x[i__7].i + q__9.i * x[i__7]
00584                                 .r;
00585                         q__1.r = q__2.r - q__8.r, q__1.i = q__2.i - q__8.i;
00586                         b[i__3].r = q__1.r, b[i__3].i = q__1.i;
00587 /* L150: */
00588                     }
00589                 }
00590 /* L160: */
00591             }
00592         }
00593     }
00594     return 0;
00595 
00596 /*     End of CLAGTM */
00597 
00598 } /* clagtm_ */


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