Overview
Returns Argmax_i x[i]. Finds and returns the index which contains the maximum value in the given vector.
Dispatcher Prototype
void volk_32f_index_max_16u_a_sse4_1(unsigned int* target, const float* src0, unsigned int num_points)
Inputs
- src0: The input vector of floats.
- num_points: The number of data points.
Outputs
- target: The index of the maximum value in the input buffer.
Example
int N = 10;
float* in = (
float*)
volk_malloc(
sizeof(
float)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
float x = (float)ii;
in[ii] = -(x-4) * (x-4) + 5;
}
printf("maximum is %1.2f at index %u\n", in[*out], *out);