sprodm1du,dprodm1du(3F) sprodm1du,dprodm1du(3F)
sprodm1du, dprodm1du - Compute the product of Multiple 1D Fourier
transforms with Multiple 1D filters.
Fortran :
subroutine sprodm1du( n,p,array,inca,lda,filter,incf,ldf)
integer n, p, inca, lda, incf, ldf
real array(lda,p), filter(ldf,p)
subroutine dprodm1du( n,p,array,inca,lda,filter,incf,ldf)
integer n, p, inca, lda, incf, ldf
real*8 array(lda,p), filter(ldf,p)
C :
#include <fft.h>
int sprodm1du(int n, int p, float *array, int inc,int lda,
float *filter, int incf, int ldf);
int dprodm1du(int n, int p, double *array,int inc,int lda,
double *filter, int incf, int ldf);
sprodm1du and dprodm1du compute the product of the Fourier transforms of
P real sequences of N samples with the Fourier transforms of P real
filters. Note, the product of the Fourier transforms of two sequences is
equal to the Fourier transform of their convolution.
N Integer, the number of samples in each sequence. Unchanged on exit.
P Integer, the number of sequences. Unchanged on exit.
ARRAY Array containing the Fourier Transform. On exit, the array is
overwritten by the product.
INCA Integer, increment between two consecutive elements of the sequence.
Unchanged on exit.
LDA Integer, leading dimension: increment between the first samples of
two consecutive sequences. Unchanged on exit.
FILTER Array containing the Fourier Transform of the filter(s).
Unchanged on exit.
INCF Integer, increment between two consecutive elements of the filter.
Unchanged on exit.
Page 1
sprodm1du,dprodm1du(3F) sprodm1du,dprodm1du(3F)
LDF Integer, leading dimension: increment between the first samples of
two consecutive filter. Unchanged on exit.
Example of Calling Sequence
Working on 64 sequences of 1024 real values each. We successively apply
a Direct Fourier Transform, the product with a SINGLE filter transform,
then an Inverse Fourier TransformElements
of each sequence are stored with increment (stride)1, and the
offset between the first element of two succesive sequence (leading
dimension) is 1026 (1026 >= 1024+2).
Fortran
real array(0:1026-1,0:64-1), filter(0:1026-1,0:64-1),
coeff(1024+15)
call scfftm1dui( 1024, coeff)
call scfftm1du( -1, 1024, 64, array, 1, 1026, coeff)
call sprodm1du( 1024, 64, array, 1, 1026, filter, 1, 0)
call csfftm1du( 1, 1024, 64, array, 1, 1026, coeff)
C
#include <fft.h>
float array[64*1026], filter[1026], *coeff;
coeff = scfftm1dui( 1024, NULL);
scfftm1du( -1, 1024, 64, array, 1, 1026, coeff);
sprodm1du( 1024, 64, array, 1, 1026, filter, 1, 0);
csfftm1du( -1, 1024, 64, array, 1, 1026, coeff);
NOTE_1 : Using a 0 leading dimension for the filter is equivalent to
applying the same filter to all the input sequences.
NOTE_2 : As the FFTs are not normalized, a successive direct, then
inverse transform, scales the original input by the size of the sequence.
Rather than calling sscalm1d or dscalm1d to scale back the result, this
scaling factor could be directly applied to the filter transform, thus
saving some extra work.
fft, scfftm1dui, dzfftm1dui, scfftm1du, dzfftm1du, sscalm1d, dscalm1d
PPPPaaaaggggeeee 2222 [ Back ]
|