[Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)
Sun Mar 23 11:14:48 CDT 2008
Scott Ransom wrote:
> Hi David et al,
> Very interesting. I thought that the 64-bit gcc's automatically
> aligned memory on 16-bit (or 32-bit) boundaries.
Note that I am talking about bytes, not bits. Default alignement depend
on many parameters, like the OS, C runtime. For example, on mac os X,
malloc defaults to 16 bytes aligned (I guess this comes from ppc ages,
where the only way to keep up with x86 was to aggressively use altivec).
On glibc, it is 8 bytes aligned; for big sizes (where big is linked to
the mmap threshold), it is almost never 16 bytes aligned (there was a
discussion on this on numpy ML initiated by Steve G. Johnson, one of the
main FFTW developer). I don't know about dependency on 64 bits archs.
IMHO, the only real solution for this point is to have some support for
aligned buffers in numpy, with aligned memory allocators.
More information about the Numpy-discussion