Function

vDSP_zvfill(_:_:_:_:)

Populate a complex single-precision vector with a specified scalar value.

Declaration

func vDSP_zvfill(_ __A: UnsafePointer<DSPSplitComplex>, _ __C: UnsafePointer<DSPSplitComplex>, _ __IC: vDSP_Stride, _ __N: vDSP_Length)

Parameters

__A

Pointer to single-precision complex input scalar.

__C

Single-precision complex output vector.

__IC

Address stride for C.

__N

The number of elements to process.

Discussion

The functions in this group populate a vector with a specified scalar value.

The following code shows how to clear the array c, setting the value of each element to pi:

let n = vDSP_Length(10)
let stride = vDSP_Stride(1)

var a = Float.pi

var c = [Float](repeating: .nan,
                count: Int(n))

vDSP_vfill(&a,
           &c,
           stride,
           n)

// Prints "[3.1415925, 3.1415925, 3.1415925,
//          3.1415925, 3.1415925, 3.1415925,
//          3.1415925, 3.1415925, 3.1415925,
//          3.1415925]"
print(c)

See Also

Filling Vectors with a Single Scalar Value

static func fill<V>(inout V, with: Double)

Fills a double-precision vector with a specified scalar value.

static func fill<V>(inout V, with: Float)

Fills a single-precision vector with a specified scalar value.

func vDSP_vfill(UnsafePointer<Float>, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Populate a single-precision vector with a specified scalar value.

func vDSP_vfillD(UnsafePointer<Double>, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Populate a double-precision vector with a specified scalar value.

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