diff options
author | Matt Turner <mattst88@gmail.com> | 2008-11-15 03:17:35 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2008-11-15 03:17:35 +0000 |
commit | 04741fb6181f8cc1ebc6f527d8d22840d019eb7b (patch) | |
tree | 793fb68beeb2309d424c9cd20b9f54f6a9dee166 /fourier.c | |
parent | c0a8896d9a90e59429b6fecadc397ead42974f59 (diff) |
-- 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
Diffstat (limited to 'fourier.c')
-rw-r--r-- | fourier.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -6,7 +6,7 @@ #include <limits.h> #include <time.h> -#include "nmglobal.h" +#include "cleanbench.h" #include "randnum.h" @@ -26,6 +26,8 @@ static double thefunction(double x, double omega_n, int select); +static double results; + /************** ** DoFourier ** *************** @@ -38,7 +40,6 @@ void DoFourier(void) { const char* context = "FPU:Transcendental"; - FourierStruct* locfourierstruct = &global_fourierstruct; double* abase = NULL; double* bbase = NULL; clock_t total_time = 0; @@ -105,7 +106,7 @@ DoFourier(void) free(abase); free(bbase); - locfourierstruct->results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time; + results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time; } /************************ @@ -239,3 +240,9 @@ switch(select) */ return(0.0); } + +inline double +getFourierScore(void) +{ + return results; +} |