sfftc - initialize the trigonometric weight and factor tables or compute the forward Fast Fourier Transform of a real sequence. =head1 SYNOPSIS
SUBROUTINE SFFTC( IOPT, N, SCALE, X, Y, TRIGS, IFAC, WORK, LWORK, * IERR) COMPLEX Y(*) INTEGER IOPT, N, LWORK, IERR INTEGER IFAC(*) REAL SCALE REAL X(*), TRIGS(*), WORK(*)
SUBROUTINE SFFTC_64( IOPT, N, SCALE, X, Y, TRIGS, IFAC, WORK, LWORK, * IERR) COMPLEX Y(*) INTEGER*8 IOPT, N, LWORK, IERR INTEGER*8 IFAC(*) REAL SCALE REAL X(*), TRIGS(*), WORK(*)
SUBROUTINE FFT( IOPT, [N], [SCALE], X, Y, TRIGS, IFAC, WORK, [LWORK], * IERR) COMPLEX, DIMENSION(:) :: Y INTEGER :: IOPT, N, LWORK, IERR INTEGER, DIMENSION(:) :: IFAC REAL :: SCALE REAL, DIMENSION(:) :: X, TRIGS, WORK
SUBROUTINE FFT_64( IOPT, [N], [SCALE], X, Y, TRIGS, IFAC, WORK, * [LWORK], IERR) COMPLEX, DIMENSION(:) :: Y INTEGER(8) :: IOPT, N, LWORK, IERR INTEGER(8), DIMENSION(:) :: IFAC REAL :: SCALE REAL, DIMENSION(:) :: X, TRIGS, WORK
#include <sunperf.h>
void sfftc(int iopt, int n, float scale, float *x, complex *y, float *trigs, int *ifac, float *work, int lwork, int *ierr);
void sfftc_64(long iopt, long n, float scale, float *x, complex *y, float *trigs, long *ifac, float *work, long lwork, long *ierr);
sfftc initializes the trigonometric weight and factor tables or computes the forward Fast Fourier Transform of a real sequence as follows: .Ve
N-1
Y(k)
= scale * SUM W*X(j)
j=0 .Ve
where
k ranges from 0 to N-1
i = sqrt(-1)
isign = -1 for forward transform
W = exp(isign*i*j*k*2*pi/N)
In real-to-complex transform of length N, the (N/2+1) complex output data points stored are the positive-frequency half of the spectrum of the Discrete Fourier Transform. The other half can be obtained through complex conjugation and therefore is not stored.
IOPT = 0 computes the trigonometric weight table and factor table
IOPT = -1 computes forward FFT
0 = normal return
-1 = IOPT is not 0 or -1
-2 = N < 0
-3 = (LWORK is not 0) and (LWORK is less than N)
-4 = memory allocation for workspace failed
fft