7d50f768a2cabf6b450de222124ffe8ad8dc8f3f
1 //**************************************************************************
2 // Median filter bencmark
3 //--------------------------------------------------------------------------
5 // This benchmark performs a 1D three element median filter. The
6 // input data (and reference data) should be generated using the
7 // median_gendata.pl perl script and dumped to a file named
8 // dataset1.h You should not change anything except the
9 // HOST_DEBUG and PREALLOCATE macros for your timing run.
15 //--------------------------------------------------------------------------
16 // Input/Reference Data
20 //--------------------------------------------------------------------------
23 int main( int argc
, char* argv
[] )
25 int results_data
[DATA_SIZE
];
27 // Output the input array
28 printArray( "input", DATA_SIZE
, input_data
);
29 printArray( "verify", DATA_SIZE
, verify_data
);
32 // If needed we preallocate everything in the caches
33 median( DATA_SIZE
, input_data
, results_data
);
38 median( DATA_SIZE
, input_data
, results_data
);
41 // Print out the results
42 printArray( "results", DATA_SIZE
, results_data
);
45 return verify( DATA_SIZE
, results_data
, verify_data
);