Skip to content

Commit f789056

Browse files
author
Feng Wang
committed
set nthread as 4
1 parent 9461439 commit f789056

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎processing_library/fourier_transforms/fft_support.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
try:
88
import pyfftw
9-
import multiprocessing
10-
11-
nthread = multiprocessing.cpu_count()
9+
# import multiprocessing
10+
nthread = 4 #multiprocessing.cpu_count()
1211
# Enable the PyFFTW cache
1312
if not pyfftw.interfaces.cache.is_enabled():
1413
pyfftw.interfaces.cache.enable()
@@ -38,7 +37,6 @@ def fft(a):
3837
else:
3938
return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a)))
4039
else:
41-
# a = pyfftw.byte_align(a)
4240
if (len(a.shape) == 4):
4341
b = pyfftw.interfaces.numpy_fft.fftshift(
4442
pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a, axes=[2, 3]),

0 commit comments

Comments
 (0)