Function

vDSP_convD(_:_:_:_:_:_:_:_:)

Performs either correlation or convolution on two real double-precision vectors.

Declaration

func vDSP_convD(_ __A: UnsafePointer<Double>, _ __IA: vDSP_Stride, _ __F: UnsafePointer<Double>, _ __IF: vDSP_Stride, _ __C: UnsafeMutablePointer<Double>, _ __IC: vDSP_Stride, _ __N: vDSP_Length, _ __P: vDSP_Length)

Parameters

__A

Real double-precision input signal vector. The length of this vector must be at least N + P - 1.

__IA

The stride through A.

__F

Real double-precision filter vector.

__IF

The stride through F.

__C

Real double-precision output signal vector.

__IC

The stride through C.

__N

The length of C.

__P

The length of F.

Discussion

If __IF is positive, vDSP_convD(_:_:_:_:_:_:_:_:) performs correlation. If __IF is negative, it performs convolution and F must point to the last vector element. The function can run in place, but C cannot be in place with F:

for (n = 0; n < N; ++n)
    C[n] = sum(A[n+p] * F[p], 0 <= p < P);

See Also

Real Vectors

static func convolve<T, U>(T, withKernel: U) -> [Double]

Returns the 1D convolution of a double-precision vector.

static func convolve<T, U>(T, withKernel: U) -> [Float]

Returns the 1D convolution of a single-precision vector.

static func convolve<T, U, V>(T, withKernel: U, result: inout V)

Calculates the 1D convolution of a double-precision vector.

static func convolve<T, U, V>(T, withKernel: U, result: inout V)

Calculates the 1D convolution of a single-precision vector.

static func correlate<T, U>(T, withKernel: U) -> [Double]

Returns the correlation of a double-precision signal vector and a filter vector.

static func correlate<T, U>(T, withKernel: U) -> [Float]

Returns the correlation of a single-precision signal vector and a filter vector.

static func correlate<T, U, V>(T, withKernel: U, result: inout V)

Calculates the correlation of a double-precision signal vector and a filter vector.

static func correlate<T, U, V>(T, withKernel: U, result: inout V)

Calculates the correlation of a single-precision signal vector and a filter vector.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software