Function

vDSP_DFT_zrop_CreateSetup(_:_:_:)

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).

Declaration

func vDSP_DFT_zrop_CreateSetup(_ __Previous: vDSP_DFT_Setup?, _ __Length: vDSP_Length, _ __Direction: vDSP_DFT_Direction) -> vDSP_DFT_Setup?

Parameters

__Previous

Either NULL, or a previous result from any single-precision setup function in the DFT/DCT family: vDSP_DFT_zop_CreateSetup(_:_:_:), vDSP_DFT_zrop_CreateSetup(_:_:_:), vDSP_DFT_CreateSetup(_:_:) (deprecated), or vDSP_DCT_CreateSetup(_:_:_:).

__Length

The number of real elements to be transformed (in a forward, real-to-complex transform) or produced (in an inverse, complex-to-real transform). This length must be one of the following:

  • 2n

  • f * 2n, where f is 3, 5, or 15 and n is at least 4.

__Direction

The desired direction of the transform: vDSP_DFT_FORWARD or vDSP_DFT_INVERSE.

Return Value

Returns a vDSP_DFT_Setup object, or NULL if the function fails, either from lack of memory or because Length does not satisfy the requirement given above.

Discussion

This function is designed to share memory between data structures where possible. If you have an existing setup object, you should pass that object as Previous. By doing so, the returned setup object can share underlying data storage with that object. Note that this function may allocate memory; any allocated memory can ultimately be freed by vDSP_DFT_DestroySetup(_:).

See Also

Discrete Fourier Transforms

func vDSP_DFT_zop_CreateSetup(vDSP_DFT_Setup?, vDSP_Length, vDSP_DFT_Direction) -> vDSP_DFT_Setup?

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) -> vDSP_DFT_SetupD?

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_CreateSetupD(vDSP_DFT_SetupD?, vDSP_Length, vDSP_DFT_Direction) -> vDSP_DFT_SetupD?

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.