Don't use FFTW wisdom with CVF.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@1541 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2009-10-22 14:50:45 +00:00
parent dddca3d8de
commit f941da869f
5 changed files with 24 additions and 48 deletions

View File

@ -26,19 +26,23 @@ C Impulse response of filter (one side)
if(nmax.lt.0) go to 900
if(first) then
npatience=FFTW_ESTIMATE
! npatience=FFTW_MEASURE
npatience=1
nflags=FFTW_ESTIMATE
if(npatience.eq.1) nflags=FFTW_ESTIMATE_PATIENT
if(npatience.eq.2) nflags=FFTW_MEASURE
if(npatience.eq.3) nflags=FFTW_PATIENT
if(npatience.eq.4) nflags=FFTW_EXHAUSTIVE
C Plan the FFTs just once
call sfftw_plan_dft_1d_(plan1,NFFT1,ca,ca,
+ FFTW_BACKWARD,npatience)
+ FFTW_BACKWARD,nflags)
call sfftw_plan_dft_1d_(plan2,NFFT1,cb,cb,
+ FFTW_BACKWARD,npatience)
+ FFTW_BACKWARD,nflags)
call sfftw_plan_dft_1d_(plan3,NFFT2,c4a,c4a,
+ FFTW_FORWARD,npatience)
+ FFTW_FORWARD,nflags)
call sfftw_plan_dft_1d_(plan4,NFFT2,c4b,c4b,
+ FFTW_FORWARD,npatience)
+ FFTW_FORWARD,nflags)
call sfftw_plan_dft_1d_(plan5,NFFT2,cfilt,cfilt,
+ FFTW_BACKWARD,npatience)
+ FFTW_BACKWARD,nflags)
C Convert impulse response to filter function
do i=1,NFFT2

View File

@ -20,12 +20,11 @@ C The transform will be real and returned to the input array.
parameter (NPMAX=100)
parameter (NSMALL=16384)
complex a(nfft)
complex aa(32768)
complex aa(NSMALL)
integer nn(NPMAX),ns(NPMAX),nf(NPMAX),nl(NPMAX)
real*8 plan(NPMAX) !Actually should be i*8, but no matter
data nplan/0/
include 'fftw3.f'
common/patience/npatience
save plan,nplan,nn,ns,nf,nl
if(nfft.lt.0) go to 999
@ -46,12 +45,12 @@ C The transform will be real and returned to the input array.
C Planning: FFTW_ESTIMATE, FFTW_ESTIMATE_PATIENT, FFTW_MEASURE,
C FFTW_PATIENT, FFTW_EXHAUSTIVE
C NB: "EXHAUSTIVE" takes more or less forever, for long transforms.
nspeed=FFTW_ESTIMATE
if(npatience.eq.1) nspeed=FFTW_ESTIMATE_PATIENT
if(npatience.eq.2) nspeed=FFTW_MEASURE
if(npatience.eq.3) nspeed=FFTW_PATIENT
if(npatience.eq.4) nspeed=FFTW_EXHAUSTIVE
nspeed=nspeed + FFTW_THREADSAFE+FFTW_USE_WISDOM
npatience=1
nflags=FFTW_ESTIMATE
if(npatience.eq.1) nflags=FFTW_ESTIMATE_PATIENT
if(npatience.eq.2) nflags=FFTW_MEASURE
if(npatience.eq.3) nflags=FFTW_PATIENT
if(npatience.eq.4) nflags=FFTW_EXHAUSTIVE
if(nfft.le.NSMALL) then
jz=nfft
if(iform.eq.0) jz=nfft/2
@ -62,14 +61,14 @@ C NB: "EXHAUSTIVE" takes more or less forever, for long transforms.
call sleep_msec(0)
if(isign.eq.-1 .and. iform.eq.1) then
call sfftw_plan_dft_1d_(plan(i),nfft,a,a,
+ FFTW_FORWARD,nspeed)
+ FFTW_FORWARD,nflags)
else if(isign.eq.1 .and. iform.eq.1) then
call sfftw_plan_dft_1d_(plan(i),nfft,a,a,
+ FFTW_BACKWARD,nspeed)
+ FFTW_BACKWARD,nflags)
else if(isign.eq.-1 .and. iform.eq.0) then
call sfftw_plan_dft_r2c_1d_(plan(i),nfft,a,a,nspeed)
call sfftw_plan_dft_r2c_1d_(plan(i),nfft,a,a,nflags)
else if(isign.eq.1 .and. iform.eq.-1) then
call sfftw_plan_dft_c2r_1d_(plan(i),nfft,a,a,nspeed)
call sfftw_plan_dft_c2r_1d_(plan(i),nfft,a,a,nflags)
else
stop 'Unsupported request in four2a'
endif

View File

@ -138,13 +138,12 @@ subroutine ftn_init
share='denynone')
#else
open(27,file=appdir(:iz)//'/dphi.txt',status='unknown')
#endif
open(28,file='fftw_wisdom.dat',status='unknown')
call import_wisdom_from_file(isuccess,28)
close(28)
if(isuccess.ne.0) write(*,1000)
1000 format('Using optimized FFTs.')
#endif
#ifdef CVF
open(29,file=appdir(:iz)//'/debug.txt',status='unknown', &

View File

@ -1,4 +1,4 @@
#---------------------------------------------------------------------- MAP65
#--------------------------------------------------------------------- MAP65
# $Date$ $Revision$
#
from Tkinter import *

View File

@ -1,26 +0,0 @@
subroutine rfile2(fname,buf,n,nr)
C Read data from disk.
integer RMODE
parameter(RMODE=0)
integer*1 buf(n)
integer open,read,close
integer fd
character fname*(*)
data iz/0/ !Silence g77 warning
do i=80,1,-1
if(fname(i:i).ne.' ') then
iz=i
go to 10
endif
enddo
10 fname=fname(1:iz)//char(0)
fd=open(fname,RMODE) !Open file for reading
nr=read(fd,buf,n)
i=close(fd)
return
end