source: trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.c @ 137

Last change on this file since 137 was 134, checked in by kane, 14 years ago

add multi write buffer in cc_xcache_v4

File size: 1.6 KB
Line 
1#include "benchmark.h"
2#include "system.h"
3#include "stdio.h"
4#include "../common/common.h"
5
6void benchmark (void)
7{
8  /* if(procnum() != 0) */
9  /*   EXIT(0); */
10
11  int result = 0;
12  int cycle_begin = cycle_begin = cpu_cycles();
13
14  switch (procnum())
15    {
16    default :
17      {
18#if BENCHMARK_MATRIX_MULTIPLICATION_MT
19        int result_mm_mt = benchmark_matrix_multiplication_mt();
20        result += result_mm_mt;
21#endif
22#if BENCHMARK_DHRYSTONE
23        int result_dhrystone = benchmark_dhrystone();
24        result += result_dhrystone;
25#endif
26#if BENCHMARK_SORT
27        int result_sort = benchmark_sort();
28        result += result_sort;
29#endif
30#if BENCHMARK_MATRIX_MULTIPLICATION_ST
31        int result_mm_st = benchmark_matrix_multiplication_st();
32        result += result_mm_st;
33#endif
34
35        printf("\n");
36        printf("--------------------------------\n");
37        printf( "Partial results :\n");
38#if BENCHMARK_MATRIX_MULTIPLICATION_MT
39        printf(" * MM MT           : %d\n",result_mm_mt);
40#endif
41#if BENCHMARK_DHRYSTONE
42        printf(" * DHRYSTONE       : %d\n",result_dhrystone);
43#endif
44#if BENCHMARK_SORT
45        printf(" * SORT            : %d\n",result_sort);
46#endif
47#if BENCHMARK_MATRIX_MULTIPLICATION_ST
48        printf(" * MM ST           : %d\n",result_mm_st);
49#endif
50        printf("--------------------------------\n");
51       break;
52      }
53    }
54
55  printf("\n");
56  printf("================================\n");
57  printf( "Results :\n");
58  printf( " * Score           : %d\n", result);
59  printf( " * Total CPU Cycle : %d\n", cpu_cycles()-cycle_begin);
60  printf("================================\n");
61}
Note: See TracBrowser for help on using the repository browser.