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


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



Double-precision real input vector.


Stride for A.


Double-precision real input vector.


Stride for B.


Double-precision real input scalar.


Double-precision real output vector.


Stride for D.


The number of elements to process.


This function subtracts the the first N elements of A from B, multiplies the differences by the scalar value C, and writes the result to D:

A diagram showing the operation of the vDSP_vsbsm function. There are five rows. The top two rows represents the first two inputs, vector A and vector B. The third row represents the intermediate result of the first two inputs. The forth row represents the third input, scalar C. The bottom row represents the output, vector D. 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)
    D[n] = (A[n] - B[n]) * C;

See Also

Ternary (Vector-Vector-Scalar) Subtract-Multiply Operations