Commit ab166ea2 authored by Matthieu Boileau's avatar Matthieu Boileau

Change pb size

parent 9673a969
......@@ -10,10 +10,11 @@ import numpy
import pyfftw
import scipy.fftpack
nthread = 4
NTHREAD = 4
#a = numpy.random.rand(2364,2756).astype('complex128')
#a = numpy.random.rand(2364,2756).astype('complex64')
a = numpy.random.rand(2048, 2048).astype('complex64')
n = 8192
a = numpy.random.rand(n, n).astype('complex64')
def full_name(o):
......@@ -58,21 +59,21 @@ if __name__ == '__main__':
# PyFFTW 2
pyfftw.forget_wisdom()
pyfftw.interfaces.numpy_fft.fft2 = timer(pyfftw.interfaces.numpy_fft.fft2)
b4 = pyfftw.interfaces.numpy_fft.fft2(a, threads=nthread)
b4 = pyfftw.interfaces.numpy_fft.fft2(a, threads=NTHREAD)
# PyFFTW 3
pyfftw.forget_wisdom()
b4 = numpy.zeros_like(a)
fftw_measure = timer(pyfftw.FFTW, comment="FFTW_MEASURE")
b5 = fftw_measure(a, b4, axes=(0, 1), direction='FFTW_FORWARD',
flags=('FFTW_MEASURE', ), threads=nthread,
flags=('FFTW_MEASURE', ), threads=NTHREAD,
planning_timelimit=None)
# PyFFTW 3
pyfftw.forget_wisdom()
fftw_estimate = timer(pyfftw.FFTW, comment="FFTW_ESTIMATE")
b6 = fftw_estimate(a, b4, axes=(0, 1), direction='FFTW_FORWARD',
flags=('FFTW_ESTIMATE', ), threads=nthread,
flags=('FFTW_ESTIMATE', ), threads=NTHREAD,
planning_timelimit=None)
# PyFFTW 4
......@@ -82,7 +83,7 @@ if __name__ == '__main__':
b7 = pyfftw_builders_measure(a, s=None, axes=(-2, -1),
overwrite_input=False,
planner_effort='FFTW_MEASURE',
threads=nthread, auto_align_input=False,
threads=NTHREAD, auto_align_input=False,
auto_contiguous=False, avoid_copy=True)
# PyFFTW 5
......@@ -92,6 +93,6 @@ if __name__ == '__main__':
b8 = pyfftw_builders_estimate(a, s=None, axes=(-2, -1),
overwrite_input=False,
planner_effort='FFTW_ESTIMATE',
threads=nthread, auto_align_input=False,
threads=NTHREAD, auto_align_input=False,
auto_contiguous=False, avoid_copy=True)
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