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 /assignment.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 'assignment.c')
-rw-r--r-- | assignment.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/assignment.c b/assignment.c index 78be3fa..2fe8b8d 100644 --- a/assignment.c +++ b/assignment.c @@ -6,7 +6,7 @@ #include <limits.h> #include <time.h> -#include "nmglobal.h" +#include "cleanbench.h" #include "randnum.h" @@ -48,6 +48,8 @@ static int first_assignments(long tableau[][ASSIGNCOLS], static void second_assignments(long tableau[][ASSIGNCOLS], short assignedtableau[][ASSIGNCOLS]); +static double results; + /************* ** DoAssign ** ************** @@ -70,7 +72,6 @@ void DoAssign(void) { const char* context = "CPU:Assignment"; - AssignStruct* locassignstruct = &global_assignstruct; /* Local structure ptr */ long* array = NULL; clock_t total_time = 0; int iterations = 0; @@ -119,7 +120,7 @@ DoAssign(void) free(array); - locassignstruct->results = (double)(iterations * CLOCKS_PER_SEC *num_arrays) / (double)total_time; + results = (double)(iterations * CLOCKS_PER_SEC *num_arrays) / (double)total_time; } @@ -521,3 +522,9 @@ for(i=0;i<ASSIGNROWS;i++) return; } + +inline double +getAssignmentScore(void) +{ + return results; +} |