21.07.2015 Views

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

maxidxmaxidxFunctionIndex of the Maximum Element of a Vectorshort r = maxidx (DATA *x, ushort ng, ushort ng_size);(defined in maxidx.asm)Argumentsx[nx]rngng_sizePointer to input vector of size nx.Index for vector element with maximum value.Number of groups.Size of group.DescriptionThe vector x is divided in ng groups of size ng_size.Size of x = ng x ng_size. ng_size must be an even number between 2 and 34.The larger ng_size, the better the performance.Returns the index of the maximumelement of a vector x. In case of multiple maximum elements, r containsthe index of the first maximum element found.Example 1: size of x is 64.Choose ng_size = 32, ng = 2Example 2: size of x is 100.Choose ng_size = 20, ng = 5Example 3: size of x is 90.Choose ng_size = 30, ng = 3AlgorithmNot applicableOverflow Handling MethodologyNot applicableSpecial Requirements ng_size is an even number between 2 and 34Implementation Notes noneExampleBenchmarksSee examples/maxidx subdirectory(preliminary)Cycles † Core: nx/2 + ng16Overhead: 40Code size(in bytes)143† Assumes all data is in on-chip dual-access RAM and that there is no bus conflict due to twiddletable reads and instruction fetches (provided linker command file reflects those conditions).Function Descriptions4-69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!