Function

vDSP_vsbsbmD(_:_:_:_:_:_:_:_:_:_:_:)

Multiplies the difference of two double-precision vectors by a second difference of two double-precision vectors.

Declaration

func vDSP_vsbsbmD(_ __A: UnsafePointer<Double>, _ __IA: vDSP_Stride, _ __B: UnsafePointer<Double>, _ __IB: vDSP_Stride, _ __C: UnsafePointer<Double>, _ __IC: vDSP_Stride, _ __D: UnsafePointer<Double>, _ __ID: vDSP_Stride, _ __E: UnsafeMutablePointer<Double>, _ __IE: vDSP_Stride, _ __N: vDSP_Length)

Parameters

__A

Double-precision real input vector.

__IA

Stride for A.

__B

Double-precision real input vector.

__IB

Stride for B.

__C

Double-precision real input vector.

__IC

Stride for C.

__D

Double-precision real input vector.

__ID

Stride for D.

__E

Double-precision real output vector.

__IE

Stride for E.

__N

The number of elements to process.

Discussion

This function calculates the differences of the first N elements of A and B, the differences of the first N elements of C and D, multiplies the corresponding differences, and writes the result to E:

A diagram showing the operation of the vDSP_vsbsbm function. There are four rows and the top three rows are composed of two columns. The top two rows of the left column represent the input vectors A and B. The top two rows of the right column represent the input vectors C and D. The third row in both columns represent the intermediate result of the respective inputs. The bottom row represents the output vector, E. The diagram has connecting lines from the inputs to the output vector indicating the relationships between the inputs and output.

The operation is:

for (n = 0; n < N; ++n)
    E[n] = (A[n]-B[n]) * (C[n]-D[n]);

See Also

Quaternary Subtract-Subtract-Multiply Operations