zblat1.c
Go to the documentation of this file.
00001 /* zblat1.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 /* Common Block Declarations */
00017 
00018 struct {
00019     integer icase, n, incx, incy, mode;
00020     logical pass;
00021 } combla_;
00022 
00023 #define combla_1 combla_
00024 
00025 /* Table of constant values */
00026 
00027 static integer c__1 = 1;
00028 static integer c__9 = 9;
00029 static integer c__5 = 5;
00030 static doublereal c_b43 = 1.;
00031 
00032 /* Main program */ int MAIN__(void)
00033 {
00034     /* Initialized data */
00035 
00036     static doublereal sfac = 9.765625e-4;
00037 
00038     /* Format strings */
00039     static char fmt_99999[] = "(\002 Complex BLAS Test Program Results\002,/"
00040             "1x)";
00041     static char fmt_99998[] = "(\002                                    ----"
00042             "- PASS -----\002)";
00043 
00044     /* Builtin functions */
00045     integer s_wsfe(cilist *), e_wsfe(void);
00046     /* Subroutine */ int s_stop(char *, ftnlen);
00047 
00048     /* Local variables */
00049     integer ic;
00050     extern /* Subroutine */ int check1_(doublereal *), check2_(doublereal *), 
00051             header_(void);
00052 
00053     /* Fortran I/O blocks */
00054     static cilist io___2 = { 0, 6, 0, fmt_99999, 0 };
00055     static cilist io___4 = { 0, 6, 0, fmt_99998, 0 };
00056 
00057 
00058 /*     Test program for the COMPLEX*16 Level 1 BLAS. */
00059 /*     Based upon the original BLAS test routine together with: */
00060 /*     F06GAF Example Program Text */
00061 /*     .. Parameters .. */
00062 /*     .. Scalars in Common .. */
00063 /*     .. Local Scalars .. */
00064 /*     .. External Subroutines .. */
00065 /*     .. Common blocks .. */
00066 /*     .. Data statements .. */
00067 /*     .. Executable Statements .. */
00068     s_wsfe(&io___2);
00069     e_wsfe();
00070     for (ic = 1; ic <= 10; ++ic) {
00071         combla_1.icase = ic;
00072         header_();
00073 
00074 /*        Initialize PASS, INCX, INCY, and MODE for a new case. */
00075 /*        The value 9999 for INCX, INCY or MODE will appear in the */
00076 /*        detailed  output, if any, for cases that do not involve */
00077 /*        these parameters. */
00078 
00079         combla_1.pass = TRUE_;
00080         combla_1.incx = 9999;
00081         combla_1.incy = 9999;
00082         combla_1.mode = 9999;
00083         if (combla_1.icase <= 5) {
00084             check2_(&sfac);
00085         } else if (combla_1.icase >= 6) {
00086             check1_(&sfac);
00087         }
00088 /*        -- Print */
00089         if (combla_1.pass) {
00090             s_wsfe(&io___4);
00091             e_wsfe();
00092         }
00093 /* L20: */
00094     }
00095     s_stop("", (ftnlen)0);
00096 
00097     return 0;
00098 } /* MAIN__ */
00099 
00100 /* Subroutine */ int header_(void)
00101 {
00102     /* Initialized data */
00103 
00104     static char l[6*10] = "ZDOTC " "ZDOTU " "ZAXPY " "ZCOPY " "ZSWAP " "DZNR"
00105             "M2" "DZASUM" "ZSCAL " "ZDSCAL" "IZAMAX";
00106 
00107     /* Format strings */
00108     static char fmt_99999[] = "(/\002 Test of subprogram number\002,i3,12x,a"
00109             "6)";
00110 
00111     /* Builtin functions */
00112     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00113 
00114     /* Fortran I/O blocks */
00115     static cilist io___6 = { 0, 6, 0, fmt_99999, 0 };
00116 
00117 
00118 /*     .. Parameters .. */
00119 /*     .. Scalars in Common .. */
00120 /*     .. Local Arrays .. */
00121 /*     .. Common blocks .. */
00122 /*     .. Data statements .. */
00123 /*     .. Executable Statements .. */
00124     s_wsfe(&io___6);
00125     do_fio(&c__1, (char *)&combla_1.icase, (ftnlen)sizeof(integer));
00126     do_fio(&c__1, l + (0 + (0 + (combla_1.icase - 1) * 6)), (ftnlen)6);
00127     e_wsfe();
00128     return 0;
00129 
00130 } /* header_ */
00131 
00132 /* Subroutine */ int check1_(doublereal *sfac)
00133 {
00134     /* Initialized data */
00135 
00136     static doublereal strue2[5] = { 0.,.5,.6,.7,.8 };
00137     static doublereal strue4[5] = { 0.,.7,1.,1.3,1.6 };
00138     static doublecomplex ctrue5[80]     /* was [8][5][2] */ = { {.1,.1},{1.,
00139             2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{-.16,-.37},{
00140             3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{-.17,-.19}
00141             ,{.13,-.39},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{.11,
00142             -.03},{-.17,.46},{-.17,-.19},{7.,8.},{7.,8.},{7.,8.},{7.,8.},{7.,
00143             8.},{.19,-.17},{.2,-.35},{.35,.2},{.14,.08},{2.,3.},{2.,3.},{2.,
00144             3.},{2.,3.},{.1,.1},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{4.,
00145             5.},{4.,5.},{-.16,-.37},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{
00146             6.,7.},{6.,7.},{-.17,-.19},{8.,9.},{.13,-.39},{2.,5.},{2.,5.},{2.,
00147             5.},{2.,5.},{2.,5.},{.11,-.03},{3.,6.},{-.17,.46},{4.,7.},{-.17,
00148             -.19},{7.,2.},{7.,2.},{7.,2.},{.19,-.17},{5.,8.},{.2,-.35},{6.,9.}
00149             ,{.35,.2},{8.,3.},{.14,.08},{9.,4.} };
00150     static doublecomplex ctrue6[80]     /* was [8][5][2] */ = { {.1,.1},{1.,
00151             2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{.09,-.12},{
00152             3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{.03,-.09},
00153             {.15,-.03},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{.03,
00154             .03},{-.18,.03},{.03,-.09},{7.,8.},{7.,8.},{7.,8.},{7.,8.},{7.,8.}
00155             ,{.09,.03},{.15,0.},{0.,.15},{0.,.06},{2.,3.},{2.,3.},{2.,3.},{2.,
00156             3.},{.1,.1},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{4.,
00157             5.},{.09,-.12},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{
00158             6.,7.},{.03,-.09},{8.,9.},{.15,-.03},{2.,5.},{2.,5.},{2.,5.},{2.,
00159             5.},{2.,5.},{.03,.03},{3.,6.},{-.18,.03},{4.,7.},{.03,-.09},{7.,
00160             2.},{7.,2.},{7.,2.},{.09,.03},{5.,8.},{.15,0.},{6.,9.},{0.,.15},{
00161             8.,3.},{0.,.06},{9.,4.} };
00162     static integer itrue3[5] = { 0,1,2,2,2 };
00163     static doublereal sa = .3;
00164     static doublecomplex ca = {.4,-.7};
00165     static doublecomplex cv[80] /* was [8][5][2] */ = { {.1,.1},{1.,2.},{1.,
00166             2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{1.,2.},{.3,-.4},{3.,4.},{3.,
00167             4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{3.,4.},{.1,-.3},{.5,-.1},{5.,
00168             6.},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{5.,6.},{.1,.1},{-.6,.1},{.1,
00169             -.3},{7.,8.},{7.,8.},{7.,8.},{7.,8.},{7.,8.},{.3,.1},{.5,0.},{0.,
00170             .5},{0.,.2},{2.,3.},{2.,3.},{2.,3.},{2.,3.},{.1,.1},{4.,5.},{4.,
00171             5.},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{4.,5.},{.3,-.4},{6.,7.},{6.,
00172             7.},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{6.,7.},{.1,-.3},{8.,9.},{.5,
00173             -.1},{2.,5.},{2.,5.},{2.,5.},{2.,5.},{2.,5.},{.1,.1},{3.,6.},{-.6,
00174             .1},{4.,7.},{.1,-.3},{7.,2.},{7.,2.},{7.,2.},{.3,.1},{5.,8.},{.5,
00175             0.},{6.,9.},{0.,.5},{8.,3.},{0.,.2},{9.,4.} };
00176 
00177     /* System generated locals */
00178     integer i__1, i__2, i__3;
00179     doublereal d__1;
00180     doublecomplex z__1;
00181 
00182     /* Builtin functions */
00183     integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), 
00184             e_wsle(void);
00185     /* Subroutine */ int s_stop(char *, ftnlen);
00186 
00187     /* Local variables */
00188     integer i__;
00189     doublecomplex cx[8];
00190     integer np1, len;
00191     extern /* Subroutine */ int zscal_(integer *, doublecomplex *, 
00192             doublecomplex *, integer *), ctest_(integer *, doublecomplex *, 
00193             doublecomplex *, doublecomplex *, doublereal *);
00194     doublecomplex mwpcs[5], mwpct[5];
00195     extern /* Subroutine */ int itest1_(integer *, integer *);
00196     extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
00197     extern /* Subroutine */ int stest1_(doublereal *, doublereal *, 
00198             doublereal *, doublereal *), zdscal_(integer *, doublereal *, 
00199             doublecomplex *, integer *);
00200     extern integer izamax_(integer *, doublecomplex *, integer *);
00201     extern doublereal dzasum_(integer *, doublecomplex *, integer *);
00202 
00203     /* Fortran I/O blocks */
00204     static cilist io___19 = { 0, 6, 0, 0, 0 };
00205 
00206 
00207 /*     .. Parameters .. */
00208 /*     .. Scalar Arguments .. */
00209 /*     .. Scalars in Common .. */
00210 /*     .. Local Scalars .. */
00211 /*     .. Local Arrays .. */
00212 /*     .. External Functions .. */
00213 /*     .. External Subroutines .. */
00214 /*     .. Intrinsic Functions .. */
00215 /*     .. Common blocks .. */
00216 /*     .. Data statements .. */
00217 /*     .. Executable Statements .. */
00218     for (combla_1.incx = 1; combla_1.incx <= 2; ++combla_1.incx) {
00219         for (np1 = 1; np1 <= 5; ++np1) {
00220             combla_1.n = np1 - 1;
00221             len = max(combla_1.n,1) << 1;
00222 /*           .. Set vector arguments .. */
00223             i__1 = len;
00224             for (i__ = 1; i__ <= i__1; ++i__) {
00225                 i__2 = i__ - 1;
00226                 i__3 = i__ + (np1 + combla_1.incx * 5 << 3) - 49;
00227                 cx[i__2].r = cv[i__3].r, cx[i__2].i = cv[i__3].i;
00228 /* L20: */
00229             }
00230             if (combla_1.icase == 6) {
00231 /*              .. DZNRM2 .. */
00232                 d__1 = dznrm2_(&combla_1.n, cx, &combla_1.incx);
00233                 stest1_(&d__1, &strue2[np1 - 1], &strue2[np1 - 1], sfac);
00234             } else if (combla_1.icase == 7) {
00235 /*              .. DZASUM .. */
00236                 d__1 = dzasum_(&combla_1.n, cx, &combla_1.incx);
00237                 stest1_(&d__1, &strue4[np1 - 1], &strue4[np1 - 1], sfac);
00238             } else if (combla_1.icase == 8) {
00239 /*              .. ZSCAL .. */
00240                 zscal_(&combla_1.n, &ca, cx, &combla_1.incx);
00241                 ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
00242                          &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
00243             } else if (combla_1.icase == 9) {
00244 /*              .. ZDSCAL .. */
00245                 zdscal_(&combla_1.n, &sa, cx, &combla_1.incx);
00246                 ctest_(&len, cx, &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48],
00247                          &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
00248             } else if (combla_1.icase == 10) {
00249 /*              .. IZAMAX .. */
00250                 i__1 = izamax_(&combla_1.n, cx, &combla_1.incx);
00251                 itest1_(&i__1, &itrue3[np1 - 1]);
00252             } else {
00253                 s_wsle(&io___19);
00254                 do_lio(&c__9, &c__1, " Shouldn't be here in CHECK1", (ftnlen)
00255                         28);
00256                 e_wsle();
00257                 s_stop("", (ftnlen)0);
00258             }
00259 
00260 /* L40: */
00261         }
00262 /* L60: */
00263     }
00264 
00265     combla_1.incx = 1;
00266     if (combla_1.icase == 8) {
00267 /*        ZSCAL */
00268 /*        Add a test for alpha equal to zero. */
00269         ca.r = 0., ca.i = 0.;
00270         for (i__ = 1; i__ <= 5; ++i__) {
00271             i__1 = i__ - 1;
00272             mwpct[i__1].r = 0., mwpct[i__1].i = 0.;
00273             i__1 = i__ - 1;
00274             mwpcs[i__1].r = 1., mwpcs[i__1].i = 1.;
00275 /* L80: */
00276         }
00277         zscal_(&c__5, &ca, cx, &combla_1.incx);
00278         ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00279     } else if (combla_1.icase == 9) {
00280 /*        ZDSCAL */
00281 /*        Add a test for alpha equal to zero. */
00282         sa = 0.;
00283         for (i__ = 1; i__ <= 5; ++i__) {
00284             i__1 = i__ - 1;
00285             mwpct[i__1].r = 0., mwpct[i__1].i = 0.;
00286             i__1 = i__ - 1;
00287             mwpcs[i__1].r = 1., mwpcs[i__1].i = 1.;
00288 /* L100: */
00289         }
00290         zdscal_(&c__5, &sa, cx, &combla_1.incx);
00291         ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00292 /*        Add a test for alpha equal to one. */
00293         sa = 1.;
00294         for (i__ = 1; i__ <= 5; ++i__) {
00295             i__1 = i__ - 1;
00296             i__2 = i__ - 1;
00297             mwpct[i__1].r = cx[i__2].r, mwpct[i__1].i = cx[i__2].i;
00298             i__1 = i__ - 1;
00299             i__2 = i__ - 1;
00300             mwpcs[i__1].r = cx[i__2].r, mwpcs[i__1].i = cx[i__2].i;
00301 /* L120: */
00302         }
00303         zdscal_(&c__5, &sa, cx, &combla_1.incx);
00304         ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00305 /*        Add a test for alpha equal to minus one. */
00306         sa = -1.;
00307         for (i__ = 1; i__ <= 5; ++i__) {
00308             i__1 = i__ - 1;
00309             i__2 = i__ - 1;
00310             z__1.r = -cx[i__2].r, z__1.i = -cx[i__2].i;
00311             mwpct[i__1].r = z__1.r, mwpct[i__1].i = z__1.i;
00312             i__1 = i__ - 1;
00313             i__2 = i__ - 1;
00314             z__1.r = -cx[i__2].r, z__1.i = -cx[i__2].i;
00315             mwpcs[i__1].r = z__1.r, mwpcs[i__1].i = z__1.i;
00316 /* L140: */
00317         }
00318         zdscal_(&c__5, &sa, cx, &combla_1.incx);
00319         ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00320     }
00321     return 0;
00322 } /* check1_ */
00323 
00324 /* Subroutine */ int check2_(doublereal *sfac)
00325 {
00326     /* Initialized data */
00327 
00328     static doublecomplex ca = {.4,-.7};
00329     static integer incxs[4] = { 1,2,-2,-1 };
00330     static integer incys[4] = { 1,-2,1,-2 };
00331     static integer lens[8]      /* was [4][2] */ = { 1,1,2,4,1,1,3,7 };
00332     static integer ns[4] = { 0,1,2,4 };
00333     static doublecomplex cx1[7] = { {.7,-.8},{-.4,-.7},{-.1,-.9},{.2,-.8},{
00334             -.9,-.4},{.1,.4},{-.6,.6} };
00335     static doublecomplex cy1[7] = { {.6,-.6},{-.9,.5},{.7,-.6},{.1,-.5},{-.1,
00336             -.2},{-.5,-.3},{.8,-.7} };
00337     static doublecomplex ct8[112]       /* was [7][4][4] */ = { {.6,-.6},{0.,
00338             0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.32,-1.41},{0.,0.},{
00339             0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.32,-1.41},{-1.55,.5},{0.,
00340             0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.32,-1.41},{-1.55,.5},{.03,
00341             -.89},{-.38,-.96},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{0.,0.},{0.,0.}
00342             ,{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.32,-1.41},{0.,0.},{0.,0.},{0.,
00343             0.},{0.,0.},{0.,0.},{0.,0.},{-.07,-.89},{-.9,.5},{.42,-1.41},{0.,
00344             0.},{0.,0.},{0.,0.},{0.,0.},{.78,.06},{-.9,.5},{.06,-.13},{.1,-.5}
00345             ,{-.77,-.49},{-.5,-.3},{.52,-1.51},{.6,-.6},{0.,0.},{0.,0.},{0.,
00346             0.},{0.,0.},{0.,0.},{0.,0.},{.32,-1.41},{0.,0.},{0.,0.},{0.,0.},{
00347             0.,0.},{0.,0.},{0.,0.},{-.07,-.89},{-1.18,-.31},{0.,0.},{0.,0.},{
00348             0.,0.},{0.,0.},{0.,0.},{.78,.06},{-1.54,.97},{.03,-.89},{-.18,
00349             -1.31},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{0.,0.},{0.,0.},{0.,0.},{
00350             0.,0.},{0.,0.},{0.,0.},{.32,-1.41},{0.,0.},{0.,0.},{0.,0.},{0.,0.}
00351             ,{0.,0.},{0.,0.},{.32,-1.41},{-.9,.5},{.05,-.6},{0.,0.},{0.,0.},{
00352             0.,0.},{0.,0.},{.32,-1.41},{-.9,.5},{.05,-.6},{.1,-.5},{-.77,-.49}
00353             ,{-.5,-.3},{.32,-1.16} };
00354     static doublecomplex ct7[16]        /* was [4][4] */ = { {0.,0.},{-.06,
00355             -.9},{.65,-.47},{-.34,-1.22},{0.,0.},{-.06,-.9},{-.59,-1.46},{
00356             -1.04,-.04},{0.,0.},{-.06,-.9},{-.83,.59},{.07,-.37},{0.,0.},{
00357             -.06,-.9},{-.76,-1.15},{-1.33,-1.82} };
00358     static doublecomplex ct6[16]        /* was [4][4] */ = { {0.,0.},{.9,.06},
00359             {.91,-.77},{1.8,-.1},{0.,0.},{.9,.06},{1.45,.74},{.2,.9},{0.,0.},{
00360             .9,.06},{-.55,.23},{.83,-.39},{0.,0.},{.9,.06},{1.04,.79},{1.95,
00361             1.22} };
00362     static doublecomplex ct10x[112]     /* was [7][4][4] */ = { {.7,-.8},{0.,
00363             0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{0.,0.},{0.,
00364             0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{-.9,.5},{0.,0.},{0.,
00365             0.},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{-.9,.5},{.7,-.6},{.1,-.5},{
00366             0.,0.},{0.,0.},{0.,0.},{.7,-.8},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{
00367             0.,0.},{0.,0.},{.6,-.6},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{
00368             0.,0.},{.7,-.6},{-.4,-.7},{.6,-.6},{0.,0.},{0.,0.},{0.,0.},{0.,0.}
00369             ,{.8,-.7},{-.4,-.7},{-.1,-.2},{.2,-.8},{.7,-.6},{.1,.4},{.6,-.6},{
00370             .7,-.8},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{
00371             0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{-.9,.5},{-.4,-.7},
00372             {.6,-.6},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.1,-.5},{-.4,-.7},{.7,
00373             -.6},{.2,-.8},{-.9,.5},{.1,.4},{.6,-.6},{.7,-.8},{0.,0.},{0.,0.},{
00374             0.,0.},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{0.,0.},{0.,0.},{0.,0.},{
00375             0.,0.},{0.,0.},{0.,0.},{.6,-.6},{.7,-.6},{0.,0.},{0.,0.},{0.,0.},{
00376             0.,0.},{0.,0.},{.6,-.6},{.7,-.6},{-.1,-.2},{.8,-.7},{0.,0.},{0.,
00377             0.},{0.,0.} };
00378     static doublecomplex ct10y[112]     /* was [7][4][4] */ = { {.6,-.6},{0.,
00379             0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.7,-.8},{0.,0.},{0.,
00380             0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.7,-.8},{-.4,-.7},{0.,0.},{
00381             0.,0.},{0.,0.},{0.,0.},{0.,0.},{.7,-.8},{-.4,-.7},{-.1,-.9},{.2,
00382             -.8},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{0.,0.},{0.,0.},{0.,0.},{0.,
00383             0.},{0.,0.},{0.,0.},{.7,-.8},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,
00384             0.},{0.,0.},{-.1,-.9},{-.9,.5},{.7,-.8},{0.,0.},{0.,0.},{0.,0.},{
00385             0.,0.},{-.6,.6},{-.9,.5},{-.9,-.4},{.1,-.5},{-.1,-.9},{-.5,-.3},{
00386             .7,-.8},{.6,-.6},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{
00387             .7,-.8},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{-.1,-.9},
00388             {.7,-.8},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{-.6,.6},{-.9,
00389             -.4},{-.1,-.9},{.7,-.8},{0.,0.},{0.,0.},{0.,0.},{.6,-.6},{0.,0.},{
00390             0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{.7,-.8},{0.,0.},{0.,0.},{
00391             0.,0.},{0.,0.},{0.,0.},{0.,0.},{.7,-.8},{-.9,.5},{-.4,-.7},{0.,0.}
00392             ,{0.,0.},{0.,0.},{0.,0.},{.7,-.8},{-.9,.5},{-.4,-.7},{.1,-.5},{
00393             -.1,-.9},{-.5,-.3},{.2,-.8} };
00394     static doublecomplex csize1[4] = { {0.,0.},{.9,.9},{1.63,1.73},{2.9,2.78} 
00395             };
00396     static doublecomplex csize3[14] = { {0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,
00397             0.},{0.,0.},{0.,0.},{1.17,1.17},{1.17,1.17},{1.17,1.17},{1.17,
00398             1.17},{1.17,1.17},{1.17,1.17},{1.17,1.17} };
00399     static doublecomplex csize2[14]     /* was [7][2] */ = { {0.,0.},{0.,0.},{
00400             0.,0.},{0.,0.},{0.,0.},{0.,0.},{0.,0.},{1.54,1.54},{1.54,1.54},{
00401             1.54,1.54},{1.54,1.54},{1.54,1.54},{1.54,1.54},{1.54,1.54} };
00402 
00403     /* System generated locals */
00404     integer i__1, i__2;
00405     doublecomplex z__1;
00406 
00407     /* Builtin functions */
00408     integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), 
00409             e_wsle(void);
00410     /* Subroutine */ int s_stop(char *, ftnlen);
00411 
00412     /* Local variables */
00413     integer i__, ki, kn;
00414     doublecomplex cx[7], cy[7];
00415     integer mx, my;
00416     doublecomplex cdot[1];
00417     integer lenx, leny;
00418     extern /* Subroutine */ int ctest_(integer *, doublecomplex *, 
00419             doublecomplex *, doublecomplex *, doublereal *);
00420     extern /* Double Complex */ VOID zdotc_(doublecomplex *, integer *, 
00421             doublecomplex *, integer *, doublecomplex *, integer *);
00422     integer ksize;
00423     extern /* Subroutine */ int zcopy_(integer *, doublecomplex *, integer *, 
00424             doublecomplex *, integer *);
00425     extern /* Double Complex */ VOID zdotu_(doublecomplex *, integer *, 
00426             doublecomplex *, integer *, doublecomplex *, integer *);
00427     extern /* Subroutine */ int zswap_(integer *, doublecomplex *, integer *, 
00428             doublecomplex *, integer *), zaxpy_(integer *, doublecomplex *, 
00429             doublecomplex *, integer *, doublecomplex *, integer *);
00430 
00431     /* Fortran I/O blocks */
00432     static cilist io___48 = { 0, 6, 0, 0, 0 };
00433 
00434 
00435 /*     .. Parameters .. */
00436 /*     .. Scalar Arguments .. */
00437 /*     .. Scalars in Common .. */
00438 /*     .. Local Scalars .. */
00439 /*     .. Local Arrays .. */
00440 /*     .. External Functions .. */
00441 /*     .. External Subroutines .. */
00442 /*     .. Intrinsic Functions .. */
00443 /*     .. Common blocks .. */
00444 /*     .. Data statements .. */
00445 /*     .. Executable Statements .. */
00446     for (ki = 1; ki <= 4; ++ki) {
00447         combla_1.incx = incxs[ki - 1];
00448         combla_1.incy = incys[ki - 1];
00449         mx = abs(combla_1.incx);
00450         my = abs(combla_1.incy);
00451 
00452         for (kn = 1; kn <= 4; ++kn) {
00453             combla_1.n = ns[kn - 1];
00454             ksize = min(2,kn);
00455             lenx = lens[kn + (mx << 2) - 5];
00456             leny = lens[kn + (my << 2) - 5];
00457 /*           .. initialize all argument arrays .. */
00458             for (i__ = 1; i__ <= 7; ++i__) {
00459                 i__1 = i__ - 1;
00460                 i__2 = i__ - 1;
00461                 cx[i__1].r = cx1[i__2].r, cx[i__1].i = cx1[i__2].i;
00462                 i__1 = i__ - 1;
00463                 i__2 = i__ - 1;
00464                 cy[i__1].r = cy1[i__2].r, cy[i__1].i = cy1[i__2].i;
00465 /* L20: */
00466             }
00467             if (combla_1.icase == 1) {
00468 /*              .. ZDOTC .. */
00469                 zdotc_(&z__1, &combla_1.n, cx, &combla_1.incx, cy, &
00470                         combla_1.incy);
00471                 cdot[0].r = z__1.r, cdot[0].i = z__1.i;
00472                 ctest_(&c__1, cdot, &ct6[kn + (ki << 2) - 5], &csize1[kn - 1],
00473                          sfac);
00474             } else if (combla_1.icase == 2) {
00475 /*              .. ZDOTU .. */
00476                 zdotu_(&z__1, &combla_1.n, cx, &combla_1.incx, cy, &
00477                         combla_1.incy);
00478                 cdot[0].r = z__1.r, cdot[0].i = z__1.i;
00479                 ctest_(&c__1, cdot, &ct7[kn + (ki << 2) - 5], &csize1[kn - 1],
00480                          sfac);
00481             } else if (combla_1.icase == 3) {
00482 /*              .. ZAXPY .. */
00483                 zaxpy_(&combla_1.n, &ca, cx, &combla_1.incx, cy, &
00484                         combla_1.incy);
00485                 ctest_(&leny, cy, &ct8[(kn + (ki << 2)) * 7 - 35], &csize2[
00486                         ksize * 7 - 7], sfac);
00487             } else if (combla_1.icase == 4) {
00488 /*              .. ZCOPY .. */
00489                 zcopy_(&combla_1.n, cx, &combla_1.incx, cy, &combla_1.incy);
00490                 ctest_(&leny, cy, &ct10y[(kn + (ki << 2)) * 7 - 35], csize3, &
00491                         c_b43);
00492             } else if (combla_1.icase == 5) {
00493 /*              .. ZSWAP .. */
00494                 zswap_(&combla_1.n, cx, &combla_1.incx, cy, &combla_1.incy);
00495                 ctest_(&lenx, cx, &ct10x[(kn + (ki << 2)) * 7 - 35], csize3, &
00496                         c_b43);
00497                 ctest_(&leny, cy, &ct10y[(kn + (ki << 2)) * 7 - 35], csize3, &
00498                         c_b43);
00499             } else {
00500                 s_wsle(&io___48);
00501                 do_lio(&c__9, &c__1, " Shouldn't be here in CHECK2", (ftnlen)
00502                         28);
00503                 e_wsle();
00504                 s_stop("", (ftnlen)0);
00505             }
00506 
00507 /* L40: */
00508         }
00509 /* L60: */
00510     }
00511     return 0;
00512 } /* check2_ */
00513 
00514 /* Subroutine */ int stest_(integer *len, doublereal *scomp, doublereal *
00515         strue, doublereal *ssize, doublereal *sfac)
00516 {
00517     /* Format strings */
00518     static char fmt_99999[] = "(\002                                       F"
00519             "AIL\002)";
00520     static char fmt_99998[] = "(/\002 CASE  N INCX INCY MODE  I             "
00521             "               \002,\002 COMP(I)                             TRU"
00522             "E(I)  DIFFERENCE\002,\002     SIZE(I)\002,/1x)";
00523     static char fmt_99997[] = "(1x,i4,i3,3i5,i3,2d36.8,2d12.4)";
00524 
00525     /* System generated locals */
00526     integer i__1;
00527     doublereal d__1, d__2, d__3, d__4, d__5;
00528 
00529     /* Builtin functions */
00530     integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00531 
00532     /* Local variables */
00533     integer i__;
00534     doublereal sd;
00535     extern doublereal sdiff_(doublereal *, doublereal *);
00536 
00537     /* Fortran I/O blocks */
00538     static cilist io___51 = { 0, 6, 0, fmt_99999, 0 };
00539     static cilist io___52 = { 0, 6, 0, fmt_99998, 0 };
00540     static cilist io___53 = { 0, 6, 0, fmt_99997, 0 };
00541 
00542 
00543 /*     ********************************* STEST ************************** */
00544 
00545 /*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO */
00546 /*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE */
00547 /*     NEGLIGIBLE. */
00548 
00549 /*     C. L. LAWSON, JPL, 1974 DEC 10 */
00550 
00551 /*     .. Parameters .. */
00552 /*     .. Scalar Arguments .. */
00553 /*     .. Array Arguments .. */
00554 /*     .. Scalars in Common .. */
00555 /*     .. Local Scalars .. */
00556 /*     .. External Functions .. */
00557 /*     .. Intrinsic Functions .. */
00558 /*     .. Common blocks .. */
00559 /*     .. Executable Statements .. */
00560 
00561     /* Parameter adjustments */
00562     --ssize;
00563     --strue;
00564     --scomp;
00565 
00566     /* Function Body */
00567     i__1 = *len;
00568     for (i__ = 1; i__ <= i__1; ++i__) {
00569         sd = scomp[i__] - strue[i__];
00570         d__4 = (d__1 = ssize[i__], abs(d__1)) + (d__2 = *sfac * sd, abs(d__2))
00571                 ;
00572         d__5 = (d__3 = ssize[i__], abs(d__3));
00573         if (sdiff_(&d__4, &d__5) == 0.) {
00574             goto L40;
00575         }
00576 
00577 /*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I). */
00578 
00579         if (! combla_1.pass) {
00580             goto L20;
00581         }
00582 /*                             PRINT FAIL MESSAGE AND HEADER. */
00583         combla_1.pass = FALSE_;
00584         s_wsfe(&io___51);
00585         e_wsfe();
00586         s_wsfe(&io___52);
00587         e_wsfe();
00588 L20:
00589         s_wsfe(&io___53);
00590         do_fio(&c__1, (char *)&combla_1.icase, (ftnlen)sizeof(integer));
00591         do_fio(&c__1, (char *)&combla_1.n, (ftnlen)sizeof(integer));
00592         do_fio(&c__1, (char *)&combla_1.incx, (ftnlen)sizeof(integer));
00593         do_fio(&c__1, (char *)&combla_1.incy, (ftnlen)sizeof(integer));
00594         do_fio(&c__1, (char *)&combla_1.mode, (ftnlen)sizeof(integer));
00595         do_fio(&c__1, (char *)&i__, (ftnlen)sizeof(integer));
00596         do_fio(&c__1, (char *)&scomp[i__], (ftnlen)sizeof(doublereal));
00597         do_fio(&c__1, (char *)&strue[i__], (ftnlen)sizeof(doublereal));
00598         do_fio(&c__1, (char *)&sd, (ftnlen)sizeof(doublereal));
00599         do_fio(&c__1, (char *)&ssize[i__], (ftnlen)sizeof(doublereal));
00600         e_wsfe();
00601 L40:
00602         ;
00603     }
00604     return 0;
00605 
00606 } /* stest_ */
00607 
00608 /* Subroutine */ int stest1_(doublereal *scomp1, doublereal *strue1, 
00609         doublereal *ssize, doublereal *sfac)
00610 {
00611     doublereal scomp[1], strue[1];
00612     extern /* Subroutine */ int stest_(integer *, doublereal *, doublereal *, 
00613             doublereal *, doublereal *);
00614 
00615 /*     ************************* STEST1 ***************************** */
00616 
00617 /*     THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN */
00618 /*     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE */
00619 /*     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT. */
00620 
00621 /*     C.L. LAWSON, JPL, 1978 DEC 6 */
00622 
00623 /*     .. Scalar Arguments .. */
00624 /*     .. Array Arguments .. */
00625 /*     .. Local Arrays .. */
00626 /*     .. External Subroutines .. */
00627 /*     .. Executable Statements .. */
00628 
00629     /* Parameter adjustments */
00630     --ssize;
00631 
00632     /* Function Body */
00633     scomp[0] = *scomp1;
00634     strue[0] = *strue1;
00635     stest_(&c__1, scomp, strue, &ssize[1], sfac);
00636 
00637     return 0;
00638 } /* stest1_ */
00639 
00640 doublereal sdiff_(doublereal *sa, doublereal *sb)
00641 {
00642     /* System generated locals */
00643     doublereal ret_val;
00644 
00645 /*     ********************************* SDIFF ************************** */
00646 /*     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15 */
00647 
00648 /*     .. Scalar Arguments .. */
00649 /*     .. Executable Statements .. */
00650     ret_val = *sa - *sb;
00651     return ret_val;
00652 } /* sdiff_ */
00653 
00654 /* Subroutine */ int ctest_(integer *len, doublecomplex *ccomp, doublecomplex 
00655         *ctrue, doublecomplex *csize, doublereal *sfac)
00656 {
00657     /* System generated locals */
00658     integer i__1, i__2;
00659 
00660     /* Builtin functions */
00661     double d_imag(doublecomplex *);
00662 
00663     /* Local variables */
00664     integer i__;
00665     doublereal scomp[20], ssize[20], strue[20];
00666     extern /* Subroutine */ int stest_(integer *, doublereal *, doublereal *, 
00667             doublereal *, doublereal *);
00668 
00669 /*     **************************** CTEST ***************************** */
00670 
00671 /*     C.L. LAWSON, JPL, 1978 DEC 6 */
00672 
00673 /*     .. Scalar Arguments .. */
00674 /*     .. Array Arguments .. */
00675 /*     .. Local Scalars .. */
00676 /*     .. Local Arrays .. */
00677 /*     .. External Subroutines .. */
00678 /*     .. Intrinsic Functions .. */
00679 /*     .. Executable Statements .. */
00680     /* Parameter adjustments */
00681     --csize;
00682     --ctrue;
00683     --ccomp;
00684 
00685     /* Function Body */
00686     i__1 = *len;
00687     for (i__ = 1; i__ <= i__1; ++i__) {
00688         i__2 = i__;
00689         scomp[(i__ << 1) - 2] = ccomp[i__2].r;
00690         scomp[(i__ << 1) - 1] = d_imag(&ccomp[i__]);
00691         i__2 = i__;
00692         strue[(i__ << 1) - 2] = ctrue[i__2].r;
00693         strue[(i__ << 1) - 1] = d_imag(&ctrue[i__]);
00694         i__2 = i__;
00695         ssize[(i__ << 1) - 2] = csize[i__2].r;
00696         ssize[(i__ << 1) - 1] = d_imag(&csize[i__]);
00697 /* L20: */
00698     }
00699 
00700     i__1 = *len << 1;
00701     stest_(&i__1, scomp, strue, ssize, sfac);
00702     return 0;
00703 } /* ctest_ */
00704 
00705 /* Subroutine */ int itest1_(integer *icomp, integer *itrue)
00706 {
00707     /* Format strings */
00708     static char fmt_99999[] = "(\002                                       F"
00709             "AIL\002)";
00710     static char fmt_99998[] = "(/\002 CASE  N INCX INCY MODE                "
00711             "               \002,\002 COMP                                TRU"
00712             "E     DIFFERENCE\002,/1x)";
00713     static char fmt_99997[] = "(1x,i4,i3,3i5,2i36,i12)";
00714 
00715     /* Builtin functions */
00716     integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00717 
00718     /* Local variables */
00719     integer id;
00720 
00721     /* Fortran I/O blocks */
00722     static cilist io___60 = { 0, 6, 0, fmt_99999, 0 };
00723     static cilist io___61 = { 0, 6, 0, fmt_99998, 0 };
00724     static cilist io___63 = { 0, 6, 0, fmt_99997, 0 };
00725 
00726 
00727 /*     ********************************* ITEST1 ************************* */
00728 
00729 /*     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR */
00730 /*     EQUALITY. */
00731 /*     C. L. LAWSON, JPL, 1974 DEC 10 */
00732 
00733 /*     .. Parameters .. */
00734 /*     .. Scalar Arguments .. */
00735 /*     .. Scalars in Common .. */
00736 /*     .. Local Scalars .. */
00737 /*     .. Common blocks .. */
00738 /*     .. Executable Statements .. */
00739     if (*icomp == *itrue) {
00740         goto L40;
00741     }
00742 
00743 /*                            HERE ICOMP IS NOT EQUAL TO ITRUE. */
00744 
00745     if (! combla_1.pass) {
00746         goto L20;
00747     }
00748 /*                             PRINT FAIL MESSAGE AND HEADER. */
00749     combla_1.pass = FALSE_;
00750     s_wsfe(&io___60);
00751     e_wsfe();
00752     s_wsfe(&io___61);
00753     e_wsfe();
00754 L20:
00755     id = *icomp - *itrue;
00756     s_wsfe(&io___63);
00757     do_fio(&c__1, (char *)&combla_1.icase, (ftnlen)sizeof(integer));
00758     do_fio(&c__1, (char *)&combla_1.n, (ftnlen)sizeof(integer));
00759     do_fio(&c__1, (char *)&combla_1.incx, (ftnlen)sizeof(integer));
00760     do_fio(&c__1, (char *)&combla_1.incy, (ftnlen)sizeof(integer));
00761     do_fio(&c__1, (char *)&combla_1.mode, (ftnlen)sizeof(integer));
00762     do_fio(&c__1, (char *)&(*icomp), (ftnlen)sizeof(integer));
00763     do_fio(&c__1, (char *)&(*itrue), (ftnlen)sizeof(integer));
00764     do_fio(&c__1, (char *)&id, (ftnlen)sizeof(integer));
00765     e_wsfe();
00766 L40:
00767     return 0;
00768 
00769 } /* itest1_ */
00770 
00771 /* Main program alias */ int zblat1_ () { MAIN__ (); return 0; }


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