Real transform: status = {S,D}FFT_APPLY_3D (input_format, output_format, direction, in, out, lda_i, lda_j, fft_struct, ni_stride, nj_stride, nk_stride) Complex transforms in complex format: status = {C,Z}FFT_APPLY_3D (input_format, output_format, direction, in, out, lda_i, lda_j, fft_struct, ni_stride, nj_stride, nk_stride) Complex transform in real data format: status = {C,Z}FFT_APPLY_3D (input_format, output_format, direction, in_real, in_imag, out_real, out_imag, lda_i, lda_j, fft_struct, ni_stride, nj_stride, nk_stride)
input_format, output_format character*(*) Identifies the data type of the input and the format to be used to store the data, regardless of the data type. For example, a complex sequence can be stored in real format. The character 'R' specifies the format as real; the character 'C' specifies the format as complex. As convenient, use either upper- or lowercase characters, and either spell out or abbreviate the word. The following table shows the valid values: Subprogram Input Format Output Format Direction {S,D} 'R' 'C' 'F' 'C' 'R' 'B' 'R' 'R' 'F' or 'B' {C,Z} 'R' 'R' 'F' or 'B' 'C' 'C' 'F' or 'B' For complex data, the type of data determines what other arguments are needed. When both the input and output data are real, the complex routines store the data as separate arrays for imaginary and real data so additional arguments are needed. direction character*(*) Specifies the operation as either the forward or inverse transform. Use 'F' or 'f' to specify the forward transform. Use 'B' or 'b' to specify the inverse transform. in, out real*4 | real*8 | complex*8 | complex*16 Both the arguments are three-dimensional arrays. The input and output arrays can be the same array. The IN array contains the data to be transformed. The OUT array contains the transformed data. in_real, out_real, in_imag, out_imag REAL*4 | REAL*8 Use these arguments when performing a complex transform on real data format and storing the result in a real data format. lda_i, lda_j integer*4 Specifies the number of rows and columns in the IN and OUT arrays; lda_i >= ni, lda_j >= nj. For {S,D} routines, lda_i >= ni+2 when the input format is 'R' and the output format is 'C' or the input format is 'C' and the output format is 'R'. fft_struct record /dxml_s_fft_structure_3d/ for single-precision real operations record /dxml_d_fft_structure_3d/ for double-precision real operations record /dxml_c_fft_structure_3d/ for single-precision complex operations record /dxml_z_fft_structure_3d/ for double-precision complex operations The argument refers to the structure created by the _INIT routine. ni_stride, nj_stride, nk_stride integer*4 Specifies the distance between consecutive elements in the IN and OUT arrays; the valid stride depends on the _INIT routine. ni_stride >= 1, nj_stride >= 1, nk_stride >= 1.
The _FFT_APPLY_3D routines compute the fast Fourier transform of three- dimensional data in either the forward or backward direction. These routines are the second step of the three-step procedure for the fast Fourier transform of three-dimensional data. They compute the fast forward or inverse Fourier transform, using the internal data structures created by the _FFT_3D_INIT subroutine. Use the _APPLY_3D routines with their corresponding _INIT_3D and _EXIT_3D routines. For example, use SFFT_APPLY after the SFFT_INIT and end with the SFFT_EXIT routine. See the CXML Reference Manual's chapter on "Using the Signal Processing Subprograms" for an explanation of real and complex data format.
0 DXML_SUCCESS() 11 DXML_ILL_LDA() 12 DXML_INS_RES() 13 DXML_BAD_STRIDE() 18 (for real transform only) DXML_BAD_FORMAT_FOR_DIRECTION() 15 DXML_BAD_DIRECTION_STRING() 16 DXML_BAD_FORMAT_STRING()
INCLUDE 'CXMLDEF.FOR' INTEGER*4 N_I, N_J, N_K, STATUS, LDA_I, LDA_J REAL*8 A(130,128,128), B(130,128,128) RECORD /CXML_D_FFT_STRUCTURE_3D/ FFT_STRUCT N_I = 128 N_J = 128 N_K = 128 LDA_I = 130 LDA_J = 128 STATUS = DFFT_INIT_3D(N_I,N_J,N_K,FFT_STRUCT,.TRUE.) STATUS = DFFT_APPLY_3D('R','C','F',A,B,LDA_I,LDA_J,FFT_STRUCT,1,1,1) STATUS = DFFT_EXIT_3D(FFT_STRUCT) This FORTRAN code computes the forward, three-dimensional, real FFT of a 128x128x128 matrix A. The result of the transform is stored in B in complex form. Note that the leading dimension of B is 130 to hold the extra complex values (see section on data storage). Note also that the input matrix A requires a leading dimension of at least 130.