Commit 3dc279c3 authored by Matthieu Boileau's avatar Matthieu Boileau

Just layout

parent 6efeeeda
"""
Uncomment below to use 32 bit floats,
increasing the speed by a factor of 4
and remove the difference between the "builders" and "FFTW" methods
"""
import time
import numpy
import pyfftw
import multiprocessing
import scipy.fftpack
nthread = 10
#a = numpy.random.rand(2364,2756).astype('complex128')
"""
Uncomment below to use 32 bit floats,
increasing the speed by a factor of 4
and remove the difference between the "builders" and "FFTW" methods
"""
a = numpy.random.rand(2364,2756).astype('complex64')
#a = numpy.random.rand(2364,2756).astype('complex64')
a = numpy.random.rand(2048, 2048).astype('complex64')
start = time.time()
b1 = numpy.fft.fft2(a)
......@@ -39,9 +41,9 @@ fft = pyfftw.FFTW( a, b4, axes=(0,1), direction='FFTW_FORWARD', flags=('FFTW_MEA
fft()
end4 = time.time() - start
"""
For large arrays avoiding the copy is very important,
doing this I get a speedup of 2x compared to not using it
"""
For large arrays avoiding the copy is very important,
doing this I get a speedup of 2x compared to not using it
"""
pyfftw.forget_wisdom()
start = time.time()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment