vDSP

This section describes the C and Swift APIs for performing common routines on a single vector in vDSP. These functions perform tasks such as finding the absolute value of a vector, compressing the values of a vector, or converting between single and double precision vectors.

Overview

This document describes the vDSP portion of the Accelerate framework. The vDSP header provides a number of functions related to digital signal processing, including:

  • Vector and matrix arithmetic

  • Fourier transforms

  • Convolution, correlation, and window generation

  • Biquadratic filtering

For an overview that describes how to use these routines, read vDSP Programming Guide.

Symbols

Single-Vector Generation

The functions in this group build vectors with specific generator functions.

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

Multiplies input vector by a value that ramps up on successive calls, and cumulatively adds the result to the output vector; single precision.

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

Multiplies input vector by a value that ramps up on successive calls, and cumulatively adds the result to the output vector; double precision.

Single-Vector Squaring

The functions in this group compute the square of each element in a vector or the square of the magnitude of each element in a complex vector.

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

Computes the squared values of vector A and leaves the result in vector C; single precision.

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

Computes the squared values of vector A and leaves the result in vector C; double precision.

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

Computes the signed squares of vector A and leaves the result in vector C; single precision.

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

Computes the signed squares of vector A and leaves the result in vector C; double precision.

Single-Vector Normalization

func vDSP_normalize(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Float>?, vDSP_Stride, UnsafeMutablePointer<Float>, UnsafeMutablePointer<Float>, vDSP_Length)

Compute mean and standard deviation and then calculate new elements to have a zero mean and a unit standard deviation. Single precision.

func vDSP_normalizeD(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>?, vDSP_Stride, UnsafeMutablePointer<Double>, UnsafeMutablePointer<Double>, vDSP_Length)

Compute mean and standard deviation and then calculate new elements to have a zero mean and a unit standard deviation. Double precision.

Single-Vector Polar-Rectangular Conversion

The functions in this group convert each element in a vector between rectangular and polar coordinates.

Single-Vector Conversion to Decibel Equivalents

The functions in this group convert power or amplitude values to decibel values.

Single-Vector Fractional Part Extraction

The functions in this group remove the whole-number part of each element in a vector, leaving the fractional part in the output vector.

Single-Vector Complex Conjugation

Single-Vector Phase Computation

The functions in this group compute the phase values of each element in a complex vector.

Single-Vector Clipping, Limit, and Threshold Operations

The functions in this group restrict the values in a vector so that they fall within a given range or invert values outside a given range.

Single-Vector Compression

The functions in this group compress an input vector by eliminating elements that correspond to zero values in a gating vector.

Single-Vector Reversing

The functions in this group reverse the order of the elements in a vector.

func vDSP_vrvrs(UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Vector reverse order, in place; single precision.

func vDSP_vrvrsD(UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Vector reverse order, in place; double precision.

Single-Vector Zero Crossing Search

The functions in this group find a specified number of zero crossings, returning the last crossing found and the number of crossings found.

Single-Vector Operations: Linear Averaging

The functions in this group take a vector that contains the linear averages of values from other vectors and adds an additional vector into those averages.

Single-Vector Linear Interpolation

The functions in this group calculate the linear interpolation between neighboring elements.

Single-Vector Sliding-Window Summing

The functions in this group calculates a sliding-window sum for a vector.

Single-Vector Sliding-Window Maxima

The functions in this group find the maximum value in a sliding window within an input vector.

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

Finds the maximum value in a sliding window at each possible position within an input vector; single precision.

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

Finds the maximum value in a sliding window at each possible position within an input vector; double precision.

Single-Vector Precision Conversion

The functions in this group convert between single-precision and double-precision floating-point vectors.

Single-Vector Floating-Point to Integer Conversion

The functions in this group convert the values in a vector from floating-point values to integer values of a given size.

func vDSP_vfix8(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Int8>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to signed 8-bit integer values, rounding towards zero.

func vDSP_vfix8D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Int8>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to signed 8-bit integer values, rounding towards zero.

func vDSP_vfix16(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Int16>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to signed 16-bit integer values, rounding towards zero.

func vDSP_vfix16D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Int16>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to signed 16-bit integer values, rounding towards zero.

func vDSP_vfix32(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Int32>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to signed 32-bit integer values, rounding towards zero.

func vDSP_vfix32D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Int32>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to signed 16-bit integer values, rounding towards zero.

func vDSP_vfixr8(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Int8>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to signed 8-bit integer values, rounding towards nearest integer.

func vDSP_vfixr8D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Int8>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to signed 8-bit integer values, rounding towards nearest integer.

func vDSP_vfixr16(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Int16>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to signed 16-bit integer values, rounding towards nearest integer.

func vDSP_vfixr16D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Int16>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to signed 16-bit integer values, rounding towards nearest integer.

func vDSP_vfixr32(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Int32>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to signed 32-bit integer values, rounding towards nearest integer.

func vDSP_vfixr32D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Int32>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to signed 32-bit integer values, rounding towards nearest integer.

func vDSP_vfixu8(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<UInt8>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to unsigned 8-bit integer values, rounding towards zero.

func vDSP_vfixu8D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<UInt8>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to unsigned 8-bit integer values, rounding towards zero.

func vDSP_vfixu16(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<UInt16>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to unsigned 16-bit integer values, rounding towards zero.

func vDSP_vfixu16D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<UInt16>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to unsigned 16-bit integer values, rounding towards zero.

func vDSP_vfixu32(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<UInt32>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to unsigned 32-bit integer values, rounding towards zero.

func vDSP_vfixu32D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<UInt32>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to unsigned 32-bit integer values, rounding towards zero.

func vDSP_vfixru8(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<UInt8>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to unsigned 8-bit integer values, rounding towards nearest integer.

func vDSP_vfixru8D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<UInt8>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to unsigned 8-bit integer values, rounding towards nearest integer.

func vDSP_vfixru16(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<UInt16>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to unsigned 16-bit integer values, rounding towards nearest integer.

func vDSP_vfixru16D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<UInt16>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to unsigned 16-bit integer values, rounding towards nearest integer.

func vDSP_vfixru32(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<UInt32>, vDSP_Stride, vDSP_Length)

Converts an array of single-precision floating-point values to unsigned 32-bit integer values, rounding towards nearest integer.

func vDSP_vfixru32D(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<UInt32>, vDSP_Stride, vDSP_Length)

Converts an array of double-precision floating-point values to unsigned 32-bit integer values, rounding towards nearest integer.

Single-Vector Integer to Floating-Point Conversion

The functions in this group convert integer values of a given size to floating-point vectors.

func vDSP_vflt8(UnsafePointer<Int8>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts an array of signed 8-bit integers to single-precision floating-point values.

func vDSP_vflt8D(UnsafePointer<Int8>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Converts an array of signed 8-bit integers to double-precision floating-point values.

func vDSP_vflt16(UnsafePointer<Int16>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts an array of signed 16-bit integers to single-precision floating-point values.

func vDSP_vflt16D(UnsafePointer<Int16>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Converts an array of signed 16-bit integers to double-precision floating-point values.

func vDSP_vflt32(UnsafePointer<Int32>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts an array of signed 32-bit integers to single-precision floating-point values.

func vDSP_vflt32D(UnsafePointer<Int32>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Converts an array of signed 32-bit integers to double-precision floating-point values.

func vDSP_vfltu8(UnsafePointer<UInt8>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts an array of unsigned 8-bit integers to single-precision floating-point values.

func vDSP_vfltu8D(UnsafePointer<UInt8>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Converts an array of unsigned 8-bit integers to double-precision floating-point values.

func vDSP_vfltu16(UnsafePointer<UInt16>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts an array of unsigned 16-bit integers to single-precision floating-point values.

func vDSP_vfltu16D(UnsafePointer<UInt16>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Converts an array of unsigned 16-bit integers to double-precision floating-point values.

func vDSP_vfltu32(UnsafePointer<UInt32>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts an array of unsigned 32-bit integers to single-precision floating-point values.

func vDSP_vfltu32D(UnsafePointer<UInt32>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Converts an array of unsigned 32-bit integers to double-precision floating-point values.

Scalar-Vector Division

These functions divide a scalar by the elements of a vector to create corresponding elements of a result vector.

Vector-Scalar Multiply and Scalar Add

These functions multiply a scalar with each element of a vector, then add another scalar.

Vector-Scalar Multiply, Vector-Scalar Multiply, and Vector Add

These functions multiply a scalar with each element of a vector, then multiply a second scalar with each element of a second vector, and finally add together the two vectors resulting from the multiplications.

Vector-Scalar Multiply and Vector Subtract

These functions multiply a scalar with each element of a vector, then subtract the elements of a second vector.

Vector-to-Vector Real Vector Basic Arithmetic

Vector-to-Vector Complex Vector Basic Arithmetic

func vDSP_zvcma(UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length)

Multiplies a complex vector by the complex conjugates of another complex vector, and adds the products to a third complex vector; single precision.

Calculating Dot Products

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

Computes the dot or scalar product of vectors A and B and leaves the result in scalar *C; single precision.

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

Computes the dot or scalar product of vectors A and B and leaves the result in scalar *C; double precision.

func vDSP_zdotpr(UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length)

Calculates the complex dot product of complex vectors A and B and leaves the result in complex scalar *C; single precision.

func vDSP_zdotprD(UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length)

Calculates the complex dot product of complex vectors A and B and leaves the result in complex vector C; double precision.

func vDSP_zidotpr(UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length)

Calculates the conjugate dot product (or inner dot product) of complex vectors A and B and leave the result in complex vector C; single precision.

func vDSP_zidotprD(UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length)

Calculates the conjugate dot product (or inner dot product) of complex vectors A and B and leave the result in complex vector C; double precision.

func vDSP_zrdotpr(UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<Float>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length)

Calculates the complex dot product of complex vector A and real vector B and leaves the result in complex vector C; single precision.

func vDSP_zrdotprD(UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<Double>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length)

Calculates the complex dot product of complex vector A and real vector B and leaves the result in complex vector C; double precision.

Matrix Multiplication (Real Matrices)

The functions in this group multiply two matrices.

Matrix Transposition

Matrix and Submatrix Copying

1D Fast Fourier Transforms (Support Functions)

func vDSP_create_fftsetup(vDSP_Length, FFTRadix)

Builds a data structure that contains precalculated data for use by single-precision FFT functions.

func vDSP_create_fftsetupD(vDSP_Length, FFTRadix)

Builds a data structure that contains precalculated data for use by double-precision FFT functions.

func vDSP_destroy_fftsetup(FFTSetup?)

Frees an existing single-precision FFT data structure.

func vDSP_destroy_fftsetupD(FFTSetupD?)

Frees an existing double-precision FFT data structure.

1D Fast Fourier Transforms (In-Place Real)

The set of in-place real fast Fourier transform routines includes:

Table 1

In-place real fast Fourier transform routines

Single-precision

Double-precision

Does not use temporary buffer

vDSP_fft_zrip

vDSP_fft_zripD(_:_:_:_:_:)

Uses temporary buffer

vDSP_fft_zript(_:_:_:_:_:_:)

vDSP_fft_zriptD(_:_:_:_:_:_:)

Multiple signals; does not use temporary buffer

vDSP_fftm_zrip(_:_:_:_:_:_:_:)

vDSP_fftm_zripD(_:_:_:_:_:_:_:)

Multiple signals; uses temporary buffer

vDSP_fftm_zript(_:_:_:_:_:_:_:_:)

vDSP_fftm_zriptD(_:_:_:_:_:_:_:_:)

The temporary buffer versions can use a temporary buffer passed as a parameter for improved performance.

Call the vDSP_create_fftsetup function before you call the single precision routines to obtain an FFTSetup object that must remain available when you call the transform routine.

Call the vDSP_create_fftsetupD(_:_:) function before you call the double precision routines to obtain an FFTSetupD object that must remain available when you call the transform routine.

Use the DFT routines instead of these wherever possible. (For example, instead of calling vDSP_fft_zrip with a setup created with vDSP_create_fftsetup, call vDSP_DFT_Execute(_:_:_:_:_:) with a setup created with vDSP_DFT_zrop_CreateSetup(_:_:_:).)

func vDSP_fft_zrip(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an in-place single-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zripD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an in-place double-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zript(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, FFTDirection)

Computes an in-place single-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse). Usesa temporary buffer to improve performance.

func vDSP_fft_zriptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, FFTDirection)

Computes an in-place double-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fftm_zrip(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Performs the same operation as vDSP_fft_zrip, but on multiple signals with a single call.

1D Fast Fourier Transforms (Out-of-Place Real)

The set of out-of-place real fast Fourier transform routines includes:

Table 2

Out-of-place real fast Fourier transform routines

The temporary buffer versions can use a temporary buffer passed as a parameter for improved performance.

Call the vDSP_create_fftsetup function before you call the single precision routines to obtain an FFTSetup object that must remain available when you call the transform routine.

Call the vDSP_create_fftsetupD(_:_:) function before you call the double precision routines to obtain an FFTSetupD object that must remain available when you call the transform routine.

Use the DFT routines instead of these wherever possible. (For example, instead of calling vDSP_fft_zrop with a setup created with vDSP_create_fftsetup, call vDSP_DFT_Execute(_:_:_:_:_:) with a setup created with vDSP_DFT_zrop_CreateSetup(_:_:_:).)

func vDSP_fft_zrop(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zropD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zropt(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zroptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision real discrete Fourier transform, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

1D Fast Fourier Transforms (In-Place Complex)

The set of in-place complex discrete Fourier transform routines includes:

Table 3

In-place complex fast Fourier transform routines

Single-precision

Double-precision

Does not use temporary buffer

vDSP_fft_zip(_:_:_:_:_:)

vDSP_fft_zipD(_:_:_:_:_:)

Uses temporary buffer

vDSP_fft_zipt(_:_:_:_:_:_:)

vDSP_fft_ziptD(_:_:_:_:_:_:)

Multiple signals; does not use temporary memory

vDSP_fftm_zip(_:_:_:_:_:_:_:)

vDSP_fftm_zipD(_:_:_:_:_:_:_:)

Multiple signals; uses temporary memory

vDSP_fftm_zipt(_:_:_:_:_:_:_:_:)

vDSP_fftm_ziptD(_:_:_:_:_:_:_:_:)

The temporary buffer versions can use a temporary buffer passed as a parameter for improved performance.

Call the vDSP_create_fftsetup function before you call the single precision routines to obtain an FFTSetup object that must remain available when you call the transform routine.

Call the vDSP_create_fftsetupD(_:_:) function before you call the double precision routines to obtain an FFTSetupD object that must remain available when you call the transform routine.

Use the DFT routines instead of these wherever possible. (For example, instead of calling vDSP_fft_zip with a setup created with vDSP_create_fftsetup, call vDSP_DFT_Execute(_:_:_:_:_:) with a setup created with vDSP_DFT_zop_CreateSetup(_:_:_:).)

func vDSP_fft_zip(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an in-place single-precision complex discrete Fourier transform of the input/output vector signal, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse). Does not use temporary memory.

func vDSP_fft_zipD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an in-place double-precision complex discrete Fourier transform of the input/output vector signal, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse). Does not use temporary memory.

func vDSP_fft_zipt(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, FFTDirection)

Performs the same operation as the vDSP_fft_zip(_:_:_:_:_:) function but uses a temporary buffer to hold intermediate results for improved performance. Computes an in-place single-precision complex discrete Fourier transform of the input/output vector signal, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_ziptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, FFTDirection)

Performs the same operation as the vDSP_fft_zipD(_:_:_:_:_:) function but uses A temporary buffer for improved performance. Computes an in-place double-precision complex discrete Fourier transform of the input/output vector signal, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fftm_ziptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Performs the same operation as vDSP_fft_ziptD(_:_:_:_:_:_:), but on multiple signals with a single call. Performs the same operation as the vDSP_fftm_zipD(_:_:_:_:_:_:_:) function but uses a temporary buffer for improved performance.

1D Fast Fourier Transforms (Out-of-Place Complex)

The set of out-of-place complex discrete Fourier transform routines includes:

Table 4

Out-of-place complex fast Fourier transform routines

The temporary buffer versions can use a temporary buffer passed as a parameter for improved performance.

Call the vDSP_create_fftsetup function before you call the single precision routines to obtain an FFTSetup object that must remain available when you call the transform routine.

Call the vDSP_create_fftsetupD(_:_:) function before you call the double precision routines to obtain an FFTSetupD object that must remain available when you call the transform routine.

Use the DFT routines instead of these wherever possible. (For example, instead of calling vDSP_fft_zip with a setup created with vDSP_create_fftsetup, call vDSP_DFT_Execute(_:_:_:_:_:) with a setup created with vDSP_DFT_zop_CreateSetup(_:_:_:).)

func vDSP_fft_zop(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision complex discrete Fourier transform of the input vector, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zopD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision complex discrete Fourier transform of the input vector, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zopt(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision complex discrete Fourier transform of the input vector, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft_zoptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision complex discrete Fourier transform of the input vector, either from the time domain to the frequency domain (forward) or from the frequency domain to the time domain (inverse).

func vDSP_fft3_zop(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place radix-3 complex Fourier transform, either forward or inverse. The number of input and output values processed equals 3 times the power of 2 specified by parameter Log2N; single precision.

Deprecated
func vDSP_fft3_zopD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place radix-3 complex Fourier transform, either forward or inverse. The number of input and output values processed equals 3 times the power of 2 specified by parameter Log2N; double precision.

Deprecated
func vDSP_fft5_zop(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place radix-5 complex Fourier transform, either forward or inverse. The number of input and output values processed equals 5 times the power of 2 specified by parameter Log2N; single precision.

Deprecated
func vDSP_fft5_zopD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length, FFTDirection)

Computes an out-of-place radix-5 complex Fourier transform, either forward or inverse. The number of input and output values processed equals 5 times the power of 2 specified by parameter Log2N; double precision.

Deprecated

2D Fast Fourier Transforms (In-Place Complex)

func vDSP_fft2d_zip(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place single-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zipD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place double-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zipt(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place single-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

func vDSP_fft2d_ziptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place double-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

2D Fast Fourier Transforms (Out-of-Place Complex)

func vDSP_fft2d_zop(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zopD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zopt(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

func vDSP_fft2d_zoptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision complex discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

2D Fast Fourier Transforms (In-Place Real)

func vDSP_fft2d_zrip(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place single-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zripD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place double-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zript(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place single-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

func vDSP_fft2d_zriptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an in-place double-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

2D Fast Fourier Transforms (Out-of-Place Real)

func vDSP_fft2d_zrop(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zropD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse).

func vDSP_fft2d_zropt(FFTSetup, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place single-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

func vDSP_fft2d_zroptD(FFTSetupD, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Length, vDSP_Length, FFTDirection)

Computes an out-of-place double-precision real discrete FFT, either from the spatial domain to the frequency domain (forward) or from the frequency domain to the spatial domain (inverse). A buffer is used for intermediate results.

Discrete Fourier Transforms (DFT)

The functions in the DFT family calculate a discrete Fourier transform of a specified length on a vector.

func vDSP_DFT_zop_CreateSetup(vDSP_DFT_Setup?, vDSP_Length, vDSP_DFT_Direction)

Creates a data structure for use with vDSP_DFT_Execute(_:_:_:_:_:) or vDSP_DCT_Execute(_:_:_:) to perform a complex-to-complex discrete Fourier transform, forward or inverse.

func vDSP_DFT_zop_CreateSetupD(vDSP_DFT_SetupD?, vDSP_Length, vDSP_DFT_Direction)

Creates a data structure for use with vDSP_DFT_ExecuteD(_:_:_:_:_:) to perform a double-precision, complex-to-complex discrete Fourier transform, forward or inverse.

func vDSP_DFT_zrop_CreateSetup(vDSP_DFT_Setup?, vDSP_Length, vDSP_DFT_Direction)

Creates a data structure for use with vDSP_DFT_Execute(_:_:_:_:_:) to perform a single-precision discrete Fourier transform, forward (real to complex) or inverse (complex to real).

func vDSP_DFT_zrop_CreateSetupD(vDSP_DFT_SetupD?, vDSP_Length, vDSP_DFT_Direction)

Creates a data structure for use with vDSP_DFT_ExecuteD(_:_:_:_:_:) to perform a double-precision discrete Fourier transform, forward (real to complex) or inverse (complex to real).

func vDSP_DFT_DestroySetup(vDSP_DFT_Setup?)

Releases a single-precision setup object.

func vDSP_DFT_DestroySetupD(vDSP_DFT_SetupD?)

Releases a double-precision setup object.

Discrete Cosine Transforms (DCT)

The functions in the DCT family calculate a discrete cosine transform of a specified length on a vector.

func vDSP_DCT_CreateSetup(vDSP_DFT_Setup?, vDSP_Length, vDSP_DCT_Type)

Creates a data structure for use with vDSP_DCT_Execute(_:_:_:) to perform a single-precision, discrete cosine transform.

func vDSP_DCT_Execute(OpaquePointer, UnsafePointer<Float>, UnsafeMutablePointer<Float>)

Calculates the discrete single-precision cosine transform for a vector.

Correlation and Convolution

These functions perform correlation and convolution operations on real or complex signals in vDSP.

func vDSP_f3x3(UnsafePointer<Float>, vDSP_Length, vDSP_Length, UnsafePointer<Float>, UnsafeMutablePointer<Float>)

Filters an image by performing a two-dimensional convolution with a 3x3 kernel; single precision.

func vDSP_f3x3D(UnsafePointer<Double>, vDSP_Length, vDSP_Length, UnsafePointer<Double>, UnsafeMutablePointer<Double>)

Filters an image by performing a two-dimensional convolution with a 3x3 kernel; double precision.

func vDSP_f5x5(UnsafePointer<Float>, vDSP_Length, vDSP_Length, UnsafePointer<Float>, UnsafeMutablePointer<Float>)

Filters an image by performing a two-dimensional convolution with a 5x5 kernel; single precision.

func vDSP_f5x5D(UnsafePointer<Double>, vDSP_Length, vDSP_Length, UnsafePointer<Double>, UnsafeMutablePointer<Double>)

Filters an image by performing a two-dimensional convolution with a 5x5 kernel; double precision.

Windowing

This section describes the C API for Blackman, Hamming, and Hann windows.

Single-Channel Biquadratic IIR Filtering

Biquad filtering is implemented as a cascade of individual IIR filters called sections; each section has its own set of feedback and feedforward coefficients.

Each section implements a direct-form 1 filter. When the biquad filter function executes, the sections execute in sequence, each section processing the entire input signal and leaving its output to be processed by the next section.

func vDSP_biquad_CreateSetup(UnsafePointer<Double>, vDSP_Length)

Builds a data structure that contains precalculated data for use by the single-precision cascaded biquad IIR filter function vDSP_biquad(_:_:_:_:_:_:_:).

func vDSP_biquad_CreateSetupD(UnsafePointer<Double>, vDSP_Length)

Builds a data structure that contains precalculated data for use by double-precision cascaded biquad IIR filter functions.

Multichannel Biquadratic IIR Filtering

Multichannel biquad filtering is implemented, for each channel of a specified set, as a cascade of individual IIR filters called sections; each section has its own set of feedback and feedforward coefficients.

Each section implements a direct-form 2 filter. When the biquad filter function executes, the sections execute in sequence, each section processing the entire input signal and leaving its output to be processed by the next section.

func vDSP_biquadm_CreateSetup(UnsafePointer<Double>, vDSP_Length, vDSP_Length)

Builds a data structure that contains precalculated single-precision data for use by multichannel cascaded biquad IIR filter functions.

func vDSP_biquadm_CreateSetupD(UnsafePointer<Double>, vDSP_Length, vDSP_Length)

Builds a data structure that contains precalculated double-precision data for use by multichannel cascaded biquad IIR filter functions.

func vDSP_biquadm_DestroySetup(vDSP_biquadm_Setup)

Destroys a single-precision multichannel biquad IIR setup object.

func vDSP_biquadm_DestroySetupD(vDSP_biquadm_SetupD)

Destroys a double-precision multichannel biquad IIR setup object.

func vDSP_biquadm_CopyState(vDSP_biquadm_Setup, OpaquePointer)

Copies the filter state from one single-precision multichannel biquad IIR filter object to another.

func vDSP_biquadm_CopyStateD(vDSP_biquadm_SetupD, OpaquePointer)

Copies the filter state from one double-precision multichannel biquad IIR filter object to another.

func vDSP_biquadm_ResetState(vDSP_biquadm_Setup)

Resets the filter state of a single-precision multichannel biquad IIR filter object.

func vDSP_biquadm_ResetStateD(vDSP_biquadm_SetupD)

Resets the filter state of a double-precision multichannel biquad IIR filter object.

func vDSP_biquadm_SetActiveFilters(vDSP_biquadm_Setup, UnsafePointer<Bool>)

Sets the overall active/inactive filter state of a valid single-precision multichannel biquad IIR filter setup of type vDSP_biquadm_Setup.

func vDSP_biquadm_SetCoefficientsSingle(vDSP_biquadm_Setup, UnsafePointer<Float>, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Updates the filter coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are given in single precision.

func vDSP_biquadm_SetCoefficientsDouble(vDSP_biquadm_Setup, UnsafePointer<Double>, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Updates the filter coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are given in double precision.

func vDSP_biquadm_SetTargetsSingle(vDSP_biquadm_Setup, UnsafePointer<Float>, Float, Float, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Sets target values for selected coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are given in single precision. Each selected coefficient is incremented at each sample until the difference between its value and the target value is less than a specified threshold.

func vDSP_biquadm_SetTargetsDouble(vDSP_biquadm_Setup, UnsafePointer<Double>, Float, Float, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Sets target values for selected coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are specified in double precision. Each selected coefficient is incremented at each sample until the difference between its value and the target value is less than a specified threshold.

Complex Vector Conversion

These functions convert complex vectors between interleaved and split forms.

func vDSP_ctoz(UnsafePointer<DSPComplex>, vDSP_Stride, UnsafePointer<DSPSplitComplex>, vDSP_Stride, vDSP_Length)

Copies the contents of an interleaved complex vector C to a split complex vector Z; single precision.

func vDSP_ctozD(UnsafePointer<DSPDoubleComplex>, vDSP_Stride, UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, vDSP_Length)

Copies the contents of an interleaved complex vector C to a split complex vector Z; double precision.

func vDSP_ztoc(UnsafePointer<DSPSplitComplex>, vDSP_Stride, UnsafeMutablePointer<DSPComplex>, vDSP_Stride, vDSP_Length)

Copies the contents of a split complex vector Z to an interleaved complex vector C; single precision.

func vDSP_ztocD(UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafeMutablePointer<DSPDoubleComplex>, vDSP_Stride, vDSP_Length)

Copies the contents of a split complex vector A to an interleaved complex vector C; double precision.

Floating-Point to 24-bit Integer Conversion

The functions in this group scale and convert floating-point values to and from signed 24-bit integer values.

func vDSP_vsmfix24(UnsafePointer<Float>, vDSP_Stride, UnsafePointer<Float>, UnsafeMutablePointer<vDSP_int24>, vDSP_Stride, vDSP_Length)

Scales and converts single-precision floating-point values to signed 24-bit integer values.

func vDSP_vsmfixu24(UnsafePointer<Float>, vDSP_Stride, UnsafePointer<Float>, UnsafeMutablePointer<vDSP_uint24>, vDSP_Stride, vDSP_Length)

Scales and converts single-precision floating-point values to unsigned 24-bit integer values.

func vDSP_vflt24(UnsafePointer<vDSP_int24>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts signed 24-bit integer values to single-precision floating-point values.

func vDSP_vfltu24(UnsafePointer<vDSP_uint24>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts unsigned 24-bit integer values to single-precision floating-point values.

func vDSP_vfltsm24(UnsafePointer<vDSP_int24>, vDSP_Stride, UnsafePointer<Float>, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts and scales signed 24-bit integer values to single-precision floating-point values.

func vDSP_vfltsmu24(UnsafePointer<vDSP_uint24>, vDSP_Stride, UnsafePointer<Float>, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Converts and scales unsigned 24-bit integer values to single-precision floating-point values.

Data Types

This document describes the data types used by the vDSP portion of the Accelerate framework.

vDSP_Length

Used for numbers of elements in arrays and indices of elements in arrays. It is also used for the base-two logarithm of numbers of elements.

vDSP_Stride

Used to hold differences between indices of elements, including the lengths of strides.

DSPComplex

Used to hold a complex value.

DSPSplitComplex

Used to represent a complex number when the real and imaginary parts are stored in separate arrays.

DSPDoubleComplex

Used to hold a double-precision complex value.

DSPDoubleSplitComplex

Used to represent a double-precision complex number when the real and imaginary parts are stored in separate arrays.

FFTSetup

An opaque type that contains setup information for a given FFT transform.

FFTSetupD

An opaque type that contains setup information for a given double-precision FFT transform.

vDSP_DFT_Setup

An opaque type that contains setup information for a given DFT transform.

vDSP_uint24

A data structure that holds a 24-bit unsigned integer value.

vDSP_int24

A data structure that holds a 24-bit signed integer value.

Constants

vDSP Compile-Time Version Information

The version of vDSP (at compile time).

vDSP_DFT_Direction

Specifies whether to perform a forward or inverse DFT.

FFTDirection

Specifies whether to perform a forward or inverse FFT.

FFTRadix

The size of the FFT decomposition.

FFTWindow

Specifies the windowing mode for data values in an FFT or reverse FFT.