S3L_fft_detailed computes the in-place forward or inverse FFT along a specified axis of a complex or double complex parallel array, a. FFT direction and axis are specified by the arguments iflag and axis, respectively. Both power-of-two and arbitrary radix FFTs are supported. Upon completion, a is overwritten with the FFT result.
A 1D parallel FFT can be used for array sizes that are a multiple of the square of the number of processes. Higher dimensionality FFTs can be used for arbitrary sizes and distributions.
For the 2D FFT, a more efficient transpose algorithm is employed when the blocksizes along each dimension are equal to the extents divided by the number of processes. This yields significant performance benefits.
S3L_fft_detailed can only be used for complex and double complex data types. To compute a real-data forward FFT, use S3L_rc_fft. This performs a forward FFT on the real data, yielding packed representation of the complex results. To compute the corresponding inverse FFT, use S3L_cr_fft, which will perform an inverse FFT on the complex data, overwriting the original real array with real-valued results of the inverse FFT.
The floating-point precision of the result always matches that of the input.
S3L_fft_detailed and S3L_ifft do not perform any scaling. Consequently, when a forward FFT is followed by an inverse FFT, the original data will be scaled by the product of the extents of the array.
The C and Fortran syntax for S3L_fft_detailed are shown below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_fft_detailed(a, setup_id, iflag, axis) S3L_array_t a int setup_id int iflag int axis |
include `s3l/s3l-f.h' include `s3l/s3l_errno-f.h' subroutine S3L_fft_detailed(a, setup_id, iflag, axis, ier) integer*8 a integer*4 setup_id integer*4 iflag integer*4 axis integer*4 ier |
a - Parallel array that is to be transformed. Its rank, extents, and type must be the same as the parallel array (a) supplied in the S3L_fft_setup call.
setup_id - Scalar integer variable. Use the value returned by the S3L_fft_setup call for this argument.
iflag - Determines the transform direction. Set iflag to 1 for forward FFT; set to -1 for inverse FFT.
axis - Determines the axis along which the FFT is to be computed.
This function uses the following arguments for output:
a - The input array a is overwritten with the result of the FFT.
ier (Fortran only) - When called from a Fortran program, this function returns error status in ier.
On success, S3L_fft_detailed returns S3L_SUCCESS.
S3L_fft_detailed 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 returns an error code indicating which value was invalid. See Appendix A of this manual for a detailed list of these error codes.
The following conditions will cause the function to terminate and return the associated error code.
S3L_ERR_ARG_NCOMPLEX - Array a is not complex.
S3L_ERR_FFT_EXTSQPROCS - Array a is 1D but its extent is not divisible by the square of the number of processes.
S3L_ERR_ARG_SETUP - The setup_id supplied is not valid.
S3L_ERR_FFT_INVIFLAG - The iflag argument is invalid.
../examples/s3l/fft/fft.c ../examples/s3l/fft/ex_fft1.c ../examples/s3l/fft/ex_fft2.c ../examples/s3l/fft-f/fft.f
S3L_fft_setup(3) S3L_fft_free_setup(3) S3L_ifft(3) S3L_fft(3) S3L_cr_fft(3) S3L_rc_fft(3) S3L_rc_fft_setup(3)