void benchmark (void) { int i, seed; /* Worst case settings */ /* Set array to random values */ seed = 1; for (i = 0; i < 64; i++) { seed = ((seed * 133) + 81) % 65535; data[i] = seed; } jpeg_fdct_islow(); }
/* Main function Time to function execution time using logic analyzer, which measures the OFF time of a LED on board. The switching latency, including the function call/return time, is measured to be equal to 1.1us (22 clock cycles). */ int main(int argc, char *argv[]) { int i, seed; /* Worst case settings */ /* Set array to random values */ seed = 0; for (i = 0; i < 64; i++) { seed = ((seed * 133) + 81) % 65535; data[i] = seed; } jpeg_fdct_islow(); return 0; }
/* Main function Time to function execution time using logic analyzer, which measures the OFF time of a LED on board. The switching latency, including the function call/return time, is measured to be equal to 1.1us (22 clock cycles). */ int main(void) { unsigned int z; for(z = 0; z < 333; z++) { int i, seed; /* Worst case settings */ /* Set array to random values */ seed = 1; for (i = 0; i < 64; i++) { seed = ((seed * 133) + 81) % 65535; data[i] = seed; } jpeg_fdct_islow(); } return 0; }
/* Main function Time to function execution time using logic analyzer, which measures the OFF time of a LED on board. The switching latency, including the function call/return time, is measured to be equal to 1.1us (22 clock cycles). */ int main( void ) { #ifdef PROFILING /* Profiling variables. Remove for actual WCET analyses. */ int iters_i = 0, min_i = 100000, max_i = 0; #endif int i, seed; /* Worst case settings */ /* Set array to random values */ seed = 1; #ifdef PROFILING iters_i = 0; #endif _Pragma("loopbound min 64 max 64") for ( i = 0; i < 64; i++ ) { #ifdef PROFILING iters_i++; #endif seed = ((seed * 133) + 81) % 65535; data[i] = seed; } #ifdef PROFILING if ( iters_i < min_i ) min_i = iters_i; if ( iters_i > max_i ) max_i = iters_i; #endif #ifdef PROFILING printf( "i-loop: [%d, %d]\n", min_i, max_i ); #endif jpeg_fdct_islow(); return 0; }
int benchmark (void) { jpeg_fdct_islow(); return 0; }