Function

vDSP_vmaxD(_:_:_:_:_:_:_:)

Calculates the double-precision maximum of the corresponding values of two vectors using specified strides.

Declaration

func vDSP_vmaxD(_ __A: UnsafePointer<Double>, _ __IA: vDSP_Stride, _ __B: UnsafePointer<Double>, _ __IB: vDSP_Stride, _ __C: UnsafeMutablePointer<Double>, _ __IC: vDSP_Stride, _ __N: vDSP_Length)

Parameters

__A

Double-precision real input vector.

__IA

Stride for A.

__B

Double-precision real input vector.

__IB

Stride for B.

__C

Double-precision real output vector.

__IC

Stride for C.

__N

The number of elements to process.

Discussion

This function compares the first N elements of A with corresponding elements of B, leaving the greater (or equal) values as corresponding elements of C:

for (n = 0; n < N; ++n)
    C[n] = B[n] <= A[n] ? A[n] : B[n];

See Also

Vector-to-Vector Maxima

static func maximum<U>(U, U) -> [Double]

Returns a double-precision array containing the maximum of the corresponding values of two vectors.

static func maximum<U>(U, U) -> [Float]

Returns a single-precision array containing the maximum of the corresponding values of two vectors.

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

Calculates the maximum of the corresponding double-precision values of two vectors.

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

Calculates the maximum of the corresponding single-precision values of two vectors.

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

Calculates the single-precision maximum of the corresponding values of two vectors using specified strides.

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

Calculates the single-precision maximum magnitude of the corresponding values of two vectors using specified strides.

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

Calculates the double-precision maximum magnitude of the corresponding values of two vectors using specified strides.