c7fd6a6e8af26d23de92cff86623c2d050ecf629
1 // See LICENSE for license details.
3 //**************************************************************************
4 // Median filter bencmark
5 //--------------------------------------------------------------------------
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 You should not change anything except the
11 // HOST_DEBUG and PREALLOCATE macros for your timing run.
17 //--------------------------------------------------------------------------
18 // Input/Reference Data
22 //--------------------------------------------------------------------------
25 int main( int argc
, char* argv
[] )
27 int results_data
[DATA_SIZE
];
29 // Output the input array
30 printArray( "input", DATA_SIZE
, input_data
);
31 printArray( "verify", DATA_SIZE
, verify_data
);
34 // If needed we preallocate everything in the caches
35 median( DATA_SIZE
, input_data
, results_data
);
40 median( DATA_SIZE
, input_data
, results_data
);
43 // Print out the results
44 printArray( "results", DATA_SIZE
, results_data
);
47 return verify( DATA_SIZE
, results_data
, verify_data
);