Basic Arithmetic Functions

Perform operations on scalar values and vectors.

Topics

Binary (Scalar-Vector) Division Operations

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

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

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

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

Multiplies the difference between a single-precision vector and a single-precision scalar value by a single-precision vector.

func vDSP_vsmsbD(UnsafePointer<Double>, vDSP_Stride, UnsafePointer<Double>, UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Multiplies the difference between a double-precision vector and a double-precision scalar value by a double-precision vector.

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

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

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.

func vDSP_vsmsaD(UnsafePointer<Double>, vDSP_Stride, UnsafePointer<Double>, UnsafePointer<Double>, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

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

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

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

Adds the product of a single-precision vector and a single-precision scalar value to a second product of a single-precision vector and a single-precision scalar value.

func vDSP_vsmsmaD(UnsafePointer<Double>, vDSP_Stride, UnsafePointer<Double>, UnsafePointer<Double>, vDSP_Stride, UnsafePointer<Double>, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Adds the product of a double-precision vector and a double-precision scalar value to a second product of a double-precision vector and a double-precision scalar value.