From 04741fb6181f8cc1ebc6f527d8d22840d019eb7b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 15 Nov 2008 03:17:35 +0000 Subject: -- Remove structs completely -- results is now a static variable in each benchmark -- added get*Score routines -- finally got rid of nmglobal.h completely -- removed more useless stuff git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@53 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- linear.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'linear.c') diff --git a/linear.c b/linear.c index 3216378..a57439c 100644 --- a/linear.c +++ b/linear.c @@ -6,7 +6,7 @@ #include #include -#include "nmglobal.h" +#include "cleanbench.h" #include "randnum.h" @@ -56,6 +56,8 @@ static void lubksb(double a[][LUARRAYCOLS], static int lusolve(double a[][LUARRAYCOLS], int n, double b[LUARRAYROWS]); +static double results; + /********* ** DoLU ** ********** @@ -65,7 +67,6 @@ void DoLU(void) { const char* context = "FPU:LU"; - LUStruct* loclustruct = &global_lustruct; clock_t total_time = 0; int iterations = 0; double* a = NULL; @@ -182,7 +183,7 @@ DoLU(void) free(bbase); free(LUtempvv); - loclustruct->results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time; + results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time; } /****************** @@ -540,3 +541,9 @@ printf("\n"); return(1); } + +inline double +getLinearScore(void) +{ + return results; +} -- cgit v1.2.3