|
What value are you using for stride?
Regardless, this:
for ( i=0; i < rowfft_no; i++ )
status=cfft("c","c","f",fft[i],fft[i],&size,&stride)
is not the same as this:
status= cfft_grp("c","c","f",fft,
fft,
&size,&grp_size,
&lda,&stride,&grp_stride);
With CFFT you're taking the forward fft of a complex vector data of
length 65536. Your loop performs "overlapping" ffts, is probably not
what's intended, and accesses only 65536 + 2047 complex data points.
On the other hand, CFFT_GRP accesses a 2-D array that probably contains
2048*65536 complex data points.
Your choice of routine depends on the way the data is stored. If
the data is logically a complex matrix that looks something like:
COMPLEX fft[rowfft_no][size]; /* C storage format */
then you should use the loop logically re-written as:
stride = 1;
status = cfft_init( &size,&fft_struct,&TRUE );
for( i=0;i<(size*rowfft_no);i+=size )
status = cfft_apply( "c","c","f",fft[i],fft[i],
&fft_struct,&stride);
If, however, the data is logically a complex matrix that looks
something like:
COMPLEX fft[size][rowfft_no]; /* Fortran storage format */
then you should call the group fft using something like:
lda = rowfft_no;
stride = 1;
grp_stride = 1;
status = cfft_grp( "c","c","f",fft,fft,&size,&rowfft_no,&lda,
&stride,&grp_stride );
|