void RunCases(const int CacheSize, const TYPE thresh, const int MFLOP, const int ldagap, const int nuplo, const enum ATLAS_UPLO *Uplos, const int N0, const int NN, const int incN) { int i, lda, n, iup, np=0, nc=0, ns=0; fprintf(stdout, "NREPS UPLO N lda TIME MFLOPS RESID\n"); fprintf(stdout, "===== ===== ===== ===== ============ ============ ============\n"); for (n=N0; n <= NN; n += incN) { if (ldagap >= 0) lda = ldagap + n; else lda = NN; for (iup=0; iup < nuplo; iup++) { i = RunCase(CacheSize, thresh, MFLOP, Uplos[iup], n, lda); if (i > 0) np++; else if (i < 0) ns++; nc++; } } if (thresh > ATL_rzero) fprintf(stdout, "\n%d cases: %d passed, %d skipped, %d failed\n", nc, np, ns, nc-np-ns); }
void RunCases(int CacheSize, TYPE thresh, int MFLOP, int norder, enum ATLAS_ORDER *Orders, int LdaIsM, int MisN, int NisM, int M0, int MN, int incM, int N0, int NN, int incN) { int i, j, m, n, io, lda, np=0, nc=0; fprintf(stdout, "NREPS Major M N lda NPVTS TIME MFLOP RESID\n"); fprintf(stdout, "===== ===== ===== ===== ===== ===== ======== ======== ========\n"); for (j = N0; j <= NN; j += incN) { n = j; for (i = M0; i <= MN; i += incM) { for (io=0; io < norder; io++) { lda = -1; if (MisN) { m = n; if (!LdaIsM) lda = NN; } else if (NisM) { m = n = i; if (!LdaIsM) lda = MN; } else { m = i; n = j; if (!LdaIsM) { if (Orders[io] == AtlasRowMajor) lda = NN; else lda = MN; } } if (lda == -1) { if (Orders[io] == AtlasRowMajor) lda = n; else lda = m; } if (RunCase(CacheSize, thresh, MFLOP, Orders[io], m, n, lda)) np++; nc++; } } } if (thresh > ATL_rzero) { if (nc == np) fprintf(stdout, "\nALL %d CASES PASSED\n", nc); else fprintf(stdout, "\n%d cases ran, %d cases passed, %d failed\n\n", nc, np, nc-np); } }
void WriteProgOuts(FILE *fp, float *cases, int nSamples) { static int i, j; for (i = 0; i < nSamples; i++) { InitCase(i, cases); RunCase(caseVector); fprintf(fp, "%f\n", caseVector[0]); } fclose(fp); }
void WriteBestProgOuts(char *fName, float *cases, int nSamples) { static int i, j; FILE *fp; fp = fopen(fName, "w"); for (i = 0; i < nSamples; i++) { InitCase(i, cases); RunCase(caseVector); fprintf(fp, "%f\n", caseVector[0]); } fclose(fp); }
void RunCases(const int CacheSize, const TYPE thresh, const int MFLOP, const int ldagap, const int norder, const enum ATLAS_ORDER *Orders, const int nuplo, const enum ATLAS_UPLO *Uplos, const int ndiag, const enum ATLAS_DIAG *Diags, const int N0, const int NN, const int incN) { int i, lda, n, ior, iup, idiag, np=0, nc=0, ns=0; fprintf(stdout, "NREPS Ord. UPLO DIAG N lda TIME MFLOPS RESID\n"); fprintf(stdout, "===== ==== ===== ===== ===== ===== ============ ============ ============\n"); for (n=N0; n <= NN; n += incN) { if (ldagap >= 0) lda = ldagap + n; else lda = NN; for (ior=0; ior < norder; ior++) { for (iup=0; iup < nuplo; iup++) { for (idiag=0; idiag < ndiag; idiag++) { i = RunCase(CacheSize, thresh, MFLOP, Orders[ior], Uplos[iup], Diags[idiag], n, lda); if (i > 0) np++; else if (i < 0) ns++; nc++; } } } } if (thresh > ATL_rzero) fprintf(stdout, "\n%d cases: %d passed, %d skipped, %d failed\n", nc, np, ns, nc-np-ns); }