From 2fd7db664a595d2028584362570c73b102e332fd Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Fri, 29 Dec 2006 17:11:42 +0000 Subject: Add John Walker's FBENCH FPU benchmark. --- hardinfo2/benchmark.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'hardinfo2/benchmark.c') diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c index 3743f4a0..9ad586e9 100644 --- a/hardinfo2/benchmark.c +++ b/hardinfo2/benchmark.c @@ -26,7 +26,8 @@ enum { BENCHMARK_FIB, BENCHMARK_MD5, BENCHMARK_SHA1, - BENCHMARK_BLOWFISH + BENCHMARK_BLOWFISH, + BENCHMARK_RAYTRACE } Entries; static ModuleEntry hi_entries[] = { @@ -34,7 +35,8 @@ static ModuleEntry hi_entries[] = { {"CPU Fibonacci", "module.png"}, {"CPU MD5", "module.png"}, {"CPU SHA1", "module.png"}, - {"CPU Blowfish", "blowfish.png"} + {"CPU Blowfish", "blowfish.png"}, + {"FPU Raytracing", "module.png"} }; static gchar * @@ -69,12 +71,14 @@ benchmark_include_results(gchar *results, const gchar *benchmark) #include #include #include +#include static gchar *bench_zlib = NULL, *bench_fib = NULL, *bench_md5 = NULL, *bench_sha1 = NULL, - *bench_fish = NULL; + *bench_fish = NULL, + *bench_ray = NULL; gchar * hi_info(gint entry) @@ -87,6 +91,13 @@ hi_info(gint entry) bench_zlib = benchmark_zlib(); return g_strdup(bench_zlib); + case BENCHMARK_RAYTRACE: + if (bench_ray) + return g_strdup(bench_ray); + + bench_ray = benchmark_raytrace(); + return g_strdup(bench_ray); + case BENCHMARK_BLOWFISH: if (bench_fish) return g_strdup(bench_fish); @@ -128,6 +139,10 @@ hi_reload(gint entry) if (bench_zlib) g_free(bench_zlib); bench_zlib = benchmark_zlib(); break; + case BENCHMARK_RAYTRACE: + if (bench_ray) g_free(bench_ray); + bench_ray = benchmark_raytrace(); + break; case BENCHMARK_BLOWFISH: if (bench_fish) g_free(bench_fish); bench_fish = benchmark_fish(); -- cgit v1.2.3