Texas Instruments TMS320C64X Programmer's Reference Manual page 90

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

Advertisement

DSP_maxval
DSP_maxval
Function
Arguments
Description
Algorithm
Special Requirements nx is a multiple of 8 and greater than or equal to 32.
Implementation Notes
Benchmarks
4-62
Maximum Value of Vector
short DSP_maxval (const short *x, int nx)
x[nx]
Pointer to input vector of size nx.
Length of input data vector. Must be multiple of 8 and ≥32.
nx
return short
Maximum value of a vector.
This routine finds the element with maximum value in the input vector and
returns that value.
This is the C equivalent of the assembly code without restrictions. Note that
the assembly code is hand optimized and restrictions may apply.
short DSP_maxval(short x[ ], int nx)
{
int i, max;
max = −32768;
for (i = 0; i < nx; i++)
if (x[i] > max)
max = x[i];
return max;
}
-
Bank Conflicts: No bank conflicts occur.
-
Interruptibility: The code is interrupt-tolerant but not interruptible.
Cycles
nx / 4 + 10
Codesize
116 bytes

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c64x+

Table of Contents