Contents

vDSP_DFT_zop_CreateSetupD

Returns a setup structure that contains precalculated data for forward and inverse, complex, double-precision DFT functions.

Declaration

vDSP_DFT_SetupD vDSP_DFT_zop_CreateSetupD(vDSP_DFT_SetupD __Previous, vDSP_Length __Length, vDSP_DFT_Direction __Direction);

Parameters

  • __Previous:

    An existing Vdsp_dft_setupd structure that shares memory with the returned setup structure. Pass nil to create an object with newly initialized and allocated memory.

  • __Length:

    The number of complex elements to process. The supported values are f * 2**n, where f is 1, 3, 5, or 15 and n is at least 3.

  • __Direction:

    A flag that specifies the transform direction. Pass Forward to transform from the time domain to the frequency domain. Pass Inverse to transform from the frequency domain to the time domain.

Return Value

Returns a vDSP_DFT_SetupD object, or nil if the function fails, either from insufficient memory or because Length doesn’t satisfy the requirements given above.

Discussion

Discussion

This function shares 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; you can free any allocated memory by calling vDSP_DFT_DestroySetupD.

Using shared setup objects

If you’re using a shared setup object, the subsequent execute function requires that the input and output pointers are 64-byte aligned.

The following code shows how to create the correctly aligned vectors:

double* reals = (double*)aligned_alloc(64, length*sizeof(double));
double* imaginaries = (double*)aligned_alloc(64, length*sizeof(double));

See Also

Related Documentation

Complex discrete Fourier transform setup