00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 struct {
00019 integer icase, n, incx, incy, mode;
00020 logical pass;
00021 } combla_;
00022
00023 #define combla_1 combla_
00024
00025
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 int MAIN__(void)
00033 {
00034
00035
00036 static doublereal sfac = 9.765625e-4;
00037
00038
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
00045 integer s_wsfe(cilist *), e_wsfe(void);
00046 int s_stop(char *, ftnlen);
00047
00048
00049 integer ic;
00050 extern int check1_(doublereal *), check2_(doublereal *),
00051 header_(void);
00052
00053
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
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 s_wsfe(&io___2);
00069 e_wsfe();
00070 for (ic = 1; ic <= 10; ++ic) {
00071 combla_1.icase = ic;
00072 header_();
00073
00074
00075
00076
00077
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
00089 if (combla_1.pass) {
00090 s_wsfe(&io___4);
00091 e_wsfe();
00092 }
00093
00094 }
00095 s_stop("", (ftnlen)0);
00096
00097 return 0;
00098 }
00099
00100 int header_(void)
00101 {
00102
00103
00104 static char l[6*10] = "ZDOTC " "ZDOTU " "ZAXPY " "ZCOPY " "ZSWAP " "DZNR"
00105 "M2" "DZASUM" "ZSCAL " "ZDSCAL" "IZAMAX";
00106
00107
00108 static char fmt_99999[] = "(/\002 Test of subprogram number\002,i3,12x,a"
00109 "6)";
00110
00111
00112 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00113
00114
00115 static cilist io___6 = { 0, 6, 0, fmt_99999, 0 };
00116
00117
00118
00119
00120
00121
00122
00123
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 }
00131
00132 int check1_(doublereal *sfac)
00133 {
00134
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] = { {.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] = { {.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] = { {.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
00178 integer i__1, i__2, i__3;
00179 doublereal d__1;
00180 doublecomplex z__1;
00181
00182
00183 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
00184 e_wsle(void);
00185 int s_stop(char *, ftnlen);
00186
00187
00188 integer i__;
00189 doublecomplex cx[8];
00190 integer np1, len;
00191 extern int zscal_(integer *, doublecomplex *,
00192 doublecomplex *, integer *), ctest_(integer *, doublecomplex *,
00193 doublecomplex *, doublecomplex *, doublereal *);
00194 doublecomplex mwpcs[5], mwpct[5];
00195 extern int itest1_(integer *, integer *);
00196 extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
00197 extern 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
00204 static cilist io___19 = { 0, 6, 0, 0, 0 };
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
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
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
00229 }
00230 if (combla_1.icase == 6) {
00231
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
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
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
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
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
00261 }
00262
00263 }
00264
00265 combla_1.incx = 1;
00266 if (combla_1.icase == 8) {
00267
00268
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
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
00281
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
00289 }
00290 zdscal_(&c__5, &sa, cx, &combla_1.incx);
00291 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00292
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
00302 }
00303 zdscal_(&c__5, &sa, cx, &combla_1.incx);
00304 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00305
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
00317 }
00318 zdscal_(&c__5, &sa, cx, &combla_1.incx);
00319 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00320 }
00321 return 0;
00322 }
00323
00324 int check2_(doublereal *sfac)
00325 {
00326
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] = { 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] = { {.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] = { {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] = { {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] = { {.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] = { {.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] = { {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
00404 integer i__1, i__2;
00405 doublecomplex z__1;
00406
00407
00408 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
00409 e_wsle(void);
00410 int s_stop(char *, ftnlen);
00411
00412
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 int ctest_(integer *, doublecomplex *,
00419 doublecomplex *, doublecomplex *, doublereal *);
00420 extern VOID zdotc_(doublecomplex *, integer *,
00421 doublecomplex *, integer *, doublecomplex *, integer *);
00422 integer ksize;
00423 extern int zcopy_(integer *, doublecomplex *, integer *,
00424 doublecomplex *, integer *);
00425 extern VOID zdotu_(doublecomplex *, integer *,
00426 doublecomplex *, integer *, doublecomplex *, integer *);
00427 extern int zswap_(integer *, doublecomplex *, integer *,
00428 doublecomplex *, integer *), zaxpy_(integer *, doublecomplex *,
00429 doublecomplex *, integer *, doublecomplex *, integer *);
00430
00431
00432 static cilist io___48 = { 0, 6, 0, 0, 0 };
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
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
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
00466 }
00467 if (combla_1.icase == 1) {
00468
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
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
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
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
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
00508 }
00509
00510 }
00511 return 0;
00512 }
00513
00514 int stest_(integer *len, doublereal *scomp, doublereal *
00515 strue, doublereal *ssize, doublereal *sfac)
00516 {
00517
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
00526 integer i__1;
00527 doublereal d__1, d__2, d__3, d__4, d__5;
00528
00529
00530 integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00531
00532
00533 integer i__;
00534 doublereal sd;
00535 extern doublereal sdiff_(doublereal *, doublereal *);
00536
00537
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
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562 --ssize;
00563 --strue;
00564 --scomp;
00565
00566
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
00578
00579 if (! combla_1.pass) {
00580 goto L20;
00581 }
00582
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 }
00607
00608 int stest1_(doublereal *scomp1, doublereal *strue1,
00609 doublereal *ssize, doublereal *sfac)
00610 {
00611 doublereal scomp[1], strue[1];
00612 extern int stest_(integer *, doublereal *, doublereal *,
00613 doublereal *, doublereal *);
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630 --ssize;
00631
00632
00633 scomp[0] = *scomp1;
00634 strue[0] = *strue1;
00635 stest_(&c__1, scomp, strue, &ssize[1], sfac);
00636
00637 return 0;
00638 }
00639
00640 doublereal sdiff_(doublereal *sa, doublereal *sb)
00641 {
00642
00643 doublereal ret_val;
00644
00645
00646
00647
00648
00649
00650 ret_val = *sa - *sb;
00651 return ret_val;
00652 }
00653
00654 int ctest_(integer *len, doublecomplex *ccomp, doublecomplex
00655 *ctrue, doublecomplex *csize, doublereal *sfac)
00656 {
00657
00658 integer i__1, i__2;
00659
00660
00661 double d_imag(doublecomplex *);
00662
00663
00664 integer i__;
00665 doublereal scomp[20], ssize[20], strue[20];
00666 extern int stest_(integer *, doublereal *, doublereal *,
00667 doublereal *, doublereal *);
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681 --csize;
00682 --ctrue;
00683 --ccomp;
00684
00685
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
00698 }
00699
00700 i__1 = *len << 1;
00701 stest_(&i__1, scomp, strue, ssize, sfac);
00702 return 0;
00703 }
00704
00705 int itest1_(integer *icomp, integer *itrue)
00706 {
00707
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
00716 integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00717
00718
00719 integer id;
00720
00721
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
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739 if (*icomp == *itrue) {
00740 goto L40;
00741 }
00742
00743
00744
00745 if (! combla_1.pass) {
00746 goto L20;
00747 }
00748
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 }
00770
00771 int zblat1_ () { MAIN__ (); return 0; }