Function Descriptions
3.23 Index of Maximum Value of an Even Length Real Array
Description:
This module finds the index of the maximum value of an even length real array.
Header File:
FPU.h
Declaration:
Uint16 maxidx_SP_RV_2(float32
*
x, Uint16 N)
Usage:
index = maxidx_SP_RV_2(x, N);
float32 x
input array
Uint16 N
length of x
Uint16 index
index of maximum value in x
NOTE:
1. N must be even.
2. If more than one instance of the max value exists in x[], the function will return the
index of the first occurence (lowest index value)
Alignment Requirements:
None
Example:
#include "FPU.h"
#define N 10
float32 x[N];
Uint16 index;
main()
{
index = maxidx_SP_RV_2(x, N);
}
Benchmark Information:
Number of Cycles = 3*N + 21 cycles (including the call and return)
Sep 10, 2012 56