Overview
Returns Argmax_i mag(x[i]). Finds and returns the index which contains the maximum magnitude for complex points in the given vector.
Dispatcher Prototype
void volk_32fc_index_max_16u_a_sse3(
unsigned int* target,
lv_32fc_t* src0,
unsigned int num_points)
Inputs
- src0: The complex input vector.
- num_points: The number of samples.
Outputs
- target: The index of the point with maximum magnitude.
Example Calculate the index of the maximum value of
for points around the unit circle.
int N = 10;
for(unsigned int ii = 0; ii < N/2; ++ii){
float real = 2.f * ((float)ii / (float)N) - 1.f;
float imag = std::sqrt(1.f - real * real);
in[ii] = in[ii] * in[ii] + in[ii];
in[N-ii] = in[N-ii] * in[N-ii] + in[N-ii];
}
printf("index of max value = %u\n", *max);