/**************************************************** AddUnrollCPE.hpp This program adds an array of numbers and compares the performance with manual loop unrolling with an unrolled loop. ****************************************************/ #ifndef ADDUNROLLCPE_HEADER #define ADDUNROLLCPE_HEADER #include #include "CPE.hpp" //everything stuck in header for convenience, NOT considered 'good practice'! const int NNUMS = 1024; const int NRUNS = 10; class AddUnrollCPE : CCPE{ // function to run the tests on MUST ALWAYS RETURN A VOID * // AND MUST ALWAYS TAKE A VOID * AS AN ARG static void * foo1(void *da_args) { int i, sum=0, *nums = (int *)da_args; //unroll loop by 6 for(i=0; i