Texas Instruments TMS320C64X Programmer's Reference Manual page 115

Dsp little-endian dsp library
Hide thumbs Also See for TMS320C64X:
Table of Contents

Advertisement

DSP_minerror
Function
Arguments
Algorithm
Minimum Energy Error Search
int minerror (const short * restrict GSP0_TABLE, const short * restrict
errCoefs, int * restrict max_index)
GSP0_TABLE[9*256]
errCoefs[9]
max_index
return int
This is the C equivalent of the assembly code without restrictions. Note that the
assembly code is hand optimized and restrictions may apply.
int minerr
(
const short *restrict GSP0_TABLE,
const short *restrict errCoefs,
int
*restrict max_index
)
{
int val, maxVal = −50;
int i, j;
for (i = 0; i < GSP0_NUM; i++)
{
for (val = 0, j = 0; j < GSP0_TERMS; j++)
val += GSP0_TABLE[i*GSP0_TERMS+j] * errCoefs[j];
if (val > maxVal)
{
maxVal = val;
*max_index = i*GSP0_TERMS;
}
}
return (maxVal);
}
GSP0 terms array. Must be double-word aligned.
Array of error coefficients.
Pointer to GSP0_TABLE[max_index] found.
Maximum dot product result.
C64x+ DSPLIB Reference
DSP_minerror
4-87

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c64x+

Table of Contents