vDSP_DFT_Interleaved_CreateSetupD(_:_:_:_:)
Returns a setup structure that contains precalculated data for forward and inverse, double-precision interleaved discrete Fourier transform (DFT) functions.
Declaration
func vDSP_DFT_Interleaved_CreateSetupD(_ Previous: vDSP_DFT_Interleaved_SetupD?, _ Length: vDSP_Length, _ Direction: vDSP_DFT_Direction, _ RealtoComplex: vDSP_DFT_RealtoComplex) -> vDSP_DFT_Interleaved_SetupD?Parameters
- Previous:
An existing Vdsp_dft_interleaved_setupd structure that shares memory and direction with the setup structure that this function returns. Pass
nilto create an object with newly initialized and allocated memory. To ensure correct operation, if you specify a previous setup structure it must share the same direction as theDirectionparameter. - Length:
For complex-to-complex transforms, the number of complex elements.
For real-to-complex transforms, the number of real elements divided by 2.
- 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.
- RealtoComplex:
A flag that specifies the transform type. To transform from complex to complex, pass Interleaved_complextocomplex. To transform from real to complex, pass Interleaved_realtocomplex.
Return Value
Returns a vDSP_DFT_Interleaved_SetupD object, or nil if the function fails, either from insufficient memory or because Length doesn’t satisfy the above requirements.
Discussion
Discussion
The interleaved DFT operations that the Accelerate framework provides work over collections with specific counts. The maximum number of complex elements that these operations support is 4096, and other supported counts are the result of the formula f * 2ⁿ for certain values of f and n. In the case of real-to-complex, n is the number of real elements divided by two, and for complex-to-complex n is the number of complex elements.
The following tables show the complete list of supported lengths for different values of f and n:
Supported lengths for f = 1
n |
|
|
|---|---|---|
3 | 8 | 8 |
4 | 16 | 16 |
5 | 32 | 32 |
6 | 64 | 64 |
7 | 128 | 128 |
8 | 256 | 256 |
9 | 512 | 512 |
10 | 1024 | 1024 |
11 | 2048 | 2048 |
12 | 4096 | 4096 |
Supported lengths for f = 3
n |
|
|
|---|---|---|
2 | 4 | 12 |
3 | 8 | 24 |
4 | 16 | 48 |
5 | 32 | 96 |
6 | 64 | 192 |
7 | 128 | 384 |
8 | 256 | 768 |
Supported lengths for f = 5
n |
|
|
|---|---|---|
2 | 4 | 20 |
3 | 8 | 40 |
4 | 16 | 80 |
5 | 32 | 160 |
6 | 64 | 320 |
7 | 128 | 640 |
Supported lengths for f = 9
n |
|
|
|---|---|---|
2 | 4 | 36 |
3 | 8 | 72 |
4 | 16 | 144 |
5 | 32 | 288 |
6 | 64 | 576 |
7 | 128 | 1152 |
Supported lengths for f = 15
n |
|
|
|---|---|---|
2 | 4 | 60 |
3 | 8 | 120 |
4 | 16 | 240 |
5 | 32 | 480 |
6 | 64 | 960 |
7 | 128 | 1920 |