clasr.c
Go to the documentation of this file.
00001 /* clasr.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 clasr_(char *side, char *pivot, char *direct, integer *m, 
00017          integer *n, real *c__, real *s, complex *a, integer *lda)
00018 {
00019     /* System generated locals */
00020     integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
00021     complex q__1, q__2, q__3;
00022 
00023     /* Local variables */
00024     integer i__, j, info;
00025     complex temp;
00026     extern logical lsame_(char *, char *);
00027     real ctemp, stemp;
00028     extern /* Subroutine */ int xerbla_(char *, integer *);
00029 
00030 
00031 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00032 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00033 /*     November 2006 */
00034 
00035 /*     .. Scalar Arguments .. */
00036 /*     .. */
00037 /*     .. Array Arguments .. */
00038 /*     .. */
00039 
00040 /*  Purpose */
00041 /*  ======= */
00042 
00043 /*  CLASR applies a sequence of real plane rotations to a complex matrix */
00044 /*  A, from either the left or the right. */
00045 
00046 /*  When SIDE = 'L', the transformation takes the form */
00047 
00048 /*     A := P*A */
00049 
00050 /*  and when SIDE = 'R', the transformation takes the form */
00051 
00052 /*     A := A*P**T */
00053 
00054 /*  where P is an orthogonal matrix consisting of a sequence of z plane */
00055 /*  rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R', */
00056 /*  and P**T is the transpose of P. */
00057 
00058 /*  When DIRECT = 'F' (Forward sequence), then */
00059 
00060 /*     P = P(z-1) * ... * P(2) * P(1) */
00061 
00062 /*  and when DIRECT = 'B' (Backward sequence), then */
00063 
00064 /*     P = P(1) * P(2) * ... * P(z-1) */
00065 
00066 /*  where P(k) is a plane rotation matrix defined by the 2-by-2 rotation */
00067 
00068 /*     R(k) = (  c(k)  s(k) ) */
00069 /*          = ( -s(k)  c(k) ). */
00070 
00071 /*  When PIVOT = 'V' (Variable pivot), the rotation is performed */
00072 /*  for the plane (k,k+1), i.e., P(k) has the form */
00073 
00074 /*     P(k) = (  1                                            ) */
00075 /*            (       ...                                     ) */
00076 /*            (              1                                ) */
00077 /*            (                   c(k)  s(k)                  ) */
00078 /*            (                  -s(k)  c(k)                  ) */
00079 /*            (                                1              ) */
00080 /*            (                                     ...       ) */
00081 /*            (                                            1  ) */
00082 
00083 /*  where R(k) appears as a rank-2 modification to the identity matrix in */
00084 /*  rows and columns k and k+1. */
00085 
00086 /*  When PIVOT = 'T' (Top pivot), the rotation is performed for the */
00087 /*  plane (1,k+1), so P(k) has the form */
00088 
00089 /*     P(k) = (  c(k)                    s(k)                 ) */
00090 /*            (         1                                     ) */
00091 /*            (              ...                              ) */
00092 /*            (                     1                         ) */
00093 /*            ( -s(k)                    c(k)                 ) */
00094 /*            (                                 1             ) */
00095 /*            (                                      ...      ) */
00096 /*            (                                             1 ) */
00097 
00098 /*  where R(k) appears in rows and columns 1 and k+1. */
00099 
00100 /*  Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is */
00101 /*  performed for the plane (k,z), giving P(k) the form */
00102 
00103 /*     P(k) = ( 1                                             ) */
00104 /*            (      ...                                      ) */
00105 /*            (             1                                 ) */
00106 /*            (                  c(k)                    s(k) ) */
00107 /*            (                         1                     ) */
00108 /*            (                              ...              ) */
00109 /*            (                                     1         ) */
00110 /*            (                 -s(k)                    c(k) ) */
00111 
00112 /*  where R(k) appears in rows and columns k and z.  The rotations are */
00113 /*  performed without ever forming P(k) explicitly. */
00114 
00115 /*  Arguments */
00116 /*  ========= */
00117 
00118 /*  SIDE    (input) CHARACTER*1 */
00119 /*          Specifies whether the plane rotation matrix P is applied to */
00120 /*          A on the left or the right. */
00121 /*          = 'L':  Left, compute A := P*A */
00122 /*          = 'R':  Right, compute A:= A*P**T */
00123 
00124 /*  PIVOT   (input) CHARACTER*1 */
00125 /*          Specifies the plane for which P(k) is a plane rotation */
00126 /*          matrix. */
00127 /*          = 'V':  Variable pivot, the plane (k,k+1) */
00128 /*          = 'T':  Top pivot, the plane (1,k+1) */
00129 /*          = 'B':  Bottom pivot, the plane (k,z) */
00130 
00131 /*  DIRECT  (input) CHARACTER*1 */
00132 /*          Specifies whether P is a forward or backward sequence of */
00133 /*          plane rotations. */
00134 /*          = 'F':  Forward, P = P(z-1)*...*P(2)*P(1) */
00135 /*          = 'B':  Backward, P = P(1)*P(2)*...*P(z-1) */
00136 
00137 /*  M       (input) INTEGER */
00138 /*          The number of rows of the matrix A.  If m <= 1, an immediate */
00139 /*          return is effected. */
00140 
00141 /*  N       (input) INTEGER */
00142 /*          The number of columns of the matrix A.  If n <= 1, an */
00143 /*          immediate return is effected. */
00144 
00145 /*  C       (input) REAL array, dimension */
00146 /*                  (M-1) if SIDE = 'L' */
00147 /*                  (N-1) if SIDE = 'R' */
00148 /*          The cosines c(k) of the plane rotations. */
00149 
00150 /*  S       (input) REAL array, dimension */
00151 /*                  (M-1) if SIDE = 'L' */
00152 /*                  (N-1) if SIDE = 'R' */
00153 /*          The sines s(k) of the plane rotations.  The 2-by-2 plane */
00154 /*          rotation part of the matrix P(k), R(k), has the form */
00155 /*          R(k) = (  c(k)  s(k) ) */
00156 /*                 ( -s(k)  c(k) ). */
00157 
00158 /*  A       (input/output) COMPLEX array, dimension (LDA,N) */
00159 /*          The M-by-N matrix A.  On exit, A is overwritten by P*A if */
00160 /*          SIDE = 'R' or by A*P**T if SIDE = 'L'. */
00161 
00162 /*  LDA     (input) INTEGER */
00163 /*          The leading dimension of the array A.  LDA >= max(1,M). */
00164 
00165 /*  ===================================================================== */
00166 
00167 /*     .. Parameters .. */
00168 /*     .. */
00169 /*     .. Local Scalars .. */
00170 /*     .. */
00171 /*     .. Intrinsic Functions .. */
00172 /*     .. */
00173 /*     .. External Functions .. */
00174 /*     .. */
00175 /*     .. External Subroutines .. */
00176 /*     .. */
00177 /*     .. Executable Statements .. */
00178 
00179 /*     Test the input parameters */
00180 
00181     /* Parameter adjustments */
00182     --c__;
00183     --s;
00184     a_dim1 = *lda;
00185     a_offset = 1 + a_dim1;
00186     a -= a_offset;
00187 
00188     /* Function Body */
00189     info = 0;
00190     if (! (lsame_(side, "L") || lsame_(side, "R"))) {
00191         info = 1;
00192     } else if (! (lsame_(pivot, "V") || lsame_(pivot, 
00193             "T") || lsame_(pivot, "B"))) {
00194         info = 2;
00195     } else if (! (lsame_(direct, "F") || lsame_(direct, 
00196             "B"))) {
00197         info = 3;
00198     } else if (*m < 0) {
00199         info = 4;
00200     } else if (*n < 0) {
00201         info = 5;
00202     } else if (*lda < max(1,*m)) {
00203         info = 9;
00204     }
00205     if (info != 0) {
00206         xerbla_("CLASR ", &info);
00207         return 0;
00208     }
00209 
00210 /*     Quick return if possible */
00211 
00212     if (*m == 0 || *n == 0) {
00213         return 0;
00214     }
00215     if (lsame_(side, "L")) {
00216 
00217 /*        Form  P * A */
00218 
00219         if (lsame_(pivot, "V")) {
00220             if (lsame_(direct, "F")) {
00221                 i__1 = *m - 1;
00222                 for (j = 1; j <= i__1; ++j) {
00223                     ctemp = c__[j];
00224                     stemp = s[j];
00225                     if (ctemp != 1.f || stemp != 0.f) {
00226                         i__2 = *n;
00227                         for (i__ = 1; i__ <= i__2; ++i__) {
00228                             i__3 = j + 1 + i__ * a_dim1;
00229                             temp.r = a[i__3].r, temp.i = a[i__3].i;
00230                             i__3 = j + 1 + i__ * a_dim1;
00231                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00232                             i__4 = j + i__ * a_dim1;
00233                             q__3.r = stemp * a[i__4].r, q__3.i = stemp * a[
00234                                     i__4].i;
00235                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00236                                     q__3.i;
00237                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00238                             i__3 = j + i__ * a_dim1;
00239                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00240                             i__4 = j + i__ * a_dim1;
00241                             q__3.r = ctemp * a[i__4].r, q__3.i = ctemp * a[
00242                                     i__4].i;
00243                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00244                                     q__3.i;
00245                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00246 /* L10: */
00247                         }
00248                     }
00249 /* L20: */
00250                 }
00251             } else if (lsame_(direct, "B")) {
00252                 for (j = *m - 1; j >= 1; --j) {
00253                     ctemp = c__[j];
00254                     stemp = s[j];
00255                     if (ctemp != 1.f || stemp != 0.f) {
00256                         i__1 = *n;
00257                         for (i__ = 1; i__ <= i__1; ++i__) {
00258                             i__2 = j + 1 + i__ * a_dim1;
00259                             temp.r = a[i__2].r, temp.i = a[i__2].i;
00260                             i__2 = j + 1 + i__ * a_dim1;
00261                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00262                             i__3 = j + i__ * a_dim1;
00263                             q__3.r = stemp * a[i__3].r, q__3.i = stemp * a[
00264                                     i__3].i;
00265                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00266                                     q__3.i;
00267                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00268                             i__2 = j + i__ * a_dim1;
00269                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00270                             i__3 = j + i__ * a_dim1;
00271                             q__3.r = ctemp * a[i__3].r, q__3.i = ctemp * a[
00272                                     i__3].i;
00273                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00274                                     q__3.i;
00275                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00276 /* L30: */
00277                         }
00278                     }
00279 /* L40: */
00280                 }
00281             }
00282         } else if (lsame_(pivot, "T")) {
00283             if (lsame_(direct, "F")) {
00284                 i__1 = *m;
00285                 for (j = 2; j <= i__1; ++j) {
00286                     ctemp = c__[j - 1];
00287                     stemp = s[j - 1];
00288                     if (ctemp != 1.f || stemp != 0.f) {
00289                         i__2 = *n;
00290                         for (i__ = 1; i__ <= i__2; ++i__) {
00291                             i__3 = j + i__ * a_dim1;
00292                             temp.r = a[i__3].r, temp.i = a[i__3].i;
00293                             i__3 = j + i__ * a_dim1;
00294                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00295                             i__4 = i__ * a_dim1 + 1;
00296                             q__3.r = stemp * a[i__4].r, q__3.i = stemp * a[
00297                                     i__4].i;
00298                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00299                                     q__3.i;
00300                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00301                             i__3 = i__ * a_dim1 + 1;
00302                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00303                             i__4 = i__ * a_dim1 + 1;
00304                             q__3.r = ctemp * a[i__4].r, q__3.i = ctemp * a[
00305                                     i__4].i;
00306                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00307                                     q__3.i;
00308                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00309 /* L50: */
00310                         }
00311                     }
00312 /* L60: */
00313                 }
00314             } else if (lsame_(direct, "B")) {
00315                 for (j = *m; j >= 2; --j) {
00316                     ctemp = c__[j - 1];
00317                     stemp = s[j - 1];
00318                     if (ctemp != 1.f || stemp != 0.f) {
00319                         i__1 = *n;
00320                         for (i__ = 1; i__ <= i__1; ++i__) {
00321                             i__2 = j + i__ * a_dim1;
00322                             temp.r = a[i__2].r, temp.i = a[i__2].i;
00323                             i__2 = j + i__ * a_dim1;
00324                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00325                             i__3 = i__ * a_dim1 + 1;
00326                             q__3.r = stemp * a[i__3].r, q__3.i = stemp * a[
00327                                     i__3].i;
00328                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00329                                     q__3.i;
00330                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00331                             i__2 = i__ * a_dim1 + 1;
00332                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00333                             i__3 = i__ * a_dim1 + 1;
00334                             q__3.r = ctemp * a[i__3].r, q__3.i = ctemp * a[
00335                                     i__3].i;
00336                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00337                                     q__3.i;
00338                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00339 /* L70: */
00340                         }
00341                     }
00342 /* L80: */
00343                 }
00344             }
00345         } else if (lsame_(pivot, "B")) {
00346             if (lsame_(direct, "F")) {
00347                 i__1 = *m - 1;
00348                 for (j = 1; j <= i__1; ++j) {
00349                     ctemp = c__[j];
00350                     stemp = s[j];
00351                     if (ctemp != 1.f || stemp != 0.f) {
00352                         i__2 = *n;
00353                         for (i__ = 1; i__ <= i__2; ++i__) {
00354                             i__3 = j + i__ * a_dim1;
00355                             temp.r = a[i__3].r, temp.i = a[i__3].i;
00356                             i__3 = j + i__ * a_dim1;
00357                             i__4 = *m + i__ * a_dim1;
00358                             q__2.r = stemp * a[i__4].r, q__2.i = stemp * a[
00359                                     i__4].i;
00360                             q__3.r = ctemp * temp.r, q__3.i = ctemp * temp.i;
00361                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00362                                     q__3.i;
00363                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00364                             i__3 = *m + i__ * a_dim1;
00365                             i__4 = *m + i__ * a_dim1;
00366                             q__2.r = ctemp * a[i__4].r, q__2.i = ctemp * a[
00367                                     i__4].i;
00368                             q__3.r = stemp * temp.r, q__3.i = stemp * temp.i;
00369                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00370                                     q__3.i;
00371                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00372 /* L90: */
00373                         }
00374                     }
00375 /* L100: */
00376                 }
00377             } else if (lsame_(direct, "B")) {
00378                 for (j = *m - 1; j >= 1; --j) {
00379                     ctemp = c__[j];
00380                     stemp = s[j];
00381                     if (ctemp != 1.f || stemp != 0.f) {
00382                         i__1 = *n;
00383                         for (i__ = 1; i__ <= i__1; ++i__) {
00384                             i__2 = j + i__ * a_dim1;
00385                             temp.r = a[i__2].r, temp.i = a[i__2].i;
00386                             i__2 = j + i__ * a_dim1;
00387                             i__3 = *m + i__ * a_dim1;
00388                             q__2.r = stemp * a[i__3].r, q__2.i = stemp * a[
00389                                     i__3].i;
00390                             q__3.r = ctemp * temp.r, q__3.i = ctemp * temp.i;
00391                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00392                                     q__3.i;
00393                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00394                             i__2 = *m + i__ * a_dim1;
00395                             i__3 = *m + i__ * a_dim1;
00396                             q__2.r = ctemp * a[i__3].r, q__2.i = ctemp * a[
00397                                     i__3].i;
00398                             q__3.r = stemp * temp.r, q__3.i = stemp * temp.i;
00399                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00400                                     q__3.i;
00401                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00402 /* L110: */
00403                         }
00404                     }
00405 /* L120: */
00406                 }
00407             }
00408         }
00409     } else if (lsame_(side, "R")) {
00410 
00411 /*        Form A * P' */
00412 
00413         if (lsame_(pivot, "V")) {
00414             if (lsame_(direct, "F")) {
00415                 i__1 = *n - 1;
00416                 for (j = 1; j <= i__1; ++j) {
00417                     ctemp = c__[j];
00418                     stemp = s[j];
00419                     if (ctemp != 1.f || stemp != 0.f) {
00420                         i__2 = *m;
00421                         for (i__ = 1; i__ <= i__2; ++i__) {
00422                             i__3 = i__ + (j + 1) * a_dim1;
00423                             temp.r = a[i__3].r, temp.i = a[i__3].i;
00424                             i__3 = i__ + (j + 1) * a_dim1;
00425                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00426                             i__4 = i__ + j * a_dim1;
00427                             q__3.r = stemp * a[i__4].r, q__3.i = stemp * a[
00428                                     i__4].i;
00429                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00430                                     q__3.i;
00431                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00432                             i__3 = i__ + j * a_dim1;
00433                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00434                             i__4 = i__ + j * a_dim1;
00435                             q__3.r = ctemp * a[i__4].r, q__3.i = ctemp * a[
00436                                     i__4].i;
00437                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00438                                     q__3.i;
00439                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00440 /* L130: */
00441                         }
00442                     }
00443 /* L140: */
00444                 }
00445             } else if (lsame_(direct, "B")) {
00446                 for (j = *n - 1; j >= 1; --j) {
00447                     ctemp = c__[j];
00448                     stemp = s[j];
00449                     if (ctemp != 1.f || stemp != 0.f) {
00450                         i__1 = *m;
00451                         for (i__ = 1; i__ <= i__1; ++i__) {
00452                             i__2 = i__ + (j + 1) * a_dim1;
00453                             temp.r = a[i__2].r, temp.i = a[i__2].i;
00454                             i__2 = i__ + (j + 1) * a_dim1;
00455                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00456                             i__3 = i__ + j * a_dim1;
00457                             q__3.r = stemp * a[i__3].r, q__3.i = stemp * a[
00458                                     i__3].i;
00459                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00460                                     q__3.i;
00461                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00462                             i__2 = i__ + j * a_dim1;
00463                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00464                             i__3 = i__ + j * a_dim1;
00465                             q__3.r = ctemp * a[i__3].r, q__3.i = ctemp * a[
00466                                     i__3].i;
00467                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00468                                     q__3.i;
00469                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00470 /* L150: */
00471                         }
00472                     }
00473 /* L160: */
00474                 }
00475             }
00476         } else if (lsame_(pivot, "T")) {
00477             if (lsame_(direct, "F")) {
00478                 i__1 = *n;
00479                 for (j = 2; j <= i__1; ++j) {
00480                     ctemp = c__[j - 1];
00481                     stemp = s[j - 1];
00482                     if (ctemp != 1.f || stemp != 0.f) {
00483                         i__2 = *m;
00484                         for (i__ = 1; i__ <= i__2; ++i__) {
00485                             i__3 = i__ + j * a_dim1;
00486                             temp.r = a[i__3].r, temp.i = a[i__3].i;
00487                             i__3 = i__ + j * a_dim1;
00488                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00489                             i__4 = i__ + a_dim1;
00490                             q__3.r = stemp * a[i__4].r, q__3.i = stemp * a[
00491                                     i__4].i;
00492                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00493                                     q__3.i;
00494                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00495                             i__3 = i__ + a_dim1;
00496                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00497                             i__4 = i__ + a_dim1;
00498                             q__3.r = ctemp * a[i__4].r, q__3.i = ctemp * a[
00499                                     i__4].i;
00500                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00501                                     q__3.i;
00502                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00503 /* L170: */
00504                         }
00505                     }
00506 /* L180: */
00507                 }
00508             } else if (lsame_(direct, "B")) {
00509                 for (j = *n; j >= 2; --j) {
00510                     ctemp = c__[j - 1];
00511                     stemp = s[j - 1];
00512                     if (ctemp != 1.f || stemp != 0.f) {
00513                         i__1 = *m;
00514                         for (i__ = 1; i__ <= i__1; ++i__) {
00515                             i__2 = i__ + j * a_dim1;
00516                             temp.r = a[i__2].r, temp.i = a[i__2].i;
00517                             i__2 = i__ + j * a_dim1;
00518                             q__2.r = ctemp * temp.r, q__2.i = ctemp * temp.i;
00519                             i__3 = i__ + a_dim1;
00520                             q__3.r = stemp * a[i__3].r, q__3.i = stemp * a[
00521                                     i__3].i;
00522                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00523                                     q__3.i;
00524                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00525                             i__2 = i__ + a_dim1;
00526                             q__2.r = stemp * temp.r, q__2.i = stemp * temp.i;
00527                             i__3 = i__ + a_dim1;
00528                             q__3.r = ctemp * a[i__3].r, q__3.i = ctemp * a[
00529                                     i__3].i;
00530                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00531                                     q__3.i;
00532                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00533 /* L190: */
00534                         }
00535                     }
00536 /* L200: */
00537                 }
00538             }
00539         } else if (lsame_(pivot, "B")) {
00540             if (lsame_(direct, "F")) {
00541                 i__1 = *n - 1;
00542                 for (j = 1; j <= i__1; ++j) {
00543                     ctemp = c__[j];
00544                     stemp = s[j];
00545                     if (ctemp != 1.f || stemp != 0.f) {
00546                         i__2 = *m;
00547                         for (i__ = 1; i__ <= i__2; ++i__) {
00548                             i__3 = i__ + j * a_dim1;
00549                             temp.r = a[i__3].r, temp.i = a[i__3].i;
00550                             i__3 = i__ + j * a_dim1;
00551                             i__4 = i__ + *n * a_dim1;
00552                             q__2.r = stemp * a[i__4].r, q__2.i = stemp * a[
00553                                     i__4].i;
00554                             q__3.r = ctemp * temp.r, q__3.i = ctemp * temp.i;
00555                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00556                                     q__3.i;
00557                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00558                             i__3 = i__ + *n * a_dim1;
00559                             i__4 = i__ + *n * a_dim1;
00560                             q__2.r = ctemp * a[i__4].r, q__2.i = ctemp * a[
00561                                     i__4].i;
00562                             q__3.r = stemp * temp.r, q__3.i = stemp * temp.i;
00563                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00564                                     q__3.i;
00565                             a[i__3].r = q__1.r, a[i__3].i = q__1.i;
00566 /* L210: */
00567                         }
00568                     }
00569 /* L220: */
00570                 }
00571             } else if (lsame_(direct, "B")) {
00572                 for (j = *n - 1; j >= 1; --j) {
00573                     ctemp = c__[j];
00574                     stemp = s[j];
00575                     if (ctemp != 1.f || stemp != 0.f) {
00576                         i__1 = *m;
00577                         for (i__ = 1; i__ <= i__1; ++i__) {
00578                             i__2 = i__ + j * a_dim1;
00579                             temp.r = a[i__2].r, temp.i = a[i__2].i;
00580                             i__2 = i__ + j * a_dim1;
00581                             i__3 = i__ + *n * a_dim1;
00582                             q__2.r = stemp * a[i__3].r, q__2.i = stemp * a[
00583                                     i__3].i;
00584                             q__3.r = ctemp * temp.r, q__3.i = ctemp * temp.i;
00585                             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + 
00586                                     q__3.i;
00587                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00588                             i__2 = i__ + *n * a_dim1;
00589                             i__3 = i__ + *n * a_dim1;
00590                             q__2.r = ctemp * a[i__3].r, q__2.i = ctemp * a[
00591                                     i__3].i;
00592                             q__3.r = stemp * temp.r, q__3.i = stemp * temp.i;
00593                             q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - 
00594                                     q__3.i;
00595                             a[i__2].r = q__1.r, a[i__2].i = q__1.i;
00596 /* L230: */
00597                         }
00598                     }
00599 /* L240: */
00600                 }
00601             }
00602         }
00603     }
00604 
00605     return 0;
00606 
00607 /*     End of CLASR */
00608 
00609 } /* clasr_ */


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