summaryrefslogtreecommitdiff
path: root/stringsort.c
diff options
context:
space:
mode:
Diffstat (limited to 'stringsort.c')
-rw-r--r--stringsort.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/stringsort.c b/stringsort.c
index 71e6045..b1659b3 100644
--- a/stringsort.c
+++ b/stringsort.c
@@ -6,7 +6,7 @@
#include <limits.h>
#include <time.h>
-#include "nmglobal.h"
+#include "cleanbench.h"
#include "randnum.h"
@@ -47,13 +47,14 @@ static void strsift(unsigned long *optrarray,
unsigned long i,
unsigned long j);
+static double results;
+
/*****************
** DoStringSort **
*****************/
void DoStringSort(void)
{
const char* context = "CPU:String Sort";
- SortStruct* strsortstruct = &global_strsortstruct;
unsigned char* array = NULL;
clock_t total_time = 0;
int iterations = 0;
@@ -108,7 +109,7 @@ void DoStringSort(void)
free(array);
- strsortstruct->results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
+ results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
}
/**************************
@@ -507,3 +508,9 @@ while((i+i)<=j)
i=j+1;
}
}
+
+inline double
+getStringSortScore(void)
+{
+ return results;
+}