summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-15 02:44:58 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-15 02:44:58 +0000
commitc0a8896d9a90e59429b6fecadc397ead42974f59 (patch)
tree8e0863bc2410e6538a7b063fb492949d2a78f35b
parent0f674b5b2f15c5cd30209230f22198cc71e74310 (diff)
Move linear defines from nmglobal.h to linear.c
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@52 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
-rw-r--r--cleanbench.c2
-rw-r--r--linear.c21
-rw-r--r--nmglobal.h19
3 files changed, 10 insertions, 32 deletions
diff --git a/cleanbench.c b/cleanbench.c
index af58fc3..bb73b6a 100644
--- a/cleanbench.c
+++ b/cleanbench.c
@@ -84,7 +84,7 @@ puts("\nTEST : Iterations/sec. : Old Index : New Index");
puts(" : : Pentium 90* : AMD K6/233*");
puts("--------------------:------------------:-------------:------------");
-for(i=NEURAL;i<NUMTESTS;i++)
+for(i=LINEAR;i<NUMTESTS;i++)
{
if(tests_to_do[i])
{ printf("%s :",ftestnames[i]);
diff --git a/linear.c b/linear.c
index b69080c..3216378 100644
--- a/linear.c
+++ b/linear.c
@@ -22,15 +22,18 @@
*/
/*
-** DEFINES
+** ARRAY_MAX
+**
+** This sets the upper limit on the number of arrays
+** that the benchmark will attempt to build before
+** flagging an error. It is not a critical constant, and
+** may be increased if your system has the horsepower.
*/
+#define ARRAY_MAX 10000
#define LUARRAYROWS 101L
#define LUARRAYCOLS 101L
-/*
-** TYPEDEFS
-*/
typedef struct
{ union
{ double *p;
@@ -38,14 +41,8 @@ typedef struct
} ptrs;
} LUdblptr;
-/*
-** GLOBALS
-*/
-double *LUtempvv;
+double *LUtempvv; /* FIXME: really? */
-/*
-** PROTOTYPES
-*/
static clock_t DoLUIteration(double *a, double *b,
double *abase, double *bbase,
unsigned long num_arrays);
@@ -112,7 +109,7 @@ DoLU(void)
if (is_adjusted == FALSE) {
is_adjusted = TRUE;
- for(i=1;i<=MAXLUARRAYS;i++)
+ for(i=1;i<=ARRAY_MAX;i++)
{
abase = realloc(abase, sizeof(double) * LUARRAYCOLS*LUARRAYROWS*(i+1));
if (!abase) {
diff --git a/nmglobal.h b/nmglobal.h
index 432a2dc..bc5b36e 100644
--- a/nmglobal.h
+++ b/nmglobal.h
@@ -70,25 +70,6 @@ typedef struct {
double results; /* Results */
} NNetStruct;
-/***********************
-** LU DECOMPOSITION **
-** (Linear Equations) **
-***********************/
-
-/*
-** MAXLUARRAYS
-**
-** This sets the upper limit on the number of arrays
-** that the benchmark will attempt to build before
-** flagging an error. It is not a critical constant, and
-** may be increased if your system has the horsepower.
-*/
-/*#define MAXLUARRAYS 1000*/
-#define MAXLUARRAYS 10000
-
-/*
-** TYPEDEFS
-*/
typedef struct {
double results; /* Results */
} LUStruct;