summaryrefslogtreecommitdiff
path: root/bitfield.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-15 03:17:35 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-15 03:17:35 +0000
commit04741fb6181f8cc1ebc6f527d8d22840d019eb7b (patch)
tree793fb68beeb2309d424c9cd20b9f54f6a9dee166 /bitfield.c
parentc0a8896d9a90e59429b6fecadc397ead42974f59 (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 'bitfield.c')
-rw-r--r--bitfield.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/bitfield.c b/bitfield.c
index d87bfe7..99dbd6f 100644
--- a/bitfield.c
+++ b/bitfield.c
@@ -6,7 +6,7 @@
#include <limits.h>
#include <time.h>
-#include "nmglobal.h"
+#include "cleanbench.h"
#include "randnum.h"
@@ -32,6 +32,8 @@ static void FlipBitRun(unsigned long *bitmap,
unsigned long bit_addr,
unsigned long nbits);
+static double results;
+
/*************
** DoBitops **
**************
@@ -42,7 +44,6 @@ void
DoBitops(void)
{
const char* context = "CPU:Bitfields";
- BitOpStruct* locbitopstruct = &global_bitopstruct;
unsigned long* bitarray = NULL;
unsigned long* bitoparray = NULL;
clock_t total_time = 0;
@@ -116,7 +117,7 @@ DoBitops(void)
free(bitarray);
free(bitoparray);
- locbitopstruct->results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
+ results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
}
/************************
@@ -253,3 +254,9 @@ void ToggleBitRun(unsigned long *bitmap, /* Bitmap */
}
}
}
+
+inline double
+getBitfieldScore(void)
+{
+ return results;
+}