Texas Instruments TMS320C64X Programmer's Reference Manual page 93

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

Advertisement

DSP_minval
Function
Arguments
Description
Algorithm
Special Requirements nx is a multiple of 4 and greater than or equal to 20.
Implementation Notes
Benchmarks
Minimum Value of Vector
short DSP_minval (const short *x, int nx)
x [nx]
Pointer to input vector of size nx.
Length of input data vector. Must be multiple of 4 and ≥20.
nx
return short
Maximum value of a vector.
This routine finds the minimum value of a vector and returns the 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_minval(short x[ ], int nx)
{
int i, min;
min = 32767;
for (i = 0; i < nx; i++)
if (x[i] < min)
min = x[i];
return min;
}
-
Bank Conflicts: No bank conflicts occur.
-
Interruptibility: The code is interrupt-tolerant but not interruptible.
-
The input data is loaded using double word wide loads, and the MIN2
instruction is used to get to the minimum.
Cycles
nx / 4 +10
Codesize
116 bytes
DSP_minval
C64x+ DSPLIB Reference
4-65

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c64x+

Table of Contents