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

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

Advertisement

Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++
/* A standard quick sort algorithm, O(n*log(n)) */
void quick_sort ( int *v, unsigned int p, unsigned int r )
{
if ( p < r )
{
unsigned int x, i, j, q;
x = v[ p ];
i = p - 1;
j = r + 1;
for ( ;; )
{
do { --j; } while ( v[ j ] > x );
do { ++i; } while ( v[ i ] < x );
if ( i < j )
{
int temp = v[ i ];
v[ i ] = v[ j ];
v[ j ] = temp;
}
else
{
q = j;
break;
}
}
quick_sort ( v, p, q );
quick_sort ( v, q + 1, r );
}
}
int out_b[ ARRAY_LENGTH ];
int out_m[ ARRAY_LENGTH ];
ADI_PWR_COMMAND_PAIR ezkit_init[] =
{
/*600Mhz ADSP-BF537 EZ-KIT Lite */
{ADI_PWR_CMD_SET_EZKIT,
Getting Started with ADSP-BF537 EZ-KIT Lite
www.BDTIC.com/ADI
(void*)ADI_PWR_EZKIT_BF537_600MHZ},
1-27

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADSP-BF537 EZ-KIT Lite and is the answer not in the manual?

Table of Contents