Function

vDSP_vlim(_:_:_:_:_:_:_:)

Calculates the single-precision vector test limit using the specified stride.

Declaration

func vDSP_vlim(_ __A: UnsafePointer<Float>, _ __IA: vDSP_Stride, _ __B: UnsafePointer<Float>, _ __C: UnsafePointer<Float>, _ __D: UnsafeMutablePointer<Float>, _ __ID: vDSP_Stride, _ __N: vDSP_Length)

Parameters

__A

Single-precision real input vector

__IA

Stride for A

__B

Pointer to single-precision real input scalar: limit

__C

Pointer to single-precision real input scalar

__D

Single-precision real output vector

__ID

Stride for D

__N

The number of elements to process

Discussion

Compares values from vector A to limit scalar *B. For inputs greater than or equal to *B, scalar *C is written to D . For inputs less than *B, the negated value of scalar *C is written to vector D.

This calculates the following:

    for (n = 0; n < N; ++n)
        if (*B <= A[n*IA])
            D[n*ID] = *C;
        else
            D[n*ID] = -(*C);

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