dtgsy2.c
Go to the documentation of this file.
00001 /* dtgsy2.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 /* Table of constant values */
00017 
00018 static integer c__8 = 8;
00019 static integer c__1 = 1;
00020 static doublereal c_b27 = -1.;
00021 static doublereal c_b42 = 1.;
00022 static doublereal c_b56 = 0.;
00023 
00024 /* Subroutine */ int dtgsy2_(char *trans, integer *ijob, integer *m, integer *
00025         n, doublereal *a, integer *lda, doublereal *b, integer *ldb, 
00026         doublereal *c__, integer *ldc, doublereal *d__, integer *ldd, 
00027         doublereal *e, integer *lde, doublereal *f, integer *ldf, doublereal *
00028         scale, doublereal *rdsum, doublereal *rdscal, integer *iwork, integer 
00029         *pq, integer *info)
00030 {
00031     /* System generated locals */
00032     integer a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, d_dim1, 
00033             d_offset, e_dim1, e_offset, f_dim1, f_offset, i__1, i__2, i__3;
00034 
00035     /* Local variables */
00036     integer i__, j, k, p, q;
00037     doublereal z__[64]  /* was [8][8] */;
00038     integer ie, je, mb, nb, ii, jj, is, js;
00039     doublereal rhs[8];
00040     integer isp1, jsp1;
00041     extern /* Subroutine */ int dger_(integer *, integer *, doublereal *, 
00042             doublereal *, integer *, doublereal *, integer *, doublereal *, 
00043             integer *);
00044     integer ierr, zdim, ipiv[8], jpiv[8];
00045     doublereal alpha;
00046     extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *, 
00047             integer *), dgemm_(char *, char *, integer *, integer *, integer *
00048 , doublereal *, doublereal *, integer *, doublereal *, integer *, 
00049             doublereal *, doublereal *, integer *);
00050     extern logical lsame_(char *, char *);
00051     extern /* Subroutine */ int dgemv_(char *, integer *, integer *, 
00052             doublereal *, doublereal *, integer *, doublereal *, integer *, 
00053             doublereal *, doublereal *, integer *), dcopy_(integer *, 
00054             doublereal *, integer *, doublereal *, integer *), daxpy_(integer 
00055             *, doublereal *, doublereal *, integer *, doublereal *, integer *)
00056             , dgesc2_(integer *, doublereal *, integer *, doublereal *, 
00057             integer *, integer *, doublereal *), dgetc2_(integer *, 
00058             doublereal *, integer *, integer *, integer *, integer *), 
00059             dlatdf_(integer *, integer *, doublereal *, integer *, doublereal 
00060             *, doublereal *, doublereal *, integer *, integer *);
00061     doublereal scaloc;
00062     extern /* Subroutine */ int dlaset_(char *, integer *, integer *, 
00063             doublereal *, doublereal *, doublereal *, integer *), 
00064             xerbla_(char *, integer *);
00065     logical notran;
00066 
00067 
00068 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00069 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00070 /*     January 2007 */
00071 
00072 /*     .. Scalar Arguments .. */
00073 /*     .. */
00074 /*     .. Array Arguments .. */
00075 /*     .. */
00076 
00077 /*  Purpose */
00078 /*  ======= */
00079 
00080 /*  DTGSY2 solves the generalized Sylvester equation: */
00081 
00082 /*              A * R - L * B = scale * C                (1) */
00083 /*              D * R - L * E = scale * F, */
00084 
00085 /*  using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices, */
00086 /*  (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, */
00087 /*  N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E) */
00088 /*  must be in generalized Schur canonical form, i.e. A, B are upper */
00089 /*  quasi triangular and D, E are upper triangular. The solution (R, L) */
00090 /*  overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor */
00091 /*  chosen to avoid overflow. */
00092 
00093 /*  In matrix notation solving equation (1) corresponds to solve */
00094 /*  Z*x = scale*b, where Z is defined as */
00095 
00096 /*         Z = [ kron(In, A)  -kron(B', Im) ]             (2) */
00097 /*             [ kron(In, D)  -kron(E', Im) ], */
00098 
00099 /*  Ik is the identity matrix of size k and X' is the transpose of X. */
00100 /*  kron(X, Y) is the Kronecker product between the matrices X and Y. */
00101 /*  In the process of solving (1), we solve a number of such systems */
00102 /*  where Dim(In), Dim(In) = 1 or 2. */
00103 
00104 /*  If TRANS = 'T', solve the transposed system Z'*y = scale*b for y, */
00105 /*  which is equivalent to solve for R and L in */
00106 
00107 /*              A' * R  + D' * L   = scale *  C           (3) */
00108 /*              R  * B' + L  * E'  = scale * -F */
00109 
00110 /*  This case is used to compute an estimate of Dif[(A, D), (B, E)] = */
00111 /*  sigma_min(Z) using reverse communicaton with DLACON. */
00112 
00113 /*  DTGSY2 also (IJOB >= 1) contributes to the computation in DTGSYL */
00114 /*  of an upper bound on the separation between to matrix pairs. Then */
00115 /*  the input (A, D), (B, E) are sub-pencils of the matrix pair in */
00116 /*  DTGSYL. See DTGSYL for details. */
00117 
00118 /*  Arguments */
00119 /*  ========= */
00120 
00121 /*  TRANS   (input) CHARACTER*1 */
00122 /*          = 'N', solve the generalized Sylvester equation (1). */
00123 /*          = 'T': solve the 'transposed' system (3). */
00124 
00125 /*  IJOB    (input) INTEGER */
00126 /*          Specifies what kind of functionality to be performed. */
00127 /*          = 0: solve (1) only. */
00128 /*          = 1: A contribution from this subsystem to a Frobenius */
00129 /*               norm-based estimate of the separation between two matrix */
00130 /*               pairs is computed. (look ahead strategy is used). */
00131 /*          = 2: A contribution from this subsystem to a Frobenius */
00132 /*               norm-based estimate of the separation between two matrix */
00133 /*               pairs is computed. (DGECON on sub-systems is used.) */
00134 /*          Not referenced if TRANS = 'T'. */
00135 
00136 /*  M       (input) INTEGER */
00137 /*          On entry, M specifies the order of A and D, and the row */
00138 /*          dimension of C, F, R and L. */
00139 
00140 /*  N       (input) INTEGER */
00141 /*          On entry, N specifies the order of B and E, and the column */
00142 /*          dimension of C, F, R and L. */
00143 
00144 /*  A       (input) DOUBLE PRECISION array, dimension (LDA, M) */
00145 /*          On entry, A contains an upper quasi triangular matrix. */
00146 
00147 /*  LDA     (input) INTEGER */
00148 /*          The leading dimension of the matrix A. LDA >= max(1, M). */
00149 
00150 /*  B       (input) DOUBLE PRECISION array, dimension (LDB, N) */
00151 /*          On entry, B contains an upper quasi triangular matrix. */
00152 
00153 /*  LDB     (input) INTEGER */
00154 /*          The leading dimension of the matrix B. LDB >= max(1, N). */
00155 
00156 /*  C       (input/output) DOUBLE PRECISION array, dimension (LDC, N) */
00157 /*          On entry, C contains the right-hand-side of the first matrix */
00158 /*          equation in (1). */
00159 /*          On exit, if IJOB = 0, C has been overwritten by the */
00160 /*          solution R. */
00161 
00162 /*  LDC     (input) INTEGER */
00163 /*          The leading dimension of the matrix C. LDC >= max(1, M). */
00164 
00165 /*  D       (input) DOUBLE PRECISION array, dimension (LDD, M) */
00166 /*          On entry, D contains an upper triangular matrix. */
00167 
00168 /*  LDD     (input) INTEGER */
00169 /*          The leading dimension of the matrix D. LDD >= max(1, M). */
00170 
00171 /*  E       (input) DOUBLE PRECISION array, dimension (LDE, N) */
00172 /*          On entry, E contains an upper triangular matrix. */
00173 
00174 /*  LDE     (input) INTEGER */
00175 /*          The leading dimension of the matrix E. LDE >= max(1, N). */
00176 
00177 /*  F       (input/output) DOUBLE PRECISION array, dimension (LDF, N) */
00178 /*          On entry, F contains the right-hand-side of the second matrix */
00179 /*          equation in (1). */
00180 /*          On exit, if IJOB = 0, F has been overwritten by the */
00181 /*          solution L. */
00182 
00183 /*  LDF     (input) INTEGER */
00184 /*          The leading dimension of the matrix F. LDF >= max(1, M). */
00185 
00186 /*  SCALE   (output) DOUBLE PRECISION */
00187 /*          On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions */
00188 /*          R and L (C and F on entry) will hold the solutions to a */
00189 /*          slightly perturbed system but the input matrices A, B, D and */
00190 /*          E have not been changed. If SCALE = 0, R and L will hold the */
00191 /*          solutions to the homogeneous system with C = F = 0. Normally, */
00192 /*          SCALE = 1. */
00193 
00194 /*  RDSUM   (input/output) DOUBLE PRECISION */
00195 /*          On entry, the sum of squares of computed contributions to */
00196 /*          the Dif-estimate under computation by DTGSYL, where the */
00197 /*          scaling factor RDSCAL (see below) has been factored out. */
00198 /*          On exit, the corresponding sum of squares updated with the */
00199 /*          contributions from the current sub-system. */
00200 /*          If TRANS = 'T' RDSUM is not touched. */
00201 /*          NOTE: RDSUM only makes sense when DTGSY2 is called by DTGSYL. */
00202 
00203 /*  RDSCAL  (input/output) DOUBLE PRECISION */
00204 /*          On entry, scaling factor used to prevent overflow in RDSUM. */
00205 /*          On exit, RDSCAL is updated w.r.t. the current contributions */
00206 /*          in RDSUM. */
00207 /*          If TRANS = 'T', RDSCAL is not touched. */
00208 /*          NOTE: RDSCAL only makes sense when DTGSY2 is called by */
00209 /*                DTGSYL. */
00210 
00211 /*  IWORK   (workspace) INTEGER array, dimension (M+N+2) */
00212 
00213 /*  PQ      (output) INTEGER */
00214 /*          On exit, the number of subsystems (of size 2-by-2, 4-by-4 and */
00215 /*          8-by-8) solved by this routine. */
00216 
00217 /*  INFO    (output) INTEGER */
00218 /*          On exit, if INFO is set to */
00219 /*            =0: Successful exit */
00220 /*            <0: If INFO = -i, the i-th argument had an illegal value. */
00221 /*            >0: The matrix pairs (A, D) and (B, E) have common or very */
00222 /*                close eigenvalues. */
00223 
00224 /*  Further Details */
00225 /*  =============== */
00226 
00227 /*  Based on contributions by */
00228 /*     Bo Kagstrom and Peter Poromaa, Department of Computing Science, */
00229 /*     Umea University, S-901 87 Umea, Sweden. */
00230 
00231 /*  ===================================================================== */
00232 /*  Replaced various illegal calls to DCOPY by calls to DLASET. */
00233 /*  Sven Hammarling, 27/5/02. */
00234 
00235 /*     .. Parameters .. */
00236 /*     .. */
00237 /*     .. Local Scalars .. */
00238 /*     .. */
00239 /*     .. Local Arrays .. */
00240 /*     .. */
00241 /*     .. External Functions .. */
00242 /*     .. */
00243 /*     .. External Subroutines .. */
00244 /*     .. */
00245 /*     .. Intrinsic Functions .. */
00246 /*     .. */
00247 /*     .. Executable Statements .. */
00248 
00249 /*     Decode and test input parameters */
00250 
00251     /* Parameter adjustments */
00252     a_dim1 = *lda;
00253     a_offset = 1 + a_dim1;
00254     a -= a_offset;
00255     b_dim1 = *ldb;
00256     b_offset = 1 + b_dim1;
00257     b -= b_offset;
00258     c_dim1 = *ldc;
00259     c_offset = 1 + c_dim1;
00260     c__ -= c_offset;
00261     d_dim1 = *ldd;
00262     d_offset = 1 + d_dim1;
00263     d__ -= d_offset;
00264     e_dim1 = *lde;
00265     e_offset = 1 + e_dim1;
00266     e -= e_offset;
00267     f_dim1 = *ldf;
00268     f_offset = 1 + f_dim1;
00269     f -= f_offset;
00270     --iwork;
00271 
00272     /* Function Body */
00273     *info = 0;
00274     ierr = 0;
00275     notran = lsame_(trans, "N");
00276     if (! notran && ! lsame_(trans, "T")) {
00277         *info = -1;
00278     } else if (notran) {
00279         if (*ijob < 0 || *ijob > 2) {
00280             *info = -2;
00281         }
00282     }
00283     if (*info == 0) {
00284         if (*m <= 0) {
00285             *info = -3;
00286         } else if (*n <= 0) {
00287             *info = -4;
00288         } else if (*lda < max(1,*m)) {
00289             *info = -5;
00290         } else if (*ldb < max(1,*n)) {
00291             *info = -8;
00292         } else if (*ldc < max(1,*m)) {
00293             *info = -10;
00294         } else if (*ldd < max(1,*m)) {
00295             *info = -12;
00296         } else if (*lde < max(1,*n)) {
00297             *info = -14;
00298         } else if (*ldf < max(1,*m)) {
00299             *info = -16;
00300         }
00301     }
00302     if (*info != 0) {
00303         i__1 = -(*info);
00304         xerbla_("DTGSY2", &i__1);
00305         return 0;
00306     }
00307 
00308 /*     Determine block structure of A */
00309 
00310     *pq = 0;
00311     p = 0;
00312     i__ = 1;
00313 L10:
00314     if (i__ > *m) {
00315         goto L20;
00316     }
00317     ++p;
00318     iwork[p] = i__;
00319     if (i__ == *m) {
00320         goto L20;
00321     }
00322     if (a[i__ + 1 + i__ * a_dim1] != 0.) {
00323         i__ += 2;
00324     } else {
00325         ++i__;
00326     }
00327     goto L10;
00328 L20:
00329     iwork[p + 1] = *m + 1;
00330 
00331 /*     Determine block structure of B */
00332 
00333     q = p + 1;
00334     j = 1;
00335 L30:
00336     if (j > *n) {
00337         goto L40;
00338     }
00339     ++q;
00340     iwork[q] = j;
00341     if (j == *n) {
00342         goto L40;
00343     }
00344     if (b[j + 1 + j * b_dim1] != 0.) {
00345         j += 2;
00346     } else {
00347         ++j;
00348     }
00349     goto L30;
00350 L40:
00351     iwork[q + 1] = *n + 1;
00352     *pq = p * (q - p - 1);
00353 
00354     if (notran) {
00355 
00356 /*        Solve (I, J) - subsystem */
00357 /*           A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J) */
00358 /*           D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J) */
00359 /*        for I = P, P - 1, ..., 1; J = 1, 2, ..., Q */
00360 
00361         *scale = 1.;
00362         scaloc = 1.;
00363         i__1 = q;
00364         for (j = p + 2; j <= i__1; ++j) {
00365             js = iwork[j];
00366             jsp1 = js + 1;
00367             je = iwork[j + 1] - 1;
00368             nb = je - js + 1;
00369             for (i__ = p; i__ >= 1; --i__) {
00370 
00371                 is = iwork[i__];
00372                 isp1 = is + 1;
00373                 ie = iwork[i__ + 1] - 1;
00374                 mb = ie - is + 1;
00375                 zdim = mb * nb << 1;
00376 
00377                 if (mb == 1 && nb == 1) {
00378 
00379 /*                 Build a 2-by-2 system Z * x = RHS */
00380 
00381                     z__[0] = a[is + is * a_dim1];
00382                     z__[1] = d__[is + is * d_dim1];
00383                     z__[8] = -b[js + js * b_dim1];
00384                     z__[9] = -e[js + js * e_dim1];
00385 
00386 /*                 Set up right hand side(s) */
00387 
00388                     rhs[0] = c__[is + js * c_dim1];
00389                     rhs[1] = f[is + js * f_dim1];
00390 
00391 /*                 Solve Z * x = RHS */
00392 
00393                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00394                     if (ierr > 0) {
00395                         *info = ierr;
00396                     }
00397 
00398                     if (*ijob == 0) {
00399                         dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00400                         if (scaloc != 1.) {
00401                             i__2 = *n;
00402                             for (k = 1; k <= i__2; ++k) {
00403                                 dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &
00404                                         c__1);
00405                                 dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00406 /* L50: */
00407                             }
00408                             *scale *= scaloc;
00409                         }
00410                     } else {
00411                         dlatdf_(ijob, &zdim, z__, &c__8, rhs, rdsum, rdscal, 
00412                                 ipiv, jpiv);
00413                     }
00414 
00415 /*                 Unpack solution vector(s) */
00416 
00417                     c__[is + js * c_dim1] = rhs[0];
00418                     f[is + js * f_dim1] = rhs[1];
00419 
00420 /*                 Substitute R(I, J) and L(I, J) into remaining */
00421 /*                 equation. */
00422 
00423                     if (i__ > 1) {
00424                         alpha = -rhs[0];
00425                         i__2 = is - 1;
00426                         daxpy_(&i__2, &alpha, &a[is * a_dim1 + 1], &c__1, &
00427                                 c__[js * c_dim1 + 1], &c__1);
00428                         i__2 = is - 1;
00429                         daxpy_(&i__2, &alpha, &d__[is * d_dim1 + 1], &c__1, &
00430                                 f[js * f_dim1 + 1], &c__1);
00431                     }
00432                     if (j < q) {
00433                         i__2 = *n - je;
00434                         daxpy_(&i__2, &rhs[1], &b[js + (je + 1) * b_dim1], 
00435                                 ldb, &c__[is + (je + 1) * c_dim1], ldc);
00436                         i__2 = *n - je;
00437                         daxpy_(&i__2, &rhs[1], &e[js + (je + 1) * e_dim1], 
00438                                 lde, &f[is + (je + 1) * f_dim1], ldf);
00439                     }
00440 
00441                 } else if (mb == 1 && nb == 2) {
00442 
00443 /*                 Build a 4-by-4 system Z * x = RHS */
00444 
00445                     z__[0] = a[is + is * a_dim1];
00446                     z__[1] = 0.;
00447                     z__[2] = d__[is + is * d_dim1];
00448                     z__[3] = 0.;
00449 
00450                     z__[8] = 0.;
00451                     z__[9] = a[is + is * a_dim1];
00452                     z__[10] = 0.;
00453                     z__[11] = d__[is + is * d_dim1];
00454 
00455                     z__[16] = -b[js + js * b_dim1];
00456                     z__[17] = -b[js + jsp1 * b_dim1];
00457                     z__[18] = -e[js + js * e_dim1];
00458                     z__[19] = -e[js + jsp1 * e_dim1];
00459 
00460                     z__[24] = -b[jsp1 + js * b_dim1];
00461                     z__[25] = -b[jsp1 + jsp1 * b_dim1];
00462                     z__[26] = 0.;
00463                     z__[27] = -e[jsp1 + jsp1 * e_dim1];
00464 
00465 /*                 Set up right hand side(s) */
00466 
00467                     rhs[0] = c__[is + js * c_dim1];
00468                     rhs[1] = c__[is + jsp1 * c_dim1];
00469                     rhs[2] = f[is + js * f_dim1];
00470                     rhs[3] = f[is + jsp1 * f_dim1];
00471 
00472 /*                 Solve Z * x = RHS */
00473 
00474                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00475                     if (ierr > 0) {
00476                         *info = ierr;
00477                     }
00478 
00479                     if (*ijob == 0) {
00480                         dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00481                         if (scaloc != 1.) {
00482                             i__2 = *n;
00483                             for (k = 1; k <= i__2; ++k) {
00484                                 dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &
00485                                         c__1);
00486                                 dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00487 /* L60: */
00488                             }
00489                             *scale *= scaloc;
00490                         }
00491                     } else {
00492                         dlatdf_(ijob, &zdim, z__, &c__8, rhs, rdsum, rdscal, 
00493                                 ipiv, jpiv);
00494                     }
00495 
00496 /*                 Unpack solution vector(s) */
00497 
00498                     c__[is + js * c_dim1] = rhs[0];
00499                     c__[is + jsp1 * c_dim1] = rhs[1];
00500                     f[is + js * f_dim1] = rhs[2];
00501                     f[is + jsp1 * f_dim1] = rhs[3];
00502 
00503 /*                 Substitute R(I, J) and L(I, J) into remaining */
00504 /*                 equation. */
00505 
00506                     if (i__ > 1) {
00507                         i__2 = is - 1;
00508                         dger_(&i__2, &nb, &c_b27, &a[is * a_dim1 + 1], &c__1, 
00509                                 rhs, &c__1, &c__[js * c_dim1 + 1], ldc);
00510                         i__2 = is - 1;
00511                         dger_(&i__2, &nb, &c_b27, &d__[is * d_dim1 + 1], &
00512                                 c__1, rhs, &c__1, &f[js * f_dim1 + 1], ldf);
00513                     }
00514                     if (j < q) {
00515                         i__2 = *n - je;
00516                         daxpy_(&i__2, &rhs[2], &b[js + (je + 1) * b_dim1], 
00517                                 ldb, &c__[is + (je + 1) * c_dim1], ldc);
00518                         i__2 = *n - je;
00519                         daxpy_(&i__2, &rhs[2], &e[js + (je + 1) * e_dim1], 
00520                                 lde, &f[is + (je + 1) * f_dim1], ldf);
00521                         i__2 = *n - je;
00522                         daxpy_(&i__2, &rhs[3], &b[jsp1 + (je + 1) * b_dim1], 
00523                                 ldb, &c__[is + (je + 1) * c_dim1], ldc);
00524                         i__2 = *n - je;
00525                         daxpy_(&i__2, &rhs[3], &e[jsp1 + (je + 1) * e_dim1], 
00526                                 lde, &f[is + (je + 1) * f_dim1], ldf);
00527                     }
00528 
00529                 } else if (mb == 2 && nb == 1) {
00530 
00531 /*                 Build a 4-by-4 system Z * x = RHS */
00532 
00533                     z__[0] = a[is + is * a_dim1];
00534                     z__[1] = a[isp1 + is * a_dim1];
00535                     z__[2] = d__[is + is * d_dim1];
00536                     z__[3] = 0.;
00537 
00538                     z__[8] = a[is + isp1 * a_dim1];
00539                     z__[9] = a[isp1 + isp1 * a_dim1];
00540                     z__[10] = d__[is + isp1 * d_dim1];
00541                     z__[11] = d__[isp1 + isp1 * d_dim1];
00542 
00543                     z__[16] = -b[js + js * b_dim1];
00544                     z__[17] = 0.;
00545                     z__[18] = -e[js + js * e_dim1];
00546                     z__[19] = 0.;
00547 
00548                     z__[24] = 0.;
00549                     z__[25] = -b[js + js * b_dim1];
00550                     z__[26] = 0.;
00551                     z__[27] = -e[js + js * e_dim1];
00552 
00553 /*                 Set up right hand side(s) */
00554 
00555                     rhs[0] = c__[is + js * c_dim1];
00556                     rhs[1] = c__[isp1 + js * c_dim1];
00557                     rhs[2] = f[is + js * f_dim1];
00558                     rhs[3] = f[isp1 + js * f_dim1];
00559 
00560 /*                 Solve Z * x = RHS */
00561 
00562                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00563                     if (ierr > 0) {
00564                         *info = ierr;
00565                     }
00566                     if (*ijob == 0) {
00567                         dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00568                         if (scaloc != 1.) {
00569                             i__2 = *n;
00570                             for (k = 1; k <= i__2; ++k) {
00571                                 dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &
00572                                         c__1);
00573                                 dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00574 /* L70: */
00575                             }
00576                             *scale *= scaloc;
00577                         }
00578                     } else {
00579                         dlatdf_(ijob, &zdim, z__, &c__8, rhs, rdsum, rdscal, 
00580                                 ipiv, jpiv);
00581                     }
00582 
00583 /*                 Unpack solution vector(s) */
00584 
00585                     c__[is + js * c_dim1] = rhs[0];
00586                     c__[isp1 + js * c_dim1] = rhs[1];
00587                     f[is + js * f_dim1] = rhs[2];
00588                     f[isp1 + js * f_dim1] = rhs[3];
00589 
00590 /*                 Substitute R(I, J) and L(I, J) into remaining */
00591 /*                 equation. */
00592 
00593                     if (i__ > 1) {
00594                         i__2 = is - 1;
00595                         dgemv_("N", &i__2, &mb, &c_b27, &a[is * a_dim1 + 1], 
00596                                 lda, rhs, &c__1, &c_b42, &c__[js * c_dim1 + 1]
00597 , &c__1);
00598                         i__2 = is - 1;
00599                         dgemv_("N", &i__2, &mb, &c_b27, &d__[is * d_dim1 + 1], 
00600                                  ldd, rhs, &c__1, &c_b42, &f[js * f_dim1 + 1], 
00601                                  &c__1);
00602                     }
00603                     if (j < q) {
00604                         i__2 = *n - je;
00605                         dger_(&mb, &i__2, &c_b42, &rhs[2], &c__1, &b[js + (je 
00606                                 + 1) * b_dim1], ldb, &c__[is + (je + 1) * 
00607                                 c_dim1], ldc);
00608                         i__2 = *n - je;
00609                         dger_(&mb, &i__2, &c_b42, &rhs[2], &c__1, &e[js + (je 
00610                                 + 1) * e_dim1], lde, &f[is + (je + 1) * 
00611                                 f_dim1], ldf);
00612                     }
00613 
00614                 } else if (mb == 2 && nb == 2) {
00615 
00616 /*                 Build an 8-by-8 system Z * x = RHS */
00617 
00618                     dlaset_("F", &c__8, &c__8, &c_b56, &c_b56, z__, &c__8);
00619 
00620                     z__[0] = a[is + is * a_dim1];
00621                     z__[1] = a[isp1 + is * a_dim1];
00622                     z__[4] = d__[is + is * d_dim1];
00623 
00624                     z__[8] = a[is + isp1 * a_dim1];
00625                     z__[9] = a[isp1 + isp1 * a_dim1];
00626                     z__[12] = d__[is + isp1 * d_dim1];
00627                     z__[13] = d__[isp1 + isp1 * d_dim1];
00628 
00629                     z__[18] = a[is + is * a_dim1];
00630                     z__[19] = a[isp1 + is * a_dim1];
00631                     z__[22] = d__[is + is * d_dim1];
00632 
00633                     z__[26] = a[is + isp1 * a_dim1];
00634                     z__[27] = a[isp1 + isp1 * a_dim1];
00635                     z__[30] = d__[is + isp1 * d_dim1];
00636                     z__[31] = d__[isp1 + isp1 * d_dim1];
00637 
00638                     z__[32] = -b[js + js * b_dim1];
00639                     z__[34] = -b[js + jsp1 * b_dim1];
00640                     z__[36] = -e[js + js * e_dim1];
00641                     z__[38] = -e[js + jsp1 * e_dim1];
00642 
00643                     z__[41] = -b[js + js * b_dim1];
00644                     z__[43] = -b[js + jsp1 * b_dim1];
00645                     z__[45] = -e[js + js * e_dim1];
00646                     z__[47] = -e[js + jsp1 * e_dim1];
00647 
00648                     z__[48] = -b[jsp1 + js * b_dim1];
00649                     z__[50] = -b[jsp1 + jsp1 * b_dim1];
00650                     z__[54] = -e[jsp1 + jsp1 * e_dim1];
00651 
00652                     z__[57] = -b[jsp1 + js * b_dim1];
00653                     z__[59] = -b[jsp1 + jsp1 * b_dim1];
00654                     z__[63] = -e[jsp1 + jsp1 * e_dim1];
00655 
00656 /*                 Set up right hand side(s) */
00657 
00658                     k = 1;
00659                     ii = mb * nb + 1;
00660                     i__2 = nb - 1;
00661                     for (jj = 0; jj <= i__2; ++jj) {
00662                         dcopy_(&mb, &c__[is + (js + jj) * c_dim1], &c__1, &
00663                                 rhs[k - 1], &c__1);
00664                         dcopy_(&mb, &f[is + (js + jj) * f_dim1], &c__1, &rhs[
00665                                 ii - 1], &c__1);
00666                         k += mb;
00667                         ii += mb;
00668 /* L80: */
00669                     }
00670 
00671 /*                 Solve Z * x = RHS */
00672 
00673                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00674                     if (ierr > 0) {
00675                         *info = ierr;
00676                     }
00677                     if (*ijob == 0) {
00678                         dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00679                         if (scaloc != 1.) {
00680                             i__2 = *n;
00681                             for (k = 1; k <= i__2; ++k) {
00682                                 dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &
00683                                         c__1);
00684                                 dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00685 /* L90: */
00686                             }
00687                             *scale *= scaloc;
00688                         }
00689                     } else {
00690                         dlatdf_(ijob, &zdim, z__, &c__8, rhs, rdsum, rdscal, 
00691                                 ipiv, jpiv);
00692                     }
00693 
00694 /*                 Unpack solution vector(s) */
00695 
00696                     k = 1;
00697                     ii = mb * nb + 1;
00698                     i__2 = nb - 1;
00699                     for (jj = 0; jj <= i__2; ++jj) {
00700                         dcopy_(&mb, &rhs[k - 1], &c__1, &c__[is + (js + jj) * 
00701                                 c_dim1], &c__1);
00702                         dcopy_(&mb, &rhs[ii - 1], &c__1, &f[is + (js + jj) * 
00703                                 f_dim1], &c__1);
00704                         k += mb;
00705                         ii += mb;
00706 /* L100: */
00707                     }
00708 
00709 /*                 Substitute R(I, J) and L(I, J) into remaining */
00710 /*                 equation. */
00711 
00712                     if (i__ > 1) {
00713                         i__2 = is - 1;
00714                         dgemm_("N", "N", &i__2, &nb, &mb, &c_b27, &a[is * 
00715                                 a_dim1 + 1], lda, rhs, &mb, &c_b42, &c__[js * 
00716                                 c_dim1 + 1], ldc);
00717                         i__2 = is - 1;
00718                         dgemm_("N", "N", &i__2, &nb, &mb, &c_b27, &d__[is * 
00719                                 d_dim1 + 1], ldd, rhs, &mb, &c_b42, &f[js * 
00720                                 f_dim1 + 1], ldf);
00721                     }
00722                     if (j < q) {
00723                         k = mb * nb + 1;
00724                         i__2 = *n - je;
00725                         dgemm_("N", "N", &mb, &i__2, &nb, &c_b42, &rhs[k - 1], 
00726                                  &mb, &b[js + (je + 1) * b_dim1], ldb, &c_b42, 
00727                                  &c__[is + (je + 1) * c_dim1], ldc);
00728                         i__2 = *n - je;
00729                         dgemm_("N", "N", &mb, &i__2, &nb, &c_b42, &rhs[k - 1], 
00730                                  &mb, &e[js + (je + 1) * e_dim1], lde, &c_b42, 
00731                                  &f[is + (je + 1) * f_dim1], ldf);
00732                     }
00733 
00734                 }
00735 
00736 /* L110: */
00737             }
00738 /* L120: */
00739         }
00740     } else {
00741 
00742 /*        Solve (I, J) - subsystem */
00743 /*             A(I, I)' * R(I, J) + D(I, I)' * L(J, J)  =  C(I, J) */
00744 /*             R(I, I)  * B(J, J) + L(I, J)  * E(J, J)  = -F(I, J) */
00745 /*        for I = 1, 2, ..., P, J = Q, Q - 1, ..., 1 */
00746 
00747         *scale = 1.;
00748         scaloc = 1.;
00749         i__1 = p;
00750         for (i__ = 1; i__ <= i__1; ++i__) {
00751 
00752             is = iwork[i__];
00753             isp1 = is + 1;
00754             ie = i__;
00755             mb = ie - is + 1;
00756             i__2 = p + 2;
00757             for (j = q; j >= i__2; --j) {
00758 
00759                 js = iwork[j];
00760                 jsp1 = js + 1;
00761                 je = iwork[j + 1] - 1;
00762                 nb = je - js + 1;
00763                 zdim = mb * nb << 1;
00764                 if (mb == 1 && nb == 1) {
00765 
00766 /*                 Build a 2-by-2 system Z' * x = RHS */
00767 
00768                     z__[0] = a[is + is * a_dim1];
00769                     z__[1] = -b[js + js * b_dim1];
00770                     z__[8] = d__[is + is * d_dim1];
00771                     z__[9] = -e[js + js * e_dim1];
00772 
00773 /*                 Set up right hand side(s) */
00774 
00775                     rhs[0] = c__[is + js * c_dim1];
00776                     rhs[1] = f[is + js * f_dim1];
00777 
00778 /*                 Solve Z' * x = RHS */
00779 
00780                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00781                     if (ierr > 0) {
00782                         *info = ierr;
00783                     }
00784 
00785                     dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00786                     if (scaloc != 1.) {
00787                         i__3 = *n;
00788                         for (k = 1; k <= i__3; ++k) {
00789                             dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &c__1);
00790                             dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00791 /* L130: */
00792                         }
00793                         *scale *= scaloc;
00794                     }
00795 
00796 /*                 Unpack solution vector(s) */
00797 
00798                     c__[is + js * c_dim1] = rhs[0];
00799                     f[is + js * f_dim1] = rhs[1];
00800 
00801 /*                 Substitute R(I, J) and L(I, J) into remaining */
00802 /*                 equation. */
00803 
00804                     if (j > p + 2) {
00805                         alpha = rhs[0];
00806                         i__3 = js - 1;
00807                         daxpy_(&i__3, &alpha, &b[js * b_dim1 + 1], &c__1, &f[
00808                                 is + f_dim1], ldf);
00809                         alpha = rhs[1];
00810                         i__3 = js - 1;
00811                         daxpy_(&i__3, &alpha, &e[js * e_dim1 + 1], &c__1, &f[
00812                                 is + f_dim1], ldf);
00813                     }
00814                     if (i__ < p) {
00815                         alpha = -rhs[0];
00816                         i__3 = *m - ie;
00817                         daxpy_(&i__3, &alpha, &a[is + (ie + 1) * a_dim1], lda, 
00818                                  &c__[ie + 1 + js * c_dim1], &c__1);
00819                         alpha = -rhs[1];
00820                         i__3 = *m - ie;
00821                         daxpy_(&i__3, &alpha, &d__[is + (ie + 1) * d_dim1], 
00822                                 ldd, &c__[ie + 1 + js * c_dim1], &c__1);
00823                     }
00824 
00825                 } else if (mb == 1 && nb == 2) {
00826 
00827 /*                 Build a 4-by-4 system Z' * x = RHS */
00828 
00829                     z__[0] = a[is + is * a_dim1];
00830                     z__[1] = 0.;
00831                     z__[2] = -b[js + js * b_dim1];
00832                     z__[3] = -b[jsp1 + js * b_dim1];
00833 
00834                     z__[8] = 0.;
00835                     z__[9] = a[is + is * a_dim1];
00836                     z__[10] = -b[js + jsp1 * b_dim1];
00837                     z__[11] = -b[jsp1 + jsp1 * b_dim1];
00838 
00839                     z__[16] = d__[is + is * d_dim1];
00840                     z__[17] = 0.;
00841                     z__[18] = -e[js + js * e_dim1];
00842                     z__[19] = 0.;
00843 
00844                     z__[24] = 0.;
00845                     z__[25] = d__[is + is * d_dim1];
00846                     z__[26] = -e[js + jsp1 * e_dim1];
00847                     z__[27] = -e[jsp1 + jsp1 * e_dim1];
00848 
00849 /*                 Set up right hand side(s) */
00850 
00851                     rhs[0] = c__[is + js * c_dim1];
00852                     rhs[1] = c__[is + jsp1 * c_dim1];
00853                     rhs[2] = f[is + js * f_dim1];
00854                     rhs[3] = f[is + jsp1 * f_dim1];
00855 
00856 /*                 Solve Z' * x = RHS */
00857 
00858                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00859                     if (ierr > 0) {
00860                         *info = ierr;
00861                     }
00862                     dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00863                     if (scaloc != 1.) {
00864                         i__3 = *n;
00865                         for (k = 1; k <= i__3; ++k) {
00866                             dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &c__1);
00867                             dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00868 /* L140: */
00869                         }
00870                         *scale *= scaloc;
00871                     }
00872 
00873 /*                 Unpack solution vector(s) */
00874 
00875                     c__[is + js * c_dim1] = rhs[0];
00876                     c__[is + jsp1 * c_dim1] = rhs[1];
00877                     f[is + js * f_dim1] = rhs[2];
00878                     f[is + jsp1 * f_dim1] = rhs[3];
00879 
00880 /*                 Substitute R(I, J) and L(I, J) into remaining */
00881 /*                 equation. */
00882 
00883                     if (j > p + 2) {
00884                         i__3 = js - 1;
00885                         daxpy_(&i__3, rhs, &b[js * b_dim1 + 1], &c__1, &f[is 
00886                                 + f_dim1], ldf);
00887                         i__3 = js - 1;
00888                         daxpy_(&i__3, &rhs[1], &b[jsp1 * b_dim1 + 1], &c__1, &
00889                                 f[is + f_dim1], ldf);
00890                         i__3 = js - 1;
00891                         daxpy_(&i__3, &rhs[2], &e[js * e_dim1 + 1], &c__1, &f[
00892                                 is + f_dim1], ldf);
00893                         i__3 = js - 1;
00894                         daxpy_(&i__3, &rhs[3], &e[jsp1 * e_dim1 + 1], &c__1, &
00895                                 f[is + f_dim1], ldf);
00896                     }
00897                     if (i__ < p) {
00898                         i__3 = *m - ie;
00899                         dger_(&i__3, &nb, &c_b27, &a[is + (ie + 1) * a_dim1], 
00900                                 lda, rhs, &c__1, &c__[ie + 1 + js * c_dim1], 
00901                                 ldc);
00902                         i__3 = *m - ie;
00903                         dger_(&i__3, &nb, &c_b27, &d__[is + (ie + 1) * d_dim1]
00904 , ldd, &rhs[2], &c__1, &c__[ie + 1 + js * 
00905                                 c_dim1], ldc);
00906                     }
00907 
00908                 } else if (mb == 2 && nb == 1) {
00909 
00910 /*                 Build a 4-by-4 system Z' * x = RHS */
00911 
00912                     z__[0] = a[is + is * a_dim1];
00913                     z__[1] = a[is + isp1 * a_dim1];
00914                     z__[2] = -b[js + js * b_dim1];
00915                     z__[3] = 0.;
00916 
00917                     z__[8] = a[isp1 + is * a_dim1];
00918                     z__[9] = a[isp1 + isp1 * a_dim1];
00919                     z__[10] = 0.;
00920                     z__[11] = -b[js + js * b_dim1];
00921 
00922                     z__[16] = d__[is + is * d_dim1];
00923                     z__[17] = d__[is + isp1 * d_dim1];
00924                     z__[18] = -e[js + js * e_dim1];
00925                     z__[19] = 0.;
00926 
00927                     z__[24] = 0.;
00928                     z__[25] = d__[isp1 + isp1 * d_dim1];
00929                     z__[26] = 0.;
00930                     z__[27] = -e[js + js * e_dim1];
00931 
00932 /*                 Set up right hand side(s) */
00933 
00934                     rhs[0] = c__[is + js * c_dim1];
00935                     rhs[1] = c__[isp1 + js * c_dim1];
00936                     rhs[2] = f[is + js * f_dim1];
00937                     rhs[3] = f[isp1 + js * f_dim1];
00938 
00939 /*                 Solve Z' * x = RHS */
00940 
00941                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
00942                     if (ierr > 0) {
00943                         *info = ierr;
00944                     }
00945 
00946                     dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
00947                     if (scaloc != 1.) {
00948                         i__3 = *n;
00949                         for (k = 1; k <= i__3; ++k) {
00950                             dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &c__1);
00951                             dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
00952 /* L150: */
00953                         }
00954                         *scale *= scaloc;
00955                     }
00956 
00957 /*                 Unpack solution vector(s) */
00958 
00959                     c__[is + js * c_dim1] = rhs[0];
00960                     c__[isp1 + js * c_dim1] = rhs[1];
00961                     f[is + js * f_dim1] = rhs[2];
00962                     f[isp1 + js * f_dim1] = rhs[3];
00963 
00964 /*                 Substitute R(I, J) and L(I, J) into remaining */
00965 /*                 equation. */
00966 
00967                     if (j > p + 2) {
00968                         i__3 = js - 1;
00969                         dger_(&mb, &i__3, &c_b42, rhs, &c__1, &b[js * b_dim1 
00970                                 + 1], &c__1, &f[is + f_dim1], ldf);
00971                         i__3 = js - 1;
00972                         dger_(&mb, &i__3, &c_b42, &rhs[2], &c__1, &e[js * 
00973                                 e_dim1 + 1], &c__1, &f[is + f_dim1], ldf);
00974                     }
00975                     if (i__ < p) {
00976                         i__3 = *m - ie;
00977                         dgemv_("T", &mb, &i__3, &c_b27, &a[is + (ie + 1) * 
00978                                 a_dim1], lda, rhs, &c__1, &c_b42, &c__[ie + 1 
00979                                 + js * c_dim1], &c__1);
00980                         i__3 = *m - ie;
00981                         dgemv_("T", &mb, &i__3, &c_b27, &d__[is + (ie + 1) * 
00982                                 d_dim1], ldd, &rhs[2], &c__1, &c_b42, &c__[ie 
00983                                 + 1 + js * c_dim1], &c__1);
00984                     }
00985 
00986                 } else if (mb == 2 && nb == 2) {
00987 
00988 /*                 Build an 8-by-8 system Z' * x = RHS */
00989 
00990                     dlaset_("F", &c__8, &c__8, &c_b56, &c_b56, z__, &c__8);
00991 
00992                     z__[0] = a[is + is * a_dim1];
00993                     z__[1] = a[is + isp1 * a_dim1];
00994                     z__[4] = -b[js + js * b_dim1];
00995                     z__[6] = -b[jsp1 + js * b_dim1];
00996 
00997                     z__[8] = a[isp1 + is * a_dim1];
00998                     z__[9] = a[isp1 + isp1 * a_dim1];
00999                     z__[13] = -b[js + js * b_dim1];
01000                     z__[15] = -b[jsp1 + js * b_dim1];
01001 
01002                     z__[18] = a[is + is * a_dim1];
01003                     z__[19] = a[is + isp1 * a_dim1];
01004                     z__[20] = -b[js + jsp1 * b_dim1];
01005                     z__[22] = -b[jsp1 + jsp1 * b_dim1];
01006 
01007                     z__[26] = a[isp1 + is * a_dim1];
01008                     z__[27] = a[isp1 + isp1 * a_dim1];
01009                     z__[29] = -b[js + jsp1 * b_dim1];
01010                     z__[31] = -b[jsp1 + jsp1 * b_dim1];
01011 
01012                     z__[32] = d__[is + is * d_dim1];
01013                     z__[33] = d__[is + isp1 * d_dim1];
01014                     z__[36] = -e[js + js * e_dim1];
01015 
01016                     z__[41] = d__[isp1 + isp1 * d_dim1];
01017                     z__[45] = -e[js + js * e_dim1];
01018 
01019                     z__[50] = d__[is + is * d_dim1];
01020                     z__[51] = d__[is + isp1 * d_dim1];
01021                     z__[52] = -e[js + jsp1 * e_dim1];
01022                     z__[54] = -e[jsp1 + jsp1 * e_dim1];
01023 
01024                     z__[59] = d__[isp1 + isp1 * d_dim1];
01025                     z__[61] = -e[js + jsp1 * e_dim1];
01026                     z__[63] = -e[jsp1 + jsp1 * e_dim1];
01027 
01028 /*                 Set up right hand side(s) */
01029 
01030                     k = 1;
01031                     ii = mb * nb + 1;
01032                     i__3 = nb - 1;
01033                     for (jj = 0; jj <= i__3; ++jj) {
01034                         dcopy_(&mb, &c__[is + (js + jj) * c_dim1], &c__1, &
01035                                 rhs[k - 1], &c__1);
01036                         dcopy_(&mb, &f[is + (js + jj) * f_dim1], &c__1, &rhs[
01037                                 ii - 1], &c__1);
01038                         k += mb;
01039                         ii += mb;
01040 /* L160: */
01041                     }
01042 
01043 
01044 /*                 Solve Z' * x = RHS */
01045 
01046                     dgetc2_(&zdim, z__, &c__8, ipiv, jpiv, &ierr);
01047                     if (ierr > 0) {
01048                         *info = ierr;
01049                     }
01050 
01051                     dgesc2_(&zdim, z__, &c__8, rhs, ipiv, jpiv, &scaloc);
01052                     if (scaloc != 1.) {
01053                         i__3 = *n;
01054                         for (k = 1; k <= i__3; ++k) {
01055                             dscal_(m, &scaloc, &c__[k * c_dim1 + 1], &c__1);
01056                             dscal_(m, &scaloc, &f[k * f_dim1 + 1], &c__1);
01057 /* L170: */
01058                         }
01059                         *scale *= scaloc;
01060                     }
01061 
01062 /*                 Unpack solution vector(s) */
01063 
01064                     k = 1;
01065                     ii = mb * nb + 1;
01066                     i__3 = nb - 1;
01067                     for (jj = 0; jj <= i__3; ++jj) {
01068                         dcopy_(&mb, &rhs[k - 1], &c__1, &c__[is + (js + jj) * 
01069                                 c_dim1], &c__1);
01070                         dcopy_(&mb, &rhs[ii - 1], &c__1, &f[is + (js + jj) * 
01071                                 f_dim1], &c__1);
01072                         k += mb;
01073                         ii += mb;
01074 /* L180: */
01075                     }
01076 
01077 /*                 Substitute R(I, J) and L(I, J) into remaining */
01078 /*                 equation. */
01079 
01080                     if (j > p + 2) {
01081                         i__3 = js - 1;
01082                         dgemm_("N", "T", &mb, &i__3, &nb, &c_b42, &c__[is + 
01083                                 js * c_dim1], ldc, &b[js * b_dim1 + 1], ldb, &
01084                                 c_b42, &f[is + f_dim1], ldf);
01085                         i__3 = js - 1;
01086                         dgemm_("N", "T", &mb, &i__3, &nb, &c_b42, &f[is + js *
01087                                  f_dim1], ldf, &e[js * e_dim1 + 1], lde, &
01088                                 c_b42, &f[is + f_dim1], ldf);
01089                     }
01090                     if (i__ < p) {
01091                         i__3 = *m - ie;
01092                         dgemm_("T", "N", &i__3, &nb, &mb, &c_b27, &a[is + (ie 
01093                                 + 1) * a_dim1], lda, &c__[is + js * c_dim1], 
01094                                 ldc, &c_b42, &c__[ie + 1 + js * c_dim1], ldc);
01095                         i__3 = *m - ie;
01096                         dgemm_("T", "N", &i__3, &nb, &mb, &c_b27, &d__[is + (
01097                                 ie + 1) * d_dim1], ldd, &f[is + js * f_dim1], 
01098                                 ldf, &c_b42, &c__[ie + 1 + js * c_dim1], ldc);
01099                     }
01100 
01101                 }
01102 
01103 /* L190: */
01104             }
01105 /* L200: */
01106         }
01107 
01108     }
01109     return 0;
01110 
01111 /*     End of DTGSY2 */
01112 
01113 } /* dtgsy2_ */


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