[SciPy-user] numpy aligned memory
Thu Mar 12 16:18:36 CDT 2009
> On 12/03/09 08:05, Andrew Straw wrote:
> I don't think fftw_malloc is doing that either (I don't know how it
> could as it doesn't have any information about the shape of the
> allocated data), so I doubt fftw will profit from this. That's not
> saying some other things might profit from this.
Here's a version that makes sure the fastest varying version stays aligned
if the keyword argument 'imagealign' is True.
After a lot of trial and error I got it working. The trick is aligning the
very first element, and adding the right amount of padding to each row.
The length of each padded row has to be myltiple of the itemsize and the
It seems to work. If you find bugs, please correct.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3079 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20090312/3a879d16/attachment.py
More information about the SciPy-user