Function

# vDSP_maxv(_:_:_:_:)

Calculates the maximum value in a single-precision vector.

## Parameters

`__A`

Single-precision real input vector.

`__I`

Stride for `A`.

`__C`

Output scalar.

`__N`

The number of elements to process. If `N` is zero (`0`), this function returns `-INFINITY`.

## Discussion

This function calculates the maximum value of the first `N` elements of `A` and writes the result to `C`:

The operation is:

The following code shows an example of using `vDSP_maxv(_:_:_:_:)`.

### Maximum Calculation

`static func maximum<U>(U) -> Double`

Returns the maximum element of a double-precision vector.

`static func maximum<U>(U) -> Float`

Returns the maximum element of a single-precision vector.

`static func maximumMagnitude<U>(U) -> Double`

Returns the maximum magnitude element of a double-precision vector.

`static func maximumMagnitude<U>(U) -> Float`

Returns the maximum magnitude element of a single-precision vector.

`static func indexOfMaximum<U>(U) -> (UInt, Double)`

Returns the maximum element, and its index, of a double-precision vector.

`static func indexOfMaximum<U>(U) -> (UInt, Float)`

Returns the maximum element, and its index, of a signal-precision vector.

`static func indexOfMaximumMagnitude<U>(U) -> (UInt, Double)`

Returns the maximum magnitude element, and its index, of a double-precision vector.

`static func indexOfMaximumMagnitude<U>(U) -> (UInt, Float)`

Returns the maximum magnitude element, and its index, of a single-precision vector.