mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
Only use >1 thread for the biggest FFTs
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4933 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
3b5fcd30f5
commit
43397b9580
@ -41,7 +41,9 @@ subroutine downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2,nz2)
|
||||
! Plan the FFTs just once
|
||||
|
||||
!$omp critical(fftw) ! serialize non thread-safe FFTW3 calls
|
||||
call fftwf_plan_with_nthreads(nthreads)
|
||||
plan=fftwf_plan_dft_r2c_1d(nfft1,x1,c1,nflags)
|
||||
call fftwf_plan_with_nthreads(1)
|
||||
!$omp end critical(fftw)
|
||||
|
||||
first=.false.
|
||||
|
@ -41,7 +41,9 @@ subroutine filbig(dd,npts,f0,newdat,c4a,n4,sq0)
|
||||
|
||||
! Plan the FFTs just once
|
||||
!$omp critical(fftw) ! serialize non thread-safe FFTW3 calls
|
||||
call fftwf_plan_with_nthreads(nthreads)
|
||||
plan1=fftwf_plan_dft_r2c_1d(nfft1,rca,ca,nflags)
|
||||
call fftwf_plan_with_nthreads(1)
|
||||
plan2=fftwf_plan_dft_1d(nfft2,c4a,c4a,-1,nflags)
|
||||
plan3=fftwf_plan_dft_1d(nfft2,cfilt,cfilt,+1,nflags)
|
||||
!$omp end critical(fftw)
|
||||
|
@ -79,7 +79,7 @@ program jt9
|
||||
endif
|
||||
|
||||
iret=fftwf_init_threads() !Initialize FFTW threading
|
||||
call fftwf_plan_with_nthreads(nthreads)
|
||||
call fftwf_plan_with_nthreads(1) !Default to 1 thread but use nthreads for the big ones
|
||||
! Import FFTW wisdom, if available
|
||||
wisfile=trim(data_dir)//'/jt9_wisdom.dat'// C_NULL_CHAR
|
||||
iret=fftwf_import_wisdom_from_filename(wisfile)
|
||||
|
Loading…
Reference in New Issue
Block a user