Remove smips/host-debugging cruft
[riscv-tests.git] / benchmarks / median / median_main.c
1 // See LICENSE for license details.
2
3 //**************************************************************************
4 // Median filter bencmark
5 //--------------------------------------------------------------------------
6 //
7 // This benchmark performs a 1D three element median filter. The
8 // input data (and reference data) should be generated using the
9 // median_gendata.pl perl script and dumped to a file named
10 // dataset1.h.
11
12 #include "util.h"
13
14 #include "median.h"
15
16 //--------------------------------------------------------------------------
17 // Input/Reference Data
18
19 #include "dataset1.h"
20
21 //--------------------------------------------------------------------------
22 // Main
23
24 int main( int argc, char* argv[] )
25 {
26 int results_data[DATA_SIZE];
27
28 #if PREALLOCATE
29 // If needed we preallocate everything in the caches
30 median( DATA_SIZE, input_data, results_data );
31 #endif
32
33 // Do the filter
34 setStats(1);
35 median( DATA_SIZE, input_data, results_data );
36 setStats(0);
37
38 // Check the results
39 return verify( DATA_SIZE, results_data, verify_data );
40 }