Calculates single-precision vector quadratic interpolation.


func vDSP_vqint(_ __A: UnsafePointer<Float>, _ __B: UnsafePointer<Float>, _ __IB: vDSP_Stride, _ __C: UnsafeMutablePointer<Float>, _ __IC: vDSP_Stride, _ __N: vDSP_Length, _ __M: vDSP_Length)



Single-precision real input vector with a stride of 1.


Single-precision real input vector. Integer parts are indices into A and fractional parts are interpolation constants


Stride for B.


Single-precision real output vector.


Stride for C.


Count for C.


Length of A. Must be greater than or equal to 3.


Generates C by interpolating between neighboring values of A as controlled by values in B. The integer portion of each element in B is the zero-based index of the second element of a triple of adjacent values in vector A.

The value of the corresponding element of C is derived from these three values by quadratic interpolation, using the fractional part of the value in B. The calculation is equivalent to the following pseudocode:

for (n = 0; n < N; ++n)
    b = max(trunc(B[n]), 1);
    a = B[n] - b;
    C[n] = (A[b-1]*(a**2-a)
           + A[b]*(2-2*a**2)
           + A[b+1]*(a**2+a))
           / 2;

Argument M is not used in the calculation. However, the integer parts of the values in B must be less than or equal to M - 2.

See Also

Vector-to-Vector Quadratic Interpolation