1 // See LICENSE for license details.
3 // *************************************************************************
4 // multiply filter bencmark
5 // -------------------------------------------------------------------------
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 You should not change anything except the
11 // HOST_DEBUG and VERIFY macros for your timing run.
17 //--------------------------------------------------------------------------
18 // Input/Reference Data
22 //--------------------------------------------------------------------------
25 int main( int argc
, char* argv
[] )
28 int results_data
[DATA_SIZE
];
30 // Output the input arrays
31 printArray( "input1", DATA_SIZE
, input_data1
);
32 printArray( "input2", DATA_SIZE
, input_data2
);
33 printArray( "verify", DATA_SIZE
, verify_data
);
36 for (i
= 0; i
< DATA_SIZE
; i
++)
38 results_data
[i
] = multiply( input_data1
[i
], input_data2
[i
] );
43 for (i
= 0; i
< DATA_SIZE
; i
++)
45 results_data
[i
] = multiply( input_data1
[i
], input_data2
[i
] );
49 // Print out the results
50 printArray( "results", DATA_SIZE
, results_data
);
53 return verify( DATA_SIZE
, results_data
, verify_data
);