S3L_rc_fft_setup allocates a real-to-complex FFT setup that includes the twiddle factors necessary for the computation and other internal structures. This setup depends only on the dimensions of the array whose FFT needs to be computed, and can be used both for the forward (real-to-complex) and inverse (complex-to-real) FFTs. Therefore, to compute multiple real-to-complex or complex-to-real Fourier transforms of different arrays whose extents are the same, the S3L_rc_fft_setup function has to be called only once.
The C and Fortran syntax for S3L_rc_fft_setup are shown below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_rc_fft_setup(a, setup_id) S3L_array_t a int setup_id |
include `s3l/s3l-f.h' include `s3l/s3l_errno-f.h' subroutine S3L_rc_fft_setup(a, setup_id, ier) integer*8 a integer*4 setup_id integer*4 ier |
a - S3L array handle for a parallel array that will be the subject of subsequent transform operations.
This function uses the following argument for output:
ier (Fortran only) - When called from a Fortran program, this function returns error status in ier.
setup_id - On output, it contains an integer value that can be used in subsequent calls to S3L_rc_fft, S3L_cr_fft, and S3L_rc_fft_free_setup calls.
On success, S3L_rc_fft_setup returns S3L_SUCCESS.
The following conditions will cause S3L_rc_fft_setup to terminate and return the associated error code:
S3L_ERR_ARG_RANK - The rank of array a is not 1, 2, or 3.
S3L_ERR_ARG_NREAL - The data type of a is not real.
S3L_ERR_ARG_NEVEN - Some of the extents of a are not even.
S3L_ERR_ARG_EXTENTS - The extents of a are not correct for the rank of a and the number of processors over which a is distributed. This relationship is summarized below:
If a is 1D, its length must be divisible by 4*sqr(np) where np is the number of processes over which the a is distributed.
If a is 2D, its extents must both be divisible by 2*np
If a is 3D, its first extent must be even and its last two extents must both be divisible by 2*np.
../examples/s3l/rc_fft/rc_fft.c ../examples/s3l/rc_fft-f/rc_fft.f
S3L_rc_fft(3) S3L_cr_fft(3) S3L_rc_fft_free_setup(3)