[SciPy-User] [ANN] pyfftw-0.2 released
Mon Feb 15 05:06:38 CST 2010
On Mon, Feb 15, 2010 at 11:46 AM, David Cournapeau
> Sebastian Haase wrote:
>> Has this changed from FFTW2 to FFTW3 ?
>> It would really limit the use of plans, and make overall FFTs much
>> slower. In my specific case I very often have 512x512 single-precision
>> real arrays (images), that I would do ffts over and over again. But
>> the pointers would change ....
> You can, but you need to use the advanced plan API, or use the recently
> added new-array execute function:
so it sounds like the alignment is the "killer" argument for the whole idea:
In general, only arrays allocated with fftw_malloc are guaranteed to
be equally aligned (see SIMD alignment and fftw_malloc).
The alignment issue is especially critical, because if you don't use
fftw_malloc then you may have little control over the alignment of
arrays in memory. For example, neither the C++ new function nor the
Fortran allocate statement provide strong enough guarantees about data
alignment. If you don't use fftw_malloc, therefore, you probably have
to use FFTW_UNALIGNED (which disables most SIMD support). If possible,
it is probably better for you to simply create multiple plans
(creating a new plan is quick once one exists for a given size), or
better yet re-use the same array for your transforms.
I guess this is really all new with version 3 of FFTW. I hope that
"reating a new plan is quick once one exists for a given size" means
"neglectable" for 512x512 arrays !?
More information about the SciPy-User