From c0a8896d9a90e59429b6fecadc397ead42974f59 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 15 Nov 2008 02:44:58 +0000 Subject: Move linear defines from nmglobal.h to linear.c git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@52 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- linear.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'linear.c') 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) { -- cgit v1.2.3