summaryrefslogtreecommitdiff
path: root/tools/gf_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gf_time.c')
-rw-r--r--tools/gf_time.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/gf_time.c b/tools/gf_time.c
index 2bd2d04..4becc8d 100644
--- a/tools/gf_time.c
+++ b/tools/gf_time.c
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
if (!create_gf_from_argv(&gf, w, argc, argv, 6)) usage(BM);
strcpy(tests, "");
- for (i = 0; i < argv[2][i] != '\0'; i++) {
+ for (i = 0; argv[2][i] != '\0'; i++) {
switch(argv[2][i]) {
case 'A': strcat(tests, single_tests);
strcat(tests, region_tests);
@@ -163,8 +163,8 @@ int main(int argc, char **argv)
for (i = 0; i < 3; i++) {
test = single_tests[i];
if (strchr(tests, test) != NULL) {
- if (tmethods[test] == NULL) {
- printf("No %s method.\n", tstrings[test]);
+ if (tmethods[(int)test] == NULL) {
+ printf("No %s method.\n", tstrings[(int)test]);
} else {
elapsed = 0;
dnum = 0;
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
elapsed += timer_split(&timer);
}
printf("%14s: %10.6lf s Mops: %10.3lf %10.3lf Mega-ops/s\n",
- tstrings[test], elapsed,
+ tstrings[(int)test], elapsed,
dnum/1024.0/1024.0, dnum/1024.0/1024.0/elapsed);
}
}
@@ -185,8 +185,8 @@ int main(int argc, char **argv)
for (i = 0; i < 4; i++) {
test = region_tests[i];
if (strchr(tests, test) != NULL) {
- if (tmethods[test] == NULL) {
- printf("No %s method.\n", tstrings[test]);
+ if (tmethods[(int)test] == NULL) {
+ printf("No %s method.\n", tstrings[(int)test]);
} else {
elapsed = 0;
@@ -204,10 +204,11 @@ int main(int argc, char **argv)
elapsed += timer_split(&timer);
}
printf("%14s: XOR: %d %10.6lf s MB: %10.3lf %10.3lf MB/s\n",
- tstrings[test], xor, elapsed,
+ tstrings[(int)test], xor, elapsed,
ds*di/1024.0/1024.0, ds*di/1024.0/1024.0/elapsed);
}
}
}
}
+ return 0;
}