vDSP_maxviD
Calculates the maximum value and corresponding index in a double-precision vector.
Declaration
extern void vDSP_maxviD(const double *__A, vDSP_Stride __IA, double *__C, vDSP_Length *__I, vDSP_Length __N);Parameters
- __A:
The input vector,
A. - __IA:
The distance between the elements in the input vector.
- __C:
The output scalar value,
C. IfNis zero, the function setsCto -infinity. - __I:
The output scalar value,
I. IfNis zero, the function setsIto0. - __N:
The number of elements that the function processes.
Discussion
This function calculates the maximum value and its corresponding index of the first N elements of the input vector and writes the results to the output scalar parameters, C and I, respectively.
[Image]
The following code shows an example of using this function: