1 // *************************************************************************
2 // multiply filter bencmark
3 // -------------------------------------------------------------------------
5 // This benchmark tests the software multiply implemenation. The
6 // input data (and reference data) should be generated using the
7 // multiply_gendata.pl perl script and dumped to a file named
8 // dataset1.h You should not change anything except the
9 // HOST_DEBUG and VERIFY macros for your timing run.
15 //--------------------------------------------------------------------------
16 // Input/Reference Data
20 //--------------------------------------------------------------------------
23 int main( int argc
, char* argv
[] )
26 int results_data
[DATA_SIZE
];
28 // Output the input arrays
29 printArray( "input1", DATA_SIZE
, input_data1
);
30 printArray( "input2", DATA_SIZE
, input_data2
);
31 printArray( "verify", DATA_SIZE
, verify_data
);
34 for (i
= 0; i
< DATA_SIZE
; i
++)
36 results_data
[i
] = multiply( input_data1
[i
], input_data2
[i
] );
41 for (i
= 0; i
< DATA_SIZE
; i
++)
43 results_data
[i
] = multiply( input_data1
[i
], input_data2
[i
] );
47 // Print out the results
48 printArray( "results", DATA_SIZE
, results_data
);
51 return verify( DATA_SIZE
, results_data
, verify_data
);