Function

# vDSP_vthres(_:_:_:_:_:_:)

Calculates single-precision vector threshold with zero fill to the specified range.

## Parameters

`__A`

Single-precision real input vector

`__IA`

Stride for `A`

`__B`

Pointer to single-precision real input scalar: lower threshold

`__C`

Single-precision real output vector

`__IC`

Stride for `C`

`__N`

The number of elements to process

## Discussion

Performs the following operation:

Creates vector `C` by comparing each input from vector `A` with scalar `*B`. If an input value is less than `*B`, zero is written to `C`; otherwise, the input value from `A` is copied to `C`.

### Threshold Operations

`static func threshold<U>(U, to: Double, with: vDSP.ThresholdRule<Double>) -> [Double]`

Returns the elements of the supplied double-precision vector after applying a specified thresholding rule.

`static func threshold<U>(U, to: Float, with: vDSP.ThresholdRule<Float>) -> [Float]`

Returns the elements of the supplied single-precision vector after applying a specified thresholding rule.

`static func threshold<U, V>(U, to: Double, with: vDSP.ThresholdRule<Double>, result: inout V)`

Calculates the elements of the supplied double-precision vector after applying a specified thresholding rule.

`static func threshold<U, V>(U, to: Float, with: vDSP.ThresholdRule<Float>, result: inout V)`

Calculates the elements of the supplied single-precision vector after applying a specified thresholding rule.

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.