Commit f8a7b72f authored by Martin Reinecke's avatar Martin Reinecke
Browse files

a bit of nthreads testing

parent 736e7b2d
......@@ -30,11 +30,12 @@ def test1D(len):
assert(_l2error(tmp, b)<6e-7)
@pmp("shp", shapes)
def test_fftn(shp):
@pmp("nthreads", (0,1,2))
def test_fftn(shp, nthreads):
a=np.random.rand(*shp)-0.5 + 1j*np.random.rand(*shp)-0.5j
assert(_l2error(pyfftw.interfaces.numpy_fft.fftn(a), pypocketfft.fftn(a))<1e-15)
assert(_l2error(pyfftw.interfaces.numpy_fft.fftn(a), pypocketfft.fftn(a, nthreads=nthreads))<1e-15)
a=a.astype(np.complex64)
assert(_l2error(pyfftw.interfaces.numpy_fft.fftn(a), pypocketfft.fftn(a))<5e-7)
assert(_l2error(pyfftw.interfaces.numpy_fft.fftn(a), pypocketfft.fftn(a, nthreads=nthreads))<5e-7)
@pmp("shp", shapes2D)
@pmp("axes", ((0,),(1,),(0,1),(1,0)))
......
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