Function

vDSP_vneg(_:_:_:_:_:)

Calculates the negative value of each element in the supplied single-precision vector using specified stride.

Declaration

func vDSP_vneg(_ __A: UnsafePointer<Float>, _ __IA: vDSP_Stride, _ __C: UnsafeMutablePointer<Float>, _ __IC: vDSP_Stride, _ __N: vDSP_Length)

Parameters

__A

Single-precision real input vector.

__IA

Address stride for A.

__C

Single-precision real output vector.

__IC

Address stride for C.

__N

The number of elements to process.

Discussion

This calculates the following:

    for (n = 0; n < N; ++n)
        C[n*IC] = -A[n*IA];

Each value in C is replaced by the negated value of the corresponding element in A.

See Also

Single-Vector Negation

static func negative<U, V>(U, result: inout V)

Calculates the negative values of the supplied single-precision vector.

static func negative<U, V>(U, result: inout V)

Calculates the negative values of the supplied double-precision vector.

static func negative<U>(U) -> [Double]

Returns a double-precision array containing the negative values of the supplied vector.

static func negative<U>(U) -> [Float]

Returns a single-precision array containing the negative values of the supplied vector.

static func negativeAbsolute<U, V>(U, result: inout V)

Calculates the negative absolute values of the supplied double-precision vector.

static func negativeAbsolute<U>(U) -> [Double]

Returns a double-precision array containing the negative absolute values of the supplied vector.

static func negativeAbsolute<U, V>(U, result: inout V)

Calculates the negative absolute values of the supplied single-precision vector.

static func negativeAbsolute<U>(U) -> [Float]

Returns a single-precision array containing the negative absolute values of the supplied vector.

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

Calculates the negative value of each element in the supplied double-precision vector using specified stride.