Function v DSP _vgen D(_: _: _: _: _:)
Generates a double-precision, tapered-ramped vector.
iOS 4.0+ macOS 10.4+ Mac Catalyst 13.0+ Beta tvOS 9.0+ watchOS 2.0+ Parameters
Pointer to double-precision real input scalar: base value.
Pointer to double-precision real input scalar: end value.
Double-precision real output vector.
The number of elements to process.
and v DSP _vgenp(_: _: _: _: _: _: _: _:) functions populate a vector by linearly interpolating between the base and end-value parameters, using the following operation: v DSP _vgen D(_: _: _: _: _:)
for (n = 0; n < N; ++n)
C[n] = A + (B - A) * n/(N-1);
For example, the following code fills an array with the ramped values from 0 to 1024:
let n = vDSP_Length(1024)
let stride = vDSP_Stride(1)
var a: Float = 0
var b: Float = 1024
var c = [Float](repeating: 0,
The following illustrates the values of
c See Also Vector Generation with Tapered Ramps
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