[Numpy-discussion] natural alignment
Wed Jan 9 08:30:22 CST 2013
Further to my previous emails about getting SIMD aligned arrays, I've
noticed that numpy arrays aren't always naturally aligned either.
For example, numpy.float96 arrays are not always aligned on 12-byte
boundaries under 32-bit linux/gcc. Indeed, .alignment on the array
always seems to return 4 (with 64-bit, .alignment returns 4, 8, and 16
for float32, float64 and longdouble respectively).
Can I assume _anything_ in general about the alignment of a numpy array?
(I mean, based on what all implementations of the underlying malloc etc
will return). Should I rely on what is returned from .alignment?
More information about the NumPy-Discussion