1 // See LICENSE for license details.
3 //**************************************************************************
4 // Vector-vector add benchmark
5 //--------------------------------------------------------------------------
7 // This benchmark uses adds to vectors and writes the results to a
8 // third vector. The input data (and reference data) should be
9 // generated using the vvadd_gendata.pl perl script and dumped
10 // to a file named dataset1.h.
14 //--------------------------------------------------------------------------
15 // Input/Reference Data
19 //--------------------------------------------------------------------------
22 void vvadd( int n
, int a
[], int b
[], int c
[] )
25 for ( i
= 0; i
< n
; i
++ )
29 //--------------------------------------------------------------------------
32 int main( int argc
, char* argv
[] )
34 int results_data
[DATA_SIZE
];
37 // If needed we preallocate everything in the caches
38 vvadd( DATA_SIZE
, input1_data
, input2_data
, results_data
);
43 vvadd( DATA_SIZE
, input1_data
, input2_data
, results_data
);
47 return verify( DATA_SIZE
, results_data
, verify_data
);