mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 12:48:40 -05:00
The "big FFTs" should be computed only once for each new set of Rx data.
This requires setting newdat=0 after the big FFT is computed. In the OMP code this must be done separately for each mode; so new variables newdat9 and newdat65 have been defined. Both are set to "newdat", the value forwarded from the GUI, each time jt9[_omp][.exe] goes into action. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4946 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
609bcb0009
commit
93b729282b
@ -39,6 +39,8 @@ subroutine decoder(ss,id2)
|
||||
endif
|
||||
|
||||
ntol65=20
|
||||
newdat65=newdat
|
||||
newdat9=newdat
|
||||
|
||||
!$ call omp_set_dynamic(.true.)
|
||||
!$omp parallel sections num_threads(2) copyin(/tracer_priv/) shared(ndecoded)
|
||||
@ -46,16 +48,16 @@ subroutine decoder(ss,id2)
|
||||
!$omp section
|
||||
if(nmode.eq.65 .or. (nmode.gt.65 .and. ntxmode.eq.65)) then
|
||||
! We're decoding JT65 or should do this mode first
|
||||
if(newdat.ne.0) dd(1:npts65)=id2(1:npts65)
|
||||
if(newdat65.ne.0) dd(1:npts65)=id2(1:npts65)
|
||||
nf1=nfa
|
||||
nf2=nfb
|
||||
call timer('jt65a ',0)
|
||||
call jt65a(dd,npts65,newdat,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded)
|
||||
call jt65a(dd,npts65,newdat65,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded)
|
||||
call timer('jt65a ',1)
|
||||
else
|
||||
! We're decoding JT9 or should do this mode first
|
||||
call timer('decjt9 ',0)
|
||||
call decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol,nzhsym, &
|
||||
call decjt9(ss,id2,nutc,nfqso,newdat9,npts8,nfa,nfsplit,nfb,ntol,nzhsym, &
|
||||
nagain,ndepth,nmode)
|
||||
call timer('decjt9 ',1)
|
||||
endif
|
||||
@ -63,16 +65,16 @@ subroutine decoder(ss,id2)
|
||||
!$omp section
|
||||
if(nmode.gt.65) then ! do the other mode in dual mode
|
||||
if (ntxmode.eq.9) then
|
||||
if(newdat.ne.0) dd(1:npts65)=id2(1:npts65)
|
||||
if(newdat65.ne.0) dd(1:npts65)=id2(1:npts65)
|
||||
nf1=nfa
|
||||
nf2=nfb
|
||||
call timer('jt65a ',0)
|
||||
call jt65a(dd,npts65,newdat,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded)
|
||||
call jt65a(dd,npts65,newdat65,nutc,nf1,nf2,nfqso,ntol65,nagain,ndecoded)
|
||||
call timer('jt65a ',1)
|
||||
else
|
||||
call timer('decjt9 ',0)
|
||||
call decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol,nzhsym, &
|
||||
nagain,ndepth,nmode)
|
||||
call decjt9(ss,id2,nutc,nfqso,newdat9,npts8,nfa,nfsplit,nfb,ntol, &
|
||||
nzhsym,nagain,ndepth,nmode)
|
||||
call timer('decjt9 ',1)
|
||||
end if
|
||||
endif
|
||||
|
@ -45,8 +45,7 @@ subroutine downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2,nz2)
|
||||
endif
|
||||
|
||||
if(newdat.eq.1) then
|
||||
fac=6.963e-6 !Why this weird constant?
|
||||
x1(0:npts-1)=fac*id2(0:npts-1)
|
||||
x1(0:npts-1)=id2(0:npts-1)
|
||||
x1(npts:nfft1-1)=0. !Zero the rest of x1
|
||||
call timer('FFTbig9 ',0)
|
||||
call fftwf_execute_dft_r2c(plan,x1,c1)
|
||||
@ -61,6 +60,7 @@ subroutine downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2,nz2)
|
||||
s(i)=s(i)+real(c1(j))**2 + aimag(c1(j))**2
|
||||
enddo
|
||||
enddo
|
||||
newdat=0
|
||||
endif
|
||||
|
||||
ndown=8*nsps8/nspsd !Downsample factor
|
||||
|
@ -87,6 +87,7 @@ subroutine filbig(dd,npts,f0,newdat,c4a,n4,sq0)
|
||||
ca(ia:ib)=fac*conjg(ca(ia:ib))
|
||||
enddo
|
||||
call timer('flatten ',1)
|
||||
newdat=0
|
||||
endif
|
||||
|
||||
! NB: f0 is the frequency at which we want our filter centered.
|
||||
|
Loading…
Reference in New Issue
Block a user