Function

vDSP_vindex(_:_:_:_:_:_:)

Gathers a single-precision vector using the specified 0-based indices.

Declaration

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

Parameters

_A

Single-precision real input vector.

_B

Single-precision real input vector: indices.

_IB

Address stride for B.

_C

Single-precision real output vector.

_IC

Address stride for C.

_N

The number of elements to process.

Discussion

Performs the following operation:

mathematical formula

Uses vector B as zero-based subscripts to copy selected elements of vector A to vector C. Fractional parts of vector B are ignored.