DSP_maxidx
[Math]

Collaboration diagram for DSP_maxidx:


Detailed Description

int DSP_maxidx (const short *x, int nx)


Function Documentation

int DSP_maxidx ( const short *  x,
int  nx 
)

This routine finds the max value of a vector and returns the index of that value. The input array is treated as 16 separate columns that are interleaved throughout the array. If values in different columns are equal to the maximum value, then the element in the leftmost column is returned. If two values within a column are equal to the maximum, then the one with the lower index is returned. Column takes precedence over index. return int Index for vector element with maximum value.

Parameters:
x = Pointer to input vector of size nx. Must be double-word aligned
nx = Length of input data vector. Must be multiple of 16 and >=48
Algorithm:
DSP_maxidx_cn.c is the natural C equivalent of the optimized intrinsic C code without restrictions note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
nx must be a multiple of 16 and greater than or equal to 32.
The input vector x[ ] must be double-word aligned.
Implementation notes:
Endian Support: The code supports both big and little endian modes..
Interruptibility: The code is interruptible..


Copyright 2014, Texas Instruments Incorporated