高大的猕猴桃 · 招商城市主场盛会房价, ...· 2 月前 · |
精明的豆腐 · AON(有源光网络)_百度百科· 3 月前 · |
淡定的匕首 · byte buddy - Why does ...· 11 月前 · |
呐喊的生姜 · WPF GroupBox Header ...· 11 月前 · |
健壮的回锅肉 · 小龙女被尹志平侵犯的情节真的不是故意恶心人吗 ...· 1 年前 · |
http://www.netlib.org
). These routines have been enhanced and optimized for SPARC
TM
platforms, and then bundled with the Sun Performance Library. The Sun Performance Library also includes two-dimensional FFT routines, three-dimensional FFT routines, and convolution and correlation routines.
FFTPACK routines operate on a single one-dimensional sequence of length
N
. After storing the sequence as a vector in an array, the fast sine, fast cosine, fast Fourier transform, or inverse transform of the sequence is computed. To process an additional sequence, the new sequence must be stored in the array before computing the FFT or inverse transform.
VFFTPACK routines store the multiple one-dimensional sequences in a two-dimensional array, but the routines compute only a one-dimensional Fourier transform of each sequence. The two-dimensional and three-dimensional FFT routines provided with Sun Performance Library differ from the VFFTPACK routines. The two-dimensional FFT routines perform a two-dimensional Fourier transform of a sequence stored in a two-dimensional array, and the three-dimensional FFT routines perform a three-dimensional transform of a sequence stored in a three-dimensional array.
TABLE 1
summarizes some of the similarities and differences between the single vector FFTPACK, multiple vector VFFTPACK routines, two-dimensional FFT routines, and three-dimensional FFT routines.
TABLE 1 Comparison Between Single Vector and Multiple Vector Routines
TABLE 3 Symmetries Supported by FFT and VFFT Routines Symmetry Definition Trigonometric Expansion Cosine Even-Wave An even function f ( t ) that satisfies the condition f (- t ) = f ( t ). Trigonometric series containing only cosine terms. Cosine Quarter-Wave A even function with half-wave symmetry , where T is the period of the function. Trigonometric series containing only cosine terms with odd wave numbers. Sine Odd-Wave An odd function f ( t ) that satisfies the condition f (- t ) =- f ( t ). Trigonometric series containing only sine terms. Sine Quarter-Wave A odd function with half-wave symmetry Trigonometric series containing only sine terms with odd wave numbers. Prefixes used with FFT and VFFT base names are shown in TABLE 5 .
TABLE 5
Prefix and Operand Data Types
Prefix
Operand Data Type
FFT Routines
No prefix
REAL
,
REAL*4
,
REAL(4)
TABLE 6
FFT and VFFT Base Names
Base Name
Operation
COSQB
Inverse cosine quarter-wave transform (synthesis)
COSQF
Cosine quarter-wave transform
COSQI
Initialize cosine quarter-wave transform or inverse transform
Cosine even-wave transform
COSTI
Initialize cosine even-wave transform
EZFFTB
Inverse EZ transform (synthesis)
EZFFTF
EZ transform
EZFFTI
Initialize EZ transform
Inverse transform (synthesis)
Forward transform
Initialize before computing a transform or inverse transform
SINQB
Inverse sine quarter-wave transform (synthesis)
SINQF
Sine quarter-wave transform
SINQI
Initialize sine quarter-wave transform or inverse transform
Sine odd-wave transform
SINTI
Initialize sine odd-wave transform
REAL
,
DOUBLE
,
COMPLEX
, and
DOUBLE
COMPLEX
versions of that routine.
Convention
Routines
x
FFTF
RFFTF
,
DFFTF
,
CFFTF
, and
ZFFTF
[R,D]FFTI
RFFTI
or
DFFTI
[C,Z]FFTF
CFFTF
or
ZFFTF
V[R,D,C,Z]FFTF
VRFFTF
,
VDFFTF
,
VCFFTF
, or
VZFFTF
Sun Performance Library contains the routines shown in
TABLE 8
. The data type of the arguments follows the conventions shown in
TABLE 7
.
TABLE 7
Argument Data Types
Argument
Data Type
AZERO
,
A
,
B
,
R
(EZFFT routines)
FULL
,
PLACE
,
ROWCOL
Character
N
,
M
,
K
,
LDA
,
LD2A
,
LDB
,
LWORK
,
MDIMX
Integer
A
,
B
,
X
,
XT
Same as data type of routine called
WSAVE
,
WORK
See
TABLE 11
In addition to the FFT and VFFT routines listed in
TABLE 8
, the following routines are described in this manual.
TABLE 9
Convolution and Correlation Routines
Routine
Arguments
Function
SCNVCOR
,
DCNVCOR
,
CCNVCOR
,
ZCNVCOR
CNVCOR,FOUR,NX,X,IFX,
Convolution or correlation of two vectors
INCX,NY,NPRE,M,Y,IFY,
INC1Y,INC2Y,NZ,K,Z,
IFZ,INC1Z,INC2Z,WORK,
LWORK
SCNVCOR2
,
DCNVCOR2
,
CCNVCOR2
,
ZCNVCOR2
CNVCOR,METHOD,TRANSX,
Convolution or correlation of two matrices
SCRATCHX,TRANSY,
SCRATCHY,MX,NX,X,LDX,
MY,NY,MPRE,NPRE,Y,LDY,
MZ,NZ,Z,LDZ,WORKIN,
LWORK
_64
to the names of Sun Performance Library routines (for example,
rfftf_64
or
CFFTB_64)
. For Fortran 95 code with the
USE SUNPERF
statement, routines can be called using the optional interfaces (interfaces where certain arguments can be omitted), but
_64
must still be appended to the Sun Performance Library routine names. The compiler will infer the correct interface and values for the optional arguments, but the compiler cannot determine if the optional arguments are 32-bit integers or 64-bit integers.
-xtypemap=integer:64
.
INTEGER
or
INTEGER*4
declarations to
INTEGER*8
.
ZFFTF
, from a 64-bit code, Sun Performance Library internally converts the arguments to 64 bits, and then calls the 64-bit interface (
ZFFTF_64
). Extra overhead is associated with this argument conversion.
N-1
for fast cosine transforms,
N+1
for fast sine transforms, and
M
,
N
, and
K
for multi-dimensional FFT routines can be factored into powers of 2, 3, 4, 5, 7, 11, or 13, as summarized in
TABLE 10
.
TABLE 10
Values That Must Have 2, 3, 4, 5, 7, 11, or 13 as Factors for Best Performance
Routine
Values
COST
,
DCOST
,
VCOST,
VDCOST
N
-
1
SINT
,
DSINT
,
VSINT,
VDSINT
N
+
1
All other one-dimensional FFT and VFFT routines
Two-dimensional FFT routines
M
and
N
Three-dimensional FFT routines
M
,
N
, and
K
The function
x
FFTOPT
can be used to determine the optimal sequence length, as shown in
CODE EXAMPLE 1
.
COSQI, DCOSQI
3N + 15
REAL, REAL*8
COSQB, DCOSQB
3N + 15
REAL, REAL*8
COSQF, DCOSQF
3N + 15
REAL, REAL*8
COST, DCOST
3N + 15
REAL, REAL*8
COSTI, DCOSTI
3N + 15
REAL, REAL*8
EZFFTB
3N + 15
REAL, REAL*8
EZFFTF
3N + 15
REAL, REAL*8
EZFFTI
3N + 15
REAL, REAL*8
RFFTB, DFFTB
2N + 15
REAL, REAL*8
RFFTF, DFFTF
2N + 15
REAL, REAL*8
RFFTI, DFFTI
2N + 15
REAL, REAL*8
CFFTB, ZFFTB
4N + 15
REAL, REAL*8
CFFTF, ZFFTF
4N + 15
REAL, REAL*8
CFFTI, ZFFTI
4N + 15
REAL, REAL*8
SINQB, DSINQB
3N + 15
REAL, REAL*8
SINQF, DSINQF
3N + 15
REAL, REAL*8
SINQI, DSINQI
3N + 15
REAL, REAL*8
SINT, DSINT
2N + N/2 + 15
REAL, REAL*8
SINTI, DSINTI
2N + N/2 + 15
REAL, REAL*8
VRFFTB, VDFFTB
N + 15
REAL, REAL*8
VRFFTF, VDFFTF
N + 15
REAL, REAL*8
VRFFTI, VDFFTI
N + 15
REAL, REAL*8
FFT and VFFT routines use the arguments shown in
TABLE 12
. Some routines use additional arguments that are described in the sections for those routines.
FFT Routines The results of a complex one-dimensional FFT are stored in-place (in the original input array). Storage problems do not occur when performing the Fourier transform of a complex sequence, because the number of calculated Fourier coefficients equals the number of input values. The real and imaginary values of the Fourier coefficients can be stored in the original complex array without additional storage manipulations. Computing the Fourier transform of a real sequence produces complex Fourier coefficients. The number of computed Fourier coefficients is twice the number of values in the original sequence, because of the real and imaginary parts of the complex Fourier coefficients. The complex vector must be packed before it can be stored in the original real array. This packing is done by not storing the imaginary parts of the one or two Fourier coefficients that are always 0, and by not storing the complex conjugates of the Fourier coefficients.
X
contains the following six real data points:
CODE EXAMPLE 2
computes the FFT and inverse of a real or complex sequence for even and odd values of
N
. The transform of the complex sequence shows all the Fourier coefficients in an unpacked, complex array. The transform of the real sequence shows the Fourier coefficients stored in a packed, real array. Differences between the real arrays for even and odd values of
N
can also be compared.
1. Specify the minimum dimension and data type of the work array
WSAVE
.
RFFTF
or
RFFTB
, initialize the work array by calling
RFFTI
.
The same work array can be used for both the transform or inverse transform as long as
|
||||||||||
Routine |
Minimum Work Array Size (
WSAVE
)
|
One-Dimensional Routines | VFFT Routines |
VCFFTB, VZFFTB
|
If transforming rows:
2 * M + 15
If transforming columns:
2 * N + 15
|
REAL, REAL*8
|
||||
---|---|---|---|---|---|---|---|---|---|---|
Arguments | Description |
CODE EXAMPLE 3
shows a C example that uses
dfftf
to compute the Fourier coefficients of a real sequence.
|
精明的豆腐 · AON(有源光网络)_百度百科 3 月前 |