home *** CD-ROM | disk | FTP | other *** search
- /*
- * This file is part of the Livermore Loops transliteration into C.
- * Copyright (C) 1991 by Martin Fouts
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- #include <stdio.h>
- #include "types.h"
- #include "externs.h"
-
- Void valid();
- Void statw();
-
- Void report(logio, nk, tock, komput, kompil)
- Int logio, nk;
- Float tock;
- char *komput, *kompil;
- {
- Float rt[NTESTS], tempo[NTESTS], stat1[12];
- Float vl1[NTESTS], vl[NTESTS], tv[NTESTS], tv1[NTESTS];
- Float rt1[NTESTS], wt1[NTESTS], csum1[NTESTS];
-
- Float mops[NTESTS], mops1[NTESTS];
- Int map[NTESTS], in[NTESTS], ispan1[NTESTS];
-
- Float scaled;
- Int k, neff, lv;
-
- if (logio < 0) return;
- scaled= 1000000.0;
-
- for (k = 0; k < nk; k++) {
- rt[k]= (Time[k] - tock)*scaled;
- mops[k]= nrops[k]*loops[k];
- tempo[k]= 0.0;
- vl[k]= ispan[k];
- if( rt[k] != 0.0) tempo[k]= mops[k]/rt[k];
- }
- valid( tv,map,&neff, 1.0e-8,tempo, 1.0e+4,nk);
- for (k = 0; k < neff; k++) {
- mops1[k]= mops[ map[k]];
- rt1[k]= rt[ map[k]];
- vl1[k]= vl[ map[k]];
- ispan1[k]= ispan[ map[k]];
- wt1[k]= wt[ map[k]];
- tv1[k]= tempo[ map[k]];
- csum1[k]= csum[ map[k]];
- }
- statw( stat1,tv,in, vl1,wt1,neff);
- lv= stat1[0];
- statw( stat1,tv,in, tv1,wt1,neff);
- fprintf(stdout,"********************************************\n");
- fprintf(stdout,"The Livermore Fortran Kernels (In C!)\n");
- fprintf(stdout,"********************************************\n");
- fprintf(stdout,"Computer : %s\n", komput);
- fprintf(stdout,"Compiler : %s\n", kompil);
- fprintf(stdout,"Mean Vector L = %d\n", lv);
- fprintf(stdout,"********************************************\n");
- fprintf(stdout,
- "KERNEL FLOPS MICROSEC MFLOP/SEC SPAN WEIGHT SUM\n");
- fprintf(stdout,
- "------ ----- -------- --------- ---- ------ ---\n");
- for (k = 0; k < neff; k++)
- fprintf(stdout,"%6d%11.4e%11.4e%12.4e%6d%11.4e%20.12e\n", map[k]+1,
- mops1[k], rt1[k], tv1[k], ispan1[k], wt1[k], csum1[k]);
- fprintf(stdout,
- "------ ----- -------- --------- ---- ------ ---\n");
- fprintf(stdout," MFLOPS RANGE = %.4f TO %.4f Mega-Flops/Sec.\n",
- stat1[2], stat1[3]);
- fprintf(stdout," HARMONIC MEAN = %.4f Mega-Flops/Sec.\n", stat1[4]);
- fprintf(stdout," MEDIAN RATE = %.4f Mega-Flops/Sec.\n", stat1[6]);
- fprintf(stdout," MEDIAN DEV. = %.4f Mega-Flops/Sec.\n", stat1[8]);
- fprintf(stdout," AVERAGE RATE = %.4f Mega-Flops/Sec.\n", stat1[0]);
- fprintf(stdout," STANDARD DEV. = %.4f Mega-Flops/Sec.\n", stat1[1]);
- }
-