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 real c_b43 = 1.f;
00031
00032 int MAIN__(void)
00033 {
00034
00035
00036 static real sfac = 9.765625e-4f;
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_(real *), check2_(real *), header_(
00051 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] = "CDOTC " "CDOTU " "CAXPY " "CCOPY " "CSWAP " "SCNR"
00105 "M2" "SCASUM" "CSCAL " "CSSCAL" "ICAMAX";
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_(real *sfac)
00133 {
00134
00135
00136 static real strue2[5] = { 0.f,.5f,.6f,.7f,.8f };
00137 static real strue4[5] = { 0.f,.7f,1.f,1.3f,1.6f };
00138 static complex ctrue5[80] = { {.1f,.1f},{1.f,2.f},{
00139 1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{-.16f,
00140 -.37f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f}
00141 ,{3.f,4.f},{-.17f,-.19f},{.13f,-.39f},{5.f,6.f},{5.f,6.f},{5.f,
00142 6.f},{5.f,6.f},{5.f,6.f},{5.f,6.f},{.11f,-.03f},{-.17f,.46f},{
00143 -.17f,-.19f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{
00144 .19f,-.17f},{.2f,-.35f},{.35f,.2f},{.14f,.08f},{2.f,3.f},{2.f,3.f}
00145 ,{2.f,3.f},{2.f,3.f},{.1f,.1f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{4.f,
00146 5.f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{-.16f,-.37f},{6.f,7.f},{6.f,
00147 7.f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{-.17f,
00148 -.19f},{8.f,9.f},{.13f,-.39f},{2.f,5.f},{2.f,5.f},{2.f,5.f},{2.f,
00149 5.f},{2.f,5.f},{.11f,-.03f},{3.f,6.f},{-.17f,.46f},{4.f,7.f},{
00150 -.17f,-.19f},{7.f,2.f},{7.f,2.f},{7.f,2.f},{.19f,-.17f},{5.f,8.f},
00151 {.2f,-.35f},{6.f,9.f},{.35f,.2f},{8.f,3.f},{.14f,.08f},{9.f,4.f} }
00152 ;
00153 static complex ctrue6[80] = { {.1f,.1f},{1.f,2.f},{
00154 1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{.09f,
00155 -.12f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f}
00156 ,{3.f,4.f},{.03f,-.09f},{.15f,-.03f},{5.f,6.f},{5.f,6.f},{5.f,6.f}
00157 ,{5.f,6.f},{5.f,6.f},{5.f,6.f},{.03f,.03f},{-.18f,.03f},{.03f,
00158 -.09f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{.09f,
00159 .03f},{.15f,0.f},{0.f,.15f},{0.f,.06f},{2.f,3.f},{2.f,3.f},{2.f,
00160 3.f},{2.f,3.f},{.1f,.1f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{
00161 4.f,5.f},{4.f,5.f},{4.f,5.f},{.09f,-.12f},{6.f,7.f},{6.f,7.f},{
00162 6.f,7.f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{.03f,-.09f},{
00163 8.f,9.f},{.15f,-.03f},{2.f,5.f},{2.f,5.f},{2.f,5.f},{2.f,5.f},{
00164 2.f,5.f},{.03f,.03f},{3.f,6.f},{-.18f,.03f},{4.f,7.f},{.03f,-.09f}
00165 ,{7.f,2.f},{7.f,2.f},{7.f,2.f},{.09f,.03f},{5.f,8.f},{.15f,0.f},{
00166 6.f,9.f},{0.f,.15f},{8.f,3.f},{0.f,.06f},{9.f,4.f} };
00167 static integer itrue3[5] = { 0,1,2,2,2 };
00168 static real sa = .3f;
00169 static complex ca = {.4f,-.7f};
00170 static complex cv[80] = { {.1f,.1f},{1.f,2.f},{
00171 1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{1.f,2.f},{.3f,
00172 -.4f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},{3.f,4.f},
00173 {3.f,4.f},{.1f,-.3f},{.5f,-.1f},{5.f,6.f},{5.f,6.f},{5.f,6.f},{
00174 5.f,6.f},{5.f,6.f},{5.f,6.f},{.1f,.1f},{-.6f,.1f},{.1f,-.3f},{7.f,
00175 8.f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{7.f,8.f},{.3f,.1f},{.5f,0.f},{
00176 0.f,.5f},{0.f,.2f},{2.f,3.f},{2.f,3.f},{2.f,3.f},{2.f,3.f},{.1f,
00177 .1f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{4.f,5.f},{
00178 4.f,5.f},{.3f,-.4f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{6.f,7.f},{6.f,
00179 7.f},{6.f,7.f},{6.f,7.f},{.1f,-.3f},{8.f,9.f},{.5f,-.1f},{2.f,5.f}
00180 ,{2.f,5.f},{2.f,5.f},{2.f,5.f},{2.f,5.f},{.1f,.1f},{3.f,6.f},{
00181 -.6f,.1f},{4.f,7.f},{.1f,-.3f},{7.f,2.f},{7.f,2.f},{7.f,2.f},{.3f,
00182 .1f},{5.f,8.f},{.5f,0.f},{6.f,9.f},{0.f,.5f},{8.f,3.f},{0.f,.2f},{
00183 9.f,4.f} };
00184
00185
00186 integer i__1, i__2, i__3;
00187 real r__1;
00188 complex q__1;
00189
00190
00191 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
00192 e_wsle(void);
00193 int s_stop(char *, ftnlen);
00194
00195
00196 integer i__;
00197 complex cx[8];
00198 integer np1, len;
00199 extern int cscal_(integer *, complex *, complex *,
00200 integer *), ctest_(integer *, complex *, complex *, complex *,
00201 real *);
00202 complex mwpcs[5], mwpct[5];
00203 extern doublereal scnrm2_(integer *, complex *, integer *);
00204 extern int itest1_(integer *, integer *), stest1_(real *,
00205 real *, real *, real *);
00206 extern integer icamax_(integer *, complex *, integer *);
00207 extern int csscal_(integer *, real *, complex *, integer
00208 *);
00209 extern doublereal scasum_(integer *, complex *, integer *);
00210
00211
00212 static cilist io___19 = { 0, 6, 0, 0, 0 };
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226 for (combla_1.incx = 1; combla_1.incx <= 2; ++combla_1.incx) {
00227 for (np1 = 1; np1 <= 5; ++np1) {
00228 combla_1.n = np1 - 1;
00229 len = max(combla_1.n,1) << 1;
00230
00231 i__1 = len;
00232 for (i__ = 1; i__ <= i__1; ++i__) {
00233 i__2 = i__ - 1;
00234 i__3 = i__ + (np1 + combla_1.incx * 5 << 3) - 49;
00235 cx[i__2].r = cv[i__3].r, cx[i__2].i = cv[i__3].i;
00236
00237 }
00238 if (combla_1.icase == 6) {
00239
00240 r__1 = scnrm2_(&combla_1.n, cx, &combla_1.incx);
00241 stest1_(&r__1, &strue2[np1 - 1], &strue2[np1 - 1], sfac);
00242 } else if (combla_1.icase == 7) {
00243
00244 r__1 = scasum_(&combla_1.n, cx, &combla_1.incx);
00245 stest1_(&r__1, &strue4[np1 - 1], &strue4[np1 - 1], sfac);
00246 } else if (combla_1.icase == 8) {
00247
00248 cscal_(&combla_1.n, &ca, cx, &combla_1.incx);
00249 ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
00250 &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
00251 } else if (combla_1.icase == 9) {
00252
00253 csscal_(&combla_1.n, &sa, cx, &combla_1.incx);
00254 ctest_(&len, cx, &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48],
00255 &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
00256 } else if (combla_1.icase == 10) {
00257
00258 i__1 = icamax_(&combla_1.n, cx, &combla_1.incx);
00259 itest1_(&i__1, &itrue3[np1 - 1]);
00260 } else {
00261 s_wsle(&io___19);
00262 do_lio(&c__9, &c__1, " Shouldn't be here in CHECK1", (ftnlen)
00263 28);
00264 e_wsle();
00265 s_stop("", (ftnlen)0);
00266 }
00267
00268
00269 }
00270
00271 }
00272
00273 combla_1.incx = 1;
00274 if (combla_1.icase == 8) {
00275
00276
00277 ca.r = 0.f, ca.i = 0.f;
00278 for (i__ = 1; i__ <= 5; ++i__) {
00279 i__1 = i__ - 1;
00280 mwpct[i__1].r = 0.f, mwpct[i__1].i = 0.f;
00281 i__1 = i__ - 1;
00282 mwpcs[i__1].r = 1.f, mwpcs[i__1].i = 1.f;
00283
00284 }
00285 cscal_(&c__5, &ca, cx, &combla_1.incx);
00286 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00287 } else if (combla_1.icase == 9) {
00288
00289
00290 sa = 0.f;
00291 for (i__ = 1; i__ <= 5; ++i__) {
00292 i__1 = i__ - 1;
00293 mwpct[i__1].r = 0.f, mwpct[i__1].i = 0.f;
00294 i__1 = i__ - 1;
00295 mwpcs[i__1].r = 1.f, mwpcs[i__1].i = 1.f;
00296
00297 }
00298 csscal_(&c__5, &sa, cx, &combla_1.incx);
00299 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00300
00301 sa = 1.f;
00302 for (i__ = 1; i__ <= 5; ++i__) {
00303 i__1 = i__ - 1;
00304 i__2 = i__ - 1;
00305 mwpct[i__1].r = cx[i__2].r, mwpct[i__1].i = cx[i__2].i;
00306 i__1 = i__ - 1;
00307 i__2 = i__ - 1;
00308 mwpcs[i__1].r = cx[i__2].r, mwpcs[i__1].i = cx[i__2].i;
00309
00310 }
00311 csscal_(&c__5, &sa, cx, &combla_1.incx);
00312 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00313
00314 sa = -1.f;
00315 for (i__ = 1; i__ <= 5; ++i__) {
00316 i__1 = i__ - 1;
00317 i__2 = i__ - 1;
00318 q__1.r = -cx[i__2].r, q__1.i = -cx[i__2].i;
00319 mwpct[i__1].r = q__1.r, mwpct[i__1].i = q__1.i;
00320 i__1 = i__ - 1;
00321 i__2 = i__ - 1;
00322 q__1.r = -cx[i__2].r, q__1.i = -cx[i__2].i;
00323 mwpcs[i__1].r = q__1.r, mwpcs[i__1].i = q__1.i;
00324
00325 }
00326 csscal_(&c__5, &sa, cx, &combla_1.incx);
00327 ctest_(&c__5, cx, mwpct, mwpcs, sfac);
00328 }
00329 return 0;
00330 }
00331
00332 int check2_(real *sfac)
00333 {
00334
00335
00336 static complex ca = {.4f,-.7f};
00337 static integer incxs[4] = { 1,2,-2,-1 };
00338 static integer incys[4] = { 1,-2,1,-2 };
00339 static integer lens[8] = { 1,1,2,4,1,1,3,7 };
00340 static integer ns[4] = { 0,1,2,4 };
00341 static complex cx1[7] = { {.7f,-.8f},{-.4f,-.7f},{-.1f,-.9f},{.2f,-.8f},{
00342 -.9f,-.4f},{.1f,.4f},{-.6f,.6f} };
00343 static complex cy1[7] = { {.6f,-.6f},{-.9f,.5f},{.7f,-.6f},{.1f,-.5f},{
00344 -.1f,-.2f},{-.5f,-.3f},{.8f,-.7f} };
00345 static complex ct8[112] = { {.6f,-.6f},{0.f,0.f},{
00346 0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.32f,-1.41f},{
00347 0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.32f,
00348 -1.41f},{-1.55f,.5f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00349 0.f},{.32f,-1.41f},{-1.55f,.5f},{.03f,-.89f},{-.38f,-.96f},{0.f,
00350 0.f},{0.f,0.f},{0.f,0.f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},
00351 {0.f,0.f},{0.f,0.f},{0.f,0.f},{.32f,-1.41f},{0.f,0.f},{0.f,0.f},{
00352 0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{-.07f,-.89f},{-.9f,.5f},{
00353 .42f,-1.41f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.78f,.06f},{
00354 -.9f,.5f},{.06f,-.13f},{.1f,-.5f},{-.77f,-.49f},{-.5f,-.3f},{.52f,
00355 -1.51f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00356 0.f},{0.f,0.f},{.32f,-1.41f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00357 0.f},{0.f,0.f},{0.f,0.f},{-.07f,-.89f},{-1.18f,-.31f},{0.f,0.f},{
00358 0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.78f,.06f},{-1.54f,.97f},{
00359 .03f,-.89f},{-.18f,-1.31f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.6f,
00360 -.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},
00361 {.32f,-1.41f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{
00362 0.f,0.f},{.32f,-1.41f},{-.9f,.5f},{.05f,-.6f},{0.f,0.f},{0.f,0.f},
00363 {0.f,0.f},{0.f,0.f},{.32f,-1.41f},{-.9f,.5f},{.05f,-.6f},{.1f,
00364 -.5f},{-.77f,-.49f},{-.5f,-.3f},{.32f,-1.16f} };
00365 static complex ct7[16] = { {0.f,0.f},{-.06f,-.9f},{
00366 .65f,-.47f},{-.34f,-1.22f},{0.f,0.f},{-.06f,-.9f},{-.59f,-1.46f},{
00367 -1.04f,-.04f},{0.f,0.f},{-.06f,-.9f},{-.83f,.59f},{.07f,-.37f},{
00368 0.f,0.f},{-.06f,-.9f},{-.76f,-1.15f},{-1.33f,-1.82f} };
00369 static complex ct6[16] = { {0.f,0.f},{.9f,.06f},{
00370 .91f,-.77f},{1.8f,-.1f},{0.f,0.f},{.9f,.06f},{1.45f,.74f},{.2f,
00371 .9f},{0.f,0.f},{.9f,.06f},{-.55f,.23f},{.83f,-.39f},{0.f,0.f},{
00372 .9f,.06f},{1.04f,.79f},{1.95f,1.22f} };
00373 static complex ct10x[112] = { {.7f,-.8f},{0.f,0.f},{
00374 0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.6f,-.6f},{0.f,
00375 0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.6f,-.6f},
00376 {-.9f,.5f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.6f,
00377 -.6f},{-.9f,.5f},{.7f,-.6f},{.1f,-.5f},{0.f,0.f},{0.f,0.f},{0.f,
00378 0.f},{.7f,-.8f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},
00379 {0.f,0.f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00380 0.f},{0.f,0.f},{.7f,-.6f},{-.4f,-.7f},{.6f,-.6f},{0.f,0.f},{0.f,
00381 0.f},{0.f,0.f},{0.f,0.f},{.8f,-.7f},{-.4f,-.7f},{-.1f,-.2f},{.2f,
00382 -.8f},{.7f,-.6f},{.1f,.4f},{.6f,-.6f},{.7f,-.8f},{0.f,0.f},{0.f,
00383 0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.6f,-.6f},{0.f,0.f},
00384 {0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{-.9f,.5f},{
00385 -.4f,-.7f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{
00386 .1f,-.5f},{-.4f,-.7f},{.7f,-.6f},{.2f,-.8f},{-.9f,.5f},{.1f,.4f},{
00387 .6f,-.6f},{.7f,-.8f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00388 0.f},{0.f,0.f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},
00389 {0.f,0.f},{0.f,0.f},{.6f,-.6f},{.7f,-.6f},{0.f,0.f},{0.f,0.f},{
00390 0.f,0.f},{0.f,0.f},{0.f,0.f},{.6f,-.6f},{.7f,-.6f},{-.1f,-.2f},{
00391 .8f,-.7f},{0.f,0.f},{0.f,0.f},{0.f,0.f} };
00392 static complex ct10y[112] = { {.6f,-.6f},{0.f,0.f},{
00393 0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.7f,-.8f},{0.f,
00394 0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.7f,-.8f},
00395 {-.4f,-.7f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{
00396 .7f,-.8f},{-.4f,-.7f},{-.1f,-.9f},{.2f,-.8f},{0.f,0.f},{0.f,0.f},{
00397 0.f,0.f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00398 0.f},{0.f,0.f},{.7f,-.8f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},
00399 {0.f,0.f},{0.f,0.f},{-.1f,-.9f},{-.9f,.5f},{.7f,-.8f},{0.f,0.f},{
00400 0.f,0.f},{0.f,0.f},{0.f,0.f},{-.6f,.6f},{-.9f,.5f},{-.9f,-.4f},{
00401 .1f,-.5f},{-.1f,-.9f},{-.5f,-.3f},{.7f,-.8f},{.6f,-.6f},{0.f,0.f},
00402 {0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{.7f,-.8f},{0.f,
00403 0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{-.1f,-.9f}
00404 ,{.7f,-.8f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{
00405 -.6f,.6f},{-.9f,-.4f},{-.1f,-.9f},{.7f,-.8f},{0.f,0.f},{0.f,0.f},{
00406 0.f,0.f},{.6f,-.6f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,
00407 0.f},{0.f,0.f},{.7f,-.8f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},
00408 {0.f,0.f},{0.f,0.f},{.7f,-.8f},{-.9f,.5f},{-.4f,-.7f},{0.f,0.f},{
00409 0.f,0.f},{0.f,0.f},{0.f,0.f},{.7f,-.8f},{-.9f,.5f},{-.4f,-.7f},{
00410 .1f,-.5f},{-.1f,-.9f},{-.5f,-.3f},{.2f,-.8f} };
00411 static complex csize1[4] = { {0.f,0.f},{.9f,.9f},{1.63f,1.73f},{2.9f,
00412 2.78f} };
00413 static complex csize3[14] = { {0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{
00414 0.f,0.f},{0.f,0.f},{0.f,0.f},{1.17f,1.17f},{1.17f,1.17f},{1.17f,
00415 1.17f},{1.17f,1.17f},{1.17f,1.17f},{1.17f,1.17f},{1.17f,1.17f} };
00416 static complex csize2[14] = { {0.f,0.f},{0.f,0.f},{0.f,
00417 0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{0.f,0.f},{1.54f,1.54f},{1.54f,
00418 1.54f},{1.54f,1.54f},{1.54f,1.54f},{1.54f,1.54f},{1.54f,1.54f},{
00419 1.54f,1.54f} };
00420
00421
00422 integer i__1, i__2;
00423 complex q__1;
00424
00425
00426 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
00427 e_wsle(void);
00428 int s_stop(char *, ftnlen);
00429
00430
00431 integer i__, ki, kn;
00432 complex cx[7], cy[7];
00433 integer mx, my;
00434 complex cdot[1];
00435 integer lenx, leny;
00436 extern VOID cdotc_(complex *, integer *, complex *, integer
00437 *, complex *, integer *);
00438 extern int ccopy_(integer *, complex *, integer *,
00439 complex *, integer *);
00440 extern VOID cdotu_(complex *, integer *, complex *, integer
00441 *, complex *, integer *);
00442 extern int cswap_(integer *, complex *, integer *,
00443 complex *, integer *), ctest_(integer *, complex *, complex *,
00444 complex *, real *);
00445 integer ksize;
00446 extern int caxpy_(integer *, complex *, complex *,
00447 integer *, complex *, integer *);
00448
00449
00450 static cilist io___48 = { 0, 6, 0, 0, 0 };
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464 for (ki = 1; ki <= 4; ++ki) {
00465 combla_1.incx = incxs[ki - 1];
00466 combla_1.incy = incys[ki - 1];
00467 mx = abs(combla_1.incx);
00468 my = abs(combla_1.incy);
00469
00470 for (kn = 1; kn <= 4; ++kn) {
00471 combla_1.n = ns[kn - 1];
00472 ksize = min(2,kn);
00473 lenx = lens[kn + (mx << 2) - 5];
00474 leny = lens[kn + (my << 2) - 5];
00475
00476 for (i__ = 1; i__ <= 7; ++i__) {
00477 i__1 = i__ - 1;
00478 i__2 = i__ - 1;
00479 cx[i__1].r = cx1[i__2].r, cx[i__1].i = cx1[i__2].i;
00480 i__1 = i__ - 1;
00481 i__2 = i__ - 1;
00482 cy[i__1].r = cy1[i__2].r, cy[i__1].i = cy1[i__2].i;
00483
00484 }
00485 if (combla_1.icase == 1) {
00486
00487 cdotc_(&q__1, &combla_1.n, cx, &combla_1.incx, cy, &
00488 combla_1.incy);
00489 cdot[0].r = q__1.r, cdot[0].i = q__1.i;
00490 ctest_(&c__1, cdot, &ct6[kn + (ki << 2) - 5], &csize1[kn - 1],
00491 sfac);
00492 } else if (combla_1.icase == 2) {
00493
00494 cdotu_(&q__1, &combla_1.n, cx, &combla_1.incx, cy, &
00495 combla_1.incy);
00496 cdot[0].r = q__1.r, cdot[0].i = q__1.i;
00497 ctest_(&c__1, cdot, &ct7[kn + (ki << 2) - 5], &csize1[kn - 1],
00498 sfac);
00499 } else if (combla_1.icase == 3) {
00500
00501 caxpy_(&combla_1.n, &ca, cx, &combla_1.incx, cy, &
00502 combla_1.incy);
00503 ctest_(&leny, cy, &ct8[(kn + (ki << 2)) * 7 - 35], &csize2[
00504 ksize * 7 - 7], sfac);
00505 } else if (combla_1.icase == 4) {
00506
00507 ccopy_(&combla_1.n, cx, &combla_1.incx, cy, &combla_1.incy);
00508 ctest_(&leny, cy, &ct10y[(kn + (ki << 2)) * 7 - 35], csize3, &
00509 c_b43);
00510 } else if (combla_1.icase == 5) {
00511
00512 cswap_(&combla_1.n, cx, &combla_1.incx, cy, &combla_1.incy);
00513 ctest_(&lenx, cx, &ct10x[(kn + (ki << 2)) * 7 - 35], csize3, &
00514 c_b43);
00515 ctest_(&leny, cy, &ct10y[(kn + (ki << 2)) * 7 - 35], csize3, &
00516 c_b43);
00517 } else {
00518 s_wsle(&io___48);
00519 do_lio(&c__9, &c__1, " Shouldn't be here in CHECK2", (ftnlen)
00520 28);
00521 e_wsle();
00522 s_stop("", (ftnlen)0);
00523 }
00524
00525
00526 }
00527
00528 }
00529 return 0;
00530 }
00531
00532 int stest_(integer *len, real *scomp, real *strue, real *
00533 ssize, real *sfac)
00534 {
00535
00536 static char fmt_99999[] = "(\002 F"
00537 "AIL\002)";
00538 static char fmt_99998[] = "(/\002 CASE N INCX INCY MODE I "
00539 " \002,\002 COMP(I) TRU"
00540 "E(I) DIFFERENCE\002,\002 SIZE(I)\002,/1x)";
00541 static char fmt_99997[] = "(1x,i4,i3,3i5,i3,2e36.8,2e12.4)";
00542
00543
00544 integer i__1;
00545 real r__1, r__2, r__3, r__4, r__5;
00546
00547
00548 integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00549
00550
00551 integer i__;
00552 real sd;
00553 extern doublereal sdiff_(real *, real *);
00554
00555
00556 static cilist io___51 = { 0, 6, 0, fmt_99999, 0 };
00557 static cilist io___52 = { 0, 6, 0, fmt_99998, 0 };
00558 static cilist io___53 = { 0, 6, 0, fmt_99997, 0 };
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580 --ssize;
00581 --strue;
00582 --scomp;
00583
00584
00585 i__1 = *len;
00586 for (i__ = 1; i__ <= i__1; ++i__) {
00587 sd = scomp[i__] - strue[i__];
00588 r__4 = (r__1 = ssize[i__], dabs(r__1)) + (r__2 = *sfac * sd, dabs(
00589 r__2));
00590 r__5 = (r__3 = ssize[i__], dabs(r__3));
00591 if (sdiff_(&r__4, &r__5) == 0.f) {
00592 goto L40;
00593 }
00594
00595
00596
00597 if (! combla_1.pass) {
00598 goto L20;
00599 }
00600
00601 combla_1.pass = FALSE_;
00602 s_wsfe(&io___51);
00603 e_wsfe();
00604 s_wsfe(&io___52);
00605 e_wsfe();
00606 L20:
00607 s_wsfe(&io___53);
00608 do_fio(&c__1, (char *)&combla_1.icase, (ftnlen)sizeof(integer));
00609 do_fio(&c__1, (char *)&combla_1.n, (ftnlen)sizeof(integer));
00610 do_fio(&c__1, (char *)&combla_1.incx, (ftnlen)sizeof(integer));
00611 do_fio(&c__1, (char *)&combla_1.incy, (ftnlen)sizeof(integer));
00612 do_fio(&c__1, (char *)&combla_1.mode, (ftnlen)sizeof(integer));
00613 do_fio(&c__1, (char *)&i__, (ftnlen)sizeof(integer));
00614 do_fio(&c__1, (char *)&scomp[i__], (ftnlen)sizeof(real));
00615 do_fio(&c__1, (char *)&strue[i__], (ftnlen)sizeof(real));
00616 do_fio(&c__1, (char *)&sd, (ftnlen)sizeof(real));
00617 do_fio(&c__1, (char *)&ssize[i__], (ftnlen)sizeof(real));
00618 e_wsfe();
00619 L40:
00620 ;
00621 }
00622 return 0;
00623
00624 }
00625
00626 int stest1_(real *scomp1, real *strue1, real *ssize, real *
00627 sfac)
00628 {
00629 real scomp[1], strue[1];
00630 extern int stest_(integer *, real *, real *, real *,
00631 real *);
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648 --ssize;
00649
00650
00651 scomp[0] = *scomp1;
00652 strue[0] = *strue1;
00653 stest_(&c__1, scomp, strue, &ssize[1], sfac);
00654
00655 return 0;
00656 }
00657
00658 doublereal sdiff_(real *sa, real *sb)
00659 {
00660
00661 real ret_val;
00662
00663
00664
00665
00666
00667
00668 ret_val = *sa - *sb;
00669 return ret_val;
00670 }
00671
00672 int ctest_(integer *len, complex *ccomp, complex *ctrue,
00673 complex *csize, real *sfac)
00674 {
00675
00676 integer i__1, i__2;
00677
00678
00679 double r_imag(complex *);
00680
00681
00682 integer i__;
00683 real scomp[20], ssize[20], strue[20];
00684 extern int stest_(integer *, real *, real *, real *,
00685 real *);
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699 --csize;
00700 --ctrue;
00701 --ccomp;
00702
00703
00704 i__1 = *len;
00705 for (i__ = 1; i__ <= i__1; ++i__) {
00706 i__2 = i__;
00707 scomp[(i__ << 1) - 2] = ccomp[i__2].r;
00708 scomp[(i__ << 1) - 1] = r_imag(&ccomp[i__]);
00709 i__2 = i__;
00710 strue[(i__ << 1) - 2] = ctrue[i__2].r;
00711 strue[(i__ << 1) - 1] = r_imag(&ctrue[i__]);
00712 i__2 = i__;
00713 ssize[(i__ << 1) - 2] = csize[i__2].r;
00714 ssize[(i__ << 1) - 1] = r_imag(&csize[i__]);
00715
00716 }
00717
00718 i__1 = *len << 1;
00719 stest_(&i__1, scomp, strue, ssize, sfac);
00720 return 0;
00721 }
00722
00723 int itest1_(integer *icomp, integer *itrue)
00724 {
00725
00726 static char fmt_99999[] = "(\002 F"
00727 "AIL\002)";
00728 static char fmt_99998[] = "(/\002 CASE N INCX INCY MODE "
00729 " \002,\002 COMP TRU"
00730 "E DIFFERENCE\002,/1x)";
00731 static char fmt_99997[] = "(1x,i4,i3,3i5,2i36,i12)";
00732
00733
00734 integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00735
00736
00737 integer id;
00738
00739
00740 static cilist io___60 = { 0, 6, 0, fmt_99999, 0 };
00741 static cilist io___61 = { 0, 6, 0, fmt_99998, 0 };
00742 static cilist io___63 = { 0, 6, 0, fmt_99997, 0 };
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757 if (*icomp == *itrue) {
00758 goto L40;
00759 }
00760
00761
00762
00763 if (! combla_1.pass) {
00764 goto L20;
00765 }
00766
00767 combla_1.pass = FALSE_;
00768 s_wsfe(&io___60);
00769 e_wsfe();
00770 s_wsfe(&io___61);
00771 e_wsfe();
00772 L20:
00773 id = *icomp - *itrue;
00774 s_wsfe(&io___63);
00775 do_fio(&c__1, (char *)&combla_1.icase, (ftnlen)sizeof(integer));
00776 do_fio(&c__1, (char *)&combla_1.n, (ftnlen)sizeof(integer));
00777 do_fio(&c__1, (char *)&combla_1.incx, (ftnlen)sizeof(integer));
00778 do_fio(&c__1, (char *)&combla_1.incy, (ftnlen)sizeof(integer));
00779 do_fio(&c__1, (char *)&combla_1.mode, (ftnlen)sizeof(integer));
00780 do_fio(&c__1, (char *)&(*icomp), (ftnlen)sizeof(integer));
00781 do_fio(&c__1, (char *)&(*itrue), (ftnlen)sizeof(integer));
00782 do_fio(&c__1, (char *)&id, (ftnlen)sizeof(integer));
00783 e_wsfe();
00784 L40:
00785 return 0;
00786
00787 }
00788
00789 int cblat1_ () { MAIN__ (); return 0; }