Function

vDSP_vmin(_:_:_:_:_:_:_:)

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

Declaration

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

Parameters

__A

Single-precision real input vector.

__IA

Stride for A.

__B

Single-precision real input vector.

__IB

Stride for B.

__C

Single-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 lesser (or equal) values as corresponding elements of C:

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

See Also

Vector-to-Vector Minima

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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