Multiplies the product of a double-precision vector and a double-precision scalar value by a double-precision scalar value.


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



Double-precision real input vector.


Stride for A.


Pointer to double-precision real input scalar.


Pointer to double-precision real input scalar.


Double-precision real output vector.


Stride for D.


The number of elements to process.


This function calculates the products of the first N elements of A and the scalar value B, adds each product to the scalar value C, and writes the result to D:

A diagram showing the operation of the vDSP_vsmsa function. There are five rows. The top two rows represents the first two inputs, vector A and scalar B. The third row represents the intermediate result of the first two inputs. The forth row represents the third input, vector C. The bottom row represents the output, vector D. The diagram has connecting lines from the input vectors 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 + C;

See Also

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

func vDSP_vsmsa(UnsafePointer<Float>, vDSP_Stride, UnsafePointer<Float>, UnsafePointer<Float>, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Multiplies the product of a single-precision vector and a single-precision scalar value by a single-precision scalar value.

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