Last change
on this file since 320 was
134,
checked in by kane, 14 years ago
|
add multi write buffer in cc_xcache_v4
|
File size:
651 bytes
|
Rev | Line | |
---|
[134] | 1 | #include "benchmark.h" |
---|
| 2 | #include "system.h" |
---|
| 3 | #include "stdlib.h" |
---|
| 4 | #include "stdio.h" |
---|
| 5 | #include "../dhrystone/dhry21.h" |
---|
| 6 | |
---|
| 7 | static uint32_t nb_thread; |
---|
| 8 | |
---|
| 9 | int _benchmark_dhrystone (unsigned int nb_runs) |
---|
| 10 | { |
---|
| 11 | printf("\n"); |
---|
| 12 | printf("================================\n"); |
---|
| 13 | printf("Benchmark Dhrystone\n"); |
---|
| 14 | printf("================================\n"); |
---|
| 15 | printf("\n"); |
---|
| 16 | |
---|
| 17 | int result = 0; |
---|
| 18 | |
---|
| 19 | if (atomic_inc(&nb_thread) == 1) |
---|
| 20 | { |
---|
| 21 | result = dhry21(nb_runs); |
---|
| 22 | } |
---|
| 23 | else |
---|
| 24 | { |
---|
| 25 | printf("The dhrystone benchmark is not multi threaded.\n"); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | return result; |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | int benchmark_dhrystone (void) { return _benchmark_dhrystone(DHRYSTONE_NB_RUNS); } |
---|
Note: See
TracBrowser
for help on using the repository browser.