summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-14 23:31:20 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-14 23:31:20 +0000
commitd2849063ff4bcda23eaebb04b83bc277a2321c19 (patch)
tree1ccfb33a359b82ff453269fd02423a8cd9d6a3c0
parenta899b2b196d749283a6b37f2d8c1ec1ba23ca860 (diff)
More cleaning of useless mess
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@46 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
-rw-r--r--cleanbench.c4
-rw-r--r--cleanbench.h132
-rw-r--r--hardware.c2
3 files changed, 6 insertions, 132 deletions
diff --git a/cleanbench.c b/cleanbench.c
index 565a7d5..57f9bf7 100644
--- a/cleanbench.c
+++ b/cleanbench.c
@@ -51,6 +51,10 @@
#include "cleanbench.h"
#include "hardware.h"
+static int bench_with_confidence(int fid, double *mean, double *stdev, unsigned long *numtries);
+static int calc_confidence(double scores[], int num_scores, double *c_half_interval,double *smean, double *sdev);
+static double getscore(int fid);
+
/*************
**** main ****
*************/
diff --git a/cleanbench.h b/cleanbench.h
index 040e733..189242e 100644
--- a/cleanbench.h
+++ b/cleanbench.h
@@ -32,53 +32,6 @@ char *sysname="You can enter your system description in cleanbench.h";
char *compilername="It then will be printed here after you recompile";
char *compilerversion="Have a nice day";
-/* Parameter flags. Must coincide with parameter names array
-** which appears below. */
-#define PF_GMTICKS 0 /* GLOBALMINTICKS */
-#define PF_MINSECONDS 1 /* MINSECONDS */
-#define PF_ALLSTATS 2 /* ALLSTATS */
-#define PF_OUTFILE 3 /* OUTFILE */
-#define PF_CUSTOMRUN 4 /* CUSTOMRUN */
-#define PF_DONUM 5 /* DONUMSORT */
-#define PF_NUMNUMA 6 /* NUMNUMARRAYS */
-#define PF_NUMASIZE 7 /* NUMARRAYSIZE */
-#define PF_NUMMINS 8 /* NUMMINSECONDS */
-#define PF_DOSTR 9 /* DOSTRINGSORT */
-#define PF_STRASIZE 10 /* STRARRAYSIZE */
-#define PF_NUMSTRA 11 /* NUMSTRARRAYS */
-#define PF_STRMINS 12 /* STRMINSECONDS */
-#define PF_DOBITF 13 /* DOBITFIELD */
-#define PF_NUMBITOPS 14 /* NUMBITOPS */
-#define PF_BITFSIZE 15 /* BITFIELDSIZE */
-#define PF_BITMINS 16 /* BITMINSECONDS */
-#define PF_DOEMF 17 /* DOEMF */
-#define PF_EMFASIZE 18 /* EMFARRAYSIZE */
-#define PF_EMFLOOPS 19 /* EMFLOOPS */
-#define PF_EMFMINS 20 /* EMFMINSECOND */
-#define PF_DOFOUR 21 /* DOFOUR */
-#define PF_FOURASIZE 22 /* FOURASIZE */
-#define PF_FOURMINS 23 /* FOURMINSECONDS */
-#define PF_DOASSIGN 24 /* DOASSIGN */
-#define PF_AARRAYS 25 /* ASSIGNARRAYS */
-#define PF_ASSIGNMINS 26 /* ASSIGNMINSECONDS */
-#define PF_DOIDEA 27 /* DOIDEA */
-#define PF_IDEAASIZE 28 /* IDEAARRAYSIZE */
-#define PF_IDEALOOPS 29 /* IDEALOOPS */
-#define PF_IDEAMINS 30 /* IDEAMINSECONDS */
-#define PF_DOHUFF 31 /* DOHUFF */
-#define PF_HUFFASIZE 32 /* HUFFARRAYSIZE */
-#define PF_HUFFLOOPS 33 /* HUFFLOOPS */
-#define PF_HUFFMINS 34 /* HUFFMINSECONDS */
-#define PF_DONNET 35 /* DONNET */
-#define PF_NNETLOOPS 36 /* NNETLOOPS */
-#define PF_NNETMINS 37 /* NNETMINSECONDS */
-#define PF_DOLU 38 /* DOLU */
-#define PF_LUNARRAYS 39 /* LUNUMARRAYS */
-#define PF_LUMINS 40 /* LUMINSECONDS */
-#define PF_ALIGN 41 /* ALIGN */
-
-#define MAXPARAM 41
-
/* Tests-to-do flags...must coincide with test. */
enum {
NUMSORT,
@@ -103,12 +56,6 @@ int tests_to_do[NUMTESTS];
/*
-** GLOBALS
-*/
-
-#define BUF_SIZ 1024
-
-/*
** Test names
*/
char *ftestnames[] = {
@@ -156,56 +103,6 @@ double lx_bindex[] = {
1.4799, /* Neural Net */
26.732}; /* LU Decomposition */
-/* Parameter names */
-char *paramnames[]= {
- "GLOBALMINTICKS",
- "MINSECONDS",
- "ALLSTATS",
- "OUTFILE",
- "CUSTOMRUN",
- "DONUMSORT",
- "NUMNUMARRAYS",
- "NUMARRAYSIZE",
- "NUMMINSECONDS",
- "DOSTRINGSORT",
- "STRARRAYSIZE",
- "NUMSTRARRAYS",
- "STRMINSECONDS",
- "DOBITFIELD",
- "NUMBITOPS",
- "BITFIELDSIZE",
- "BITMINSECONDS",
- "DOEMF",
- "EMFARRAYSIZE",
- "EMFLOOPS",
- "EMFMINSECONDS",
- "DOFOUR",
- "FOURSIZE",
- "FOURMINSECONDS",
- "DOASSIGN",
- "ASSIGNARRAYS",
- "ASSIGNMINSECONDS",
- "DOIDEA",
- "IDEARRAYSIZE",
- "IDEALOOPS",
- "IDEAMINSECONDS",
- "DOHUFF",
- "HUFARRAYSIZE",
- "HUFFLOOPS",
- "HUFFMINSECONDS",
- "DONNET",
- "NNETLOOPS",
- "NNETMINSECONDS",
- "DOLU",
- "LUNUMARRAYS",
- "LUMINSECONDS",
- "ALIGN" };
-
-/*
-** Buffer for holding output text.
-*/
-char buffer[BUF_SIZ];
-
/*
** Following are global structures, one built for
** each of the tests.
@@ -222,35 +119,6 @@ NNetStruct global_nnetstruct; /* For Neural Net */
LUStruct global_lustruct; /* For LU decomposition */
/*
-** The following array of function struct pointers lets
-** us very rapidly map a function to its controlling
-** data structure. NOTE: These must match the "TF_xxx"
-** constants above.
-*/
-void *global_fstruct[] =
-{ (void *)&global_numsortstruct,
- (void *)&global_strsortstruct,
- (void *)&global_bitopstruct,
- (void *)&global_emfloatstruct,
- (void *)&global_fourierstruct,
- (void *)&global_assignstruct,
- (void *)&global_ideastruct,
- (void *)&global_huffstruct,
- (void *)&global_nnetstruct,
- (void *)&global_lustruct };
-
-/*
-** PROTOTYPES
-*/
-static int bench_with_confidence(int fid,
- double *mean, double *stdev, unsigned long *numtries);
-static int calc_confidence(double scores[],
- int num_scores,
- double *c_half_interval,double *smean,
- double *sdev);
-static double getscore(int fid);
-
-/*
** EXTERNAL PROTOTYPES
*/
extern void DoNumSort(void);
diff --git a/hardware.c b/hardware.c
index d2f32f6..2508bf8 100644
--- a/hardware.c
+++ b/hardware.c
@@ -145,6 +145,8 @@ static void readProcCpuInfo (char *model, char *cache) {
** Reads /proc/cpuinfo if on a linux system
** Writes output
*/
+#define BUF_SIZ 1024
+
void hardware(void) {
char os[BUF_SIZ];
char model[BUF_SIZ];