Motorola DSP Developer's Kit | ![]() ![]() |
[Y, I] = mot###_sort(X)
Description
This function sorts real elements of input real vector X
Input/Output
Output: Result vector Y, and index vector I
Algorithm
#define IN X:$0 #define OUT X:$0 #define INDEX Y:$0
The algorithm is the same as sort-r1
, the only difference between these two functions is that sort-r2
has one more output-index vector I.
Memory & Register
(Same as Label IN)
Status Register
The assembly function sort-2r.asm
does not explicitly set any status registers/bits during the function execution.
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.
![]() | sort-r1.asm | sort-c.asm | ![]() |