Analog Devices ADSP-BF537 EZ-KIT Lite Getting Started page 46

Hide thumbs Also See for ADSP-BF537 EZ-KIT Lite:
Table of Contents

Advertisement

Listing 1-2. Exercise 1, Part 2
void main ()
{
clock_t cycles_begin, cycles_end;
unsigned long seconds_begin, seconds_end;
unsigned long display_cycles_end;
volatile unsigned int time_end;
int i;
srand ( 22 );
start_real_time_clock ();
cycles_begin = clock ();
for ( i = 0; i < NUM_ITERATIONS; ++i )
{
int j;
randomize_arrays ( out_b, out_m, ARRAY_LENGTH );
bubble_sort ( out_b, ARRAY_LENGTH );
quick_sort ( out_m, 0, ARRAY_LENGTH - 1 );
}
cycles_end = clock () - cycles_begin;
display_cycles_end = ( unsigned long)( cycles_end / 1000000 );
time_end = get_real_time_clock_in_seconds ();
printf ( "Completed in %d seconds and approx. %u million
cycles.\n", time_end, display_cycles_end );
}
1-24
www.BDTIC.com/ADI
Getting Started with ADSP-BF537 EZ-KIT Lite

Advertisement

Table of Contents
loading

Table of Contents