A call to S3L_fft_setup is the first step in executing Sun S3L Fast Fourier Transforms. You supply it with the parallel array (a) that is to be transformed. It returns a setup value in setup_id, which you use in subsequent calls to other S3L FFT routines.
When calling S3L_fft_setup, you may supply arbitrary values in a; the setup routine neither examines nor modifies the contents of this parallel array. It simply uses its size and type to create the setup object.
The setup ID computed by the S3L_fft_setup call can be used for any parallel arrays that have the same rank, extents, and type as the a argument supplied in the S3L_fft_setup call--but only for such parallel arrays. If a transform is to be performed on two parallel arrays, a and b, identical in rank, extents, and type, then one call to the setup routine suffices, even if transforms are performed on different axes of the two parallel arrays. But if a and b differ in rank, extents, or type, a separate setup call is required for each.
You may have more than one setup ID active at a time; that is, you may call the setup routine more than once before deallocating any setup IDs. For this reason, be careful that you specify the correct setup ID for calls to S3L_fft, S3L_ifft, S3L_fft_detailed, and S3L_fft_free_setup.
The time required to compute the contents of an FFT setup_id structure is substantially longer than the time required to actually perform an FFT. For this reason, and because it is common to perform FFTs on many parallel variables with the same rank, extents, and type, Sun S3L keeps the setup phase and transform phases distinct.
When a is no longer needed, call S3L_fft_free_setup to deallocate the FFT setup_id.
The C and Fortran syntax for S3L_fft_setup are shown below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_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_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_fft, S3L_ifft, S3L_fft_detailed, and S3L_fft_free_setup.
On success, S3L_fft_setup returns S3L_SUCCESS.
S3L_fft_setup performs generic checking of the validity of the arrays it accepts as arguments. If an array argument contains an invalid or corrupted value, the function terminates and an error code indicating which value of the array handle was invalid is returned. See Appendix A of this manual for a detailed list of these error codes.
The following conditions will cause S3L_fft_setup to terminate and return the associated error code:
S3L_ERR_FFT_RANKGT3 - The rank of array a is larger than 3.
S3L_ERR_ARG_NCOMPLEX - a is not of type S3L_complex or S3L_double_complex.
S3L_ERR__FFT_EXTSQPROCS - a is a 1D array, but its extent is not a multiple of the square of the number of processes over which it was defined.
../examples/s3l/fft/fft.c ../examples/s3l/fft/ex_fft1.c ../examples/s3l/fft/ex_fft2.c ../examples/s3l/fft-f/fft.f ../examples/s3l/fft-f/ex_fft1.f
S3L_fft(3) S3L_fft_free_setup(3) S3L_ifft(3) S3L_fft_detailed(3)