Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit | ![]() ![]() |
[y, index] = mot###_max(X)
Input/Output
Output: Real value Y (largest element of X), index
Algorithm
#define IN0 MaxValue = X[0]; Index = 0; for(i=1; i<size; i++) { if(X[i] > MaxValue) { MaxValue = X[i]; index = i; } }
Memory & Register
X memory: label IN points to the location of the real data input of vector X.
Status Register
The assembly function max-1r-r.asm
does not explicitly set any status registers/bits.
Data Size Limit
The length of vector X can't be larger than the continuous available data memory size.
Data Range Limit
The value of input vector X must be between -1.0 and +1.0.
Precision
In the case of DSP563, precision is 23 bits.
In the case of DSP566, precision is 15 bits.
Performance Limit
![]() | log10-c.asm | max-1c.asm | ![]() |