Function

vDSP_vsorti(_:_:_:_:_:)

Sorts the indices of a single-precision vector.

Declaration

func vDSP_vsorti(_ __C: UnsafePointer<Float>, _ __I: UnsafeMutablePointer<vDSP_Length>, _ __Temporary: UnsafeMutablePointer<vDSP_Length>?, _ __N: vDSP_Length, _ __Order: Int32)

Parameters

__C

Single-precision real input vector

__I

Integer output vector. Must be initialized with the indices of vector C, from 0 to N-1.

__Temporary

Temporary vector. This is currently not used and NULL should be passed.

__N

The number of elements to process

__Order

Flag for sort order: 1 for ascending, -1 for descending

Discussion

Leaves input vector C unchanged and performs an in-place sort of the indices in vector I according to the values in C. The sort order is specified by parameter Order.

The values in C can then be obtained in sorted order, by taking indices in sequence from I.

See Also

Single-Vector Sorting Functions