Remove smips/host-debugging cruft
[riscv-tests.git] / benchmarks / multiply / multiply_main.c
1 // See LICENSE for license details.
2
3 // *************************************************************************
4 // multiply filter bencmark
5 // -------------------------------------------------------------------------
6 //
7 // This benchmark tests the software multiply implemenation. The
8 // input data (and reference data) should be generated using the
9 // multiply_gendata.pl perl script and dumped to a file named
10 // dataset1.h
11
12 #include "util.h"
13
14 #include "multiply.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 i;
27 int results_data[DATA_SIZE];
28
29 #if PREALLOCATE
30 for (i = 0; i < DATA_SIZE; i++)
31 {
32 results_data[i] = multiply( input_data1[i], input_data2[i] );
33 }
34 #endif
35
36 setStats(1);
37 for (i = 0; i < DATA_SIZE; i++)
38 {
39 results_data[i] = multiply( input_data1[i], input_data2[i] );
40 }
41 setStats(0);
42
43 // Check the results
44 return verify( DATA_SIZE, results_data, verify_data );
45 }