Exemplo n.º 1
0
void
benchmark_nqueens(void)
{
    gdouble elapsed = 0;
    
    shell_view_set_enabled(FALSE);
    shell_status_update("Running N-Queens benchmark...");
        
    elapsed = benchmark_parallel_for(0, 10, nqueens_for, NULL);
    
    bench_results[BENCHMARK_NQUEENS] = elapsed;
}
Exemplo n.º 2
0
void
benchmark_raytrace(void)
{
    bench_value r = EMPTY_BENCH_VALUE;

    shell_view_set_enabled(FALSE);
    shell_status_update("Performing John Walker's FBENCH...");

    r = benchmark_parallel_for(0, 0, 1000, parallel_raytrace, NULL);
    r.result = r.elapsed_time;

    bench_results[BENCHMARK_RAYTRACE] = r;
}
Exemplo n.º 3
0
void
benchmark_fish(void)
{
    gchar *tmpsrc;
    gchar *bdata_path;

    bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL);
    if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
        bench_results[BENCHMARK_BLOWFISH] = -1.0f;
        g_free(bdata_path);
        return;
    }

    shell_view_set_enabled(FALSE);
    shell_status_update("Performing Blowfish benchmark...");

    bench_results[BENCHMARK_BLOWFISH] = benchmark_parallel_for(0, 50000, parallel_blowfish, tmpsrc);
    g_free(bdata_path);
    g_free(tmpsrc);
}