diff options
Diffstat (limited to 'fpemulation.c')
-rw-r--r-- | fpemulation.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fpemulation.c b/fpemulation.c index b0c5459..3536d77 100644 --- a/fpemulation.c +++ b/fpemulation.c @@ -6,7 +6,7 @@ #include <limits.h> #include <time.h> -#include "nmglobal.h" +#include "cleanbench.h" #include "randnum.h" #include "emfloat.h" @@ -24,12 +24,14 @@ */ #define LOOP_MAX 500000L -#define ARRAY_SIZE 3000L +#define ARRAY_SIZE 3000 static clock_t DoEmFloatIteration(InternalFPF *abase, InternalFPF *bbase, InternalFPF *cbase, unsigned long loops); static void SetupCPUEmFloatArrays(InternalFPF *abase, InternalFPF *bbase); +static double results; + /************** ** DoEmFloat ** *************** @@ -40,7 +42,6 @@ void DoEmFloat(void) { const char* context = "CPU:Floating Emulation"; - EmFloatStruct* locemfloatstruct = &global_emfloatstruct; InternalFPF* abase = NULL; InternalFPF* bbase = NULL; InternalFPF* cbase = NULL; @@ -117,7 +118,7 @@ DoEmFloat(void) free(bbase); free(cbase); - locemfloatstruct->results = (double)(iterations * loops * CLOCKS_PER_SEC) / (double)total_time; + results = (double)(iterations * loops * CLOCKS_PER_SEC) / (double)total_time; } /*********************** @@ -205,3 +206,9 @@ SetupCPUEmFloatArrays(InternalFPF *abase, InternalFPF *bbase) DivideInternalFPF(&locFPF1,&locFPF2,bbase+i); } } + +inline double +getEmFloatScore(void) +{ + return results; +} |