Function

vDSP_svsD(_:_:_:_:)

Calculates the sum of signed squares in a double-precision vector.

Declaration

func vDSP_svsD(_ __A: UnsafePointer<Double>, _ __IA: vDSP_Stride, _ __C: UnsafeMutablePointer<Double>, _ __N: vDSP_Length)

Parameters

__A

Double-precision real input vector.

__I

Stride for A

__C

Double-precision real output scalar

__N

The number of elements to process

Discussion

This function calculates the mean of the signed squares of the first N elements of A and writes the result to C:

A diagram showing the operation of the vDSP_svs function. There are three rows. The top row represents the input, vector A. The second row represents the summation operation. The bottom row represents the output, vector C. The diagram has connecting lines from the input vectors to the operation and from the operation to the output vector indicating the relationships between the input and output.

The operation is:

C[0] = sum(A[n] * |A[n]|, 0 <= n < N);

See Also

Vector Summation

static func sum<U>(U) -> Double

Returns the double-precision vector sum.

static func sum<U>(U) -> Float

Returns the single-precision vector sum.

static func sumAndSumOfSquares<U>(U) -> (elementsSum: Double, squaresSum: Double)

Returns the double-precision vector sum and sum of squares.

static func sumAndSumOfSquares<U>(U) -> (elementsSum: Float, squaresSum: Float)

Returns the single-precision vector sum and sum of squares.

static func sumOfMagnitudes<U>(U) -> Double

Returns the double-precision vector sum of magnitudes.

static func sumOfMagnitudes<U>(U) -> Float

Returns the single-precision vector sum of magnitudes.

static func sumOfSquares<U>(U) -> Double

Returns the double-precision vector sum of squares.

static func sumOfSquares<U>(U) -> Float

Returns the single-precision vector sum of squares.

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

Calculates the sum of magnitudes in a single-precision vector.

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

Calculates the sum of signed squares in a single-precision 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